Elliptic Integrals and Elliptic Functions For Real

41 downloads 0 Views 224KB Size Report
Jacobi's elliptic functions and Jacobi's theta functions i.e. almost all given in ... Jacobi form, Legendre form and Jacobi's second form (Epsilon function [7] and ...
Elfun18 - Elliptic Integrals and Elliptic Functions For Real Arguments Milan Batista [email protected] (jan 2018) Eelfun18 is a set of Matlab’s functions that enable the computation of wide set of Elliptic integrals, Jacobi's elliptic functions and Jacobi's theta functions i.e. almost all given in handbooks ([2],[4],[5],[7]). There are many libraries that include elliptic integrals and elliptic functions (see below Internet sources). However each of these libraries has limitations in the set of functions or in the choice of function arguments. The widest range of functions among the libraries is provided by AMath/DAMath. Elfun18 has two levels: higher level functions with matrix arguments (see Appendix) and low level functions with scalar arguments. Each function is available either with the modulus k or parameter m as argument. In later case the function name begin with m. Incomplete elliptic integrals are given in Jacobi form, Legendre form and Jacobi's second form (Epsilon function [7] and Lambda functions [3]). The function set can be downloaded from https://www.mathworks.com/matlabcentral/fileexchange/65915-elfun18 Folders Folder elfun18 contains elfun18 functions set. To use elfun18 functions set add folder elfun18 to Matlab search path. Folder gui contains interactive function viewer (Matlab R2017a or higher). Calculator (fields x and k/m) accept regular Matlab expressions.

Figure1. gui_ellfun_viewetr shnapshoots

1

Folder plot contains a set scripts which reproduce graphs of elliptic functions from literature ( [2], [6],[7]). Folder test_accuracy contains a set of comparison test with Matlab's ellipke, ellipj functions, and Matlab's symbolic toolbox elliptic functions (Matlab R2017a or higher). Folder test_timing contains a set of scripts which compare computation time of elfun18 functions with Matlab's ellipke, ellipj functions, and Matlab's symbolic toolbox elliptic functions (Matlab R2017a or higher). Folder test_verification contains a set which verifies various functional relations from literature ([1],[2], [7]). References [1] Byrd, P.F., Friedman, M.D., 1971. Handbook of elliptic integrals for engineers and scientists, 2d ed. Springer-Verlag, Berlin, New York,. [2] Carlson, B.C., 2010. Elliptic Integrals, in: Olver, F.W.J., National Institute of Standards and Technology (U.S.) (Eds.). Cambridge University Press : NIST, Cambridge ; New York, pp. xv, 951 p. [3] Lawden, D.F., 1989. Elliptic functions and applications. Springer-Verlag, New York. [4] Milne-Thomson, L.M., 1972. Elliptic Integrals, in: Abramowitz, M., Stegun, I.A. (Eds.), Handbook of Mathematical Functions, Dover, Mineola, N.Y., p. 1046 S. [5] Milne-Thomson, L.M., 1972. Jacobian Elliptic Functions and Theta Functions, in: Abramowitz, M., Stegun, I.A. (Eds.), Handbook of Mathematical Functions. Dover, Mineola, N.Y. [6] Oldham, K.B., Myland, J.C., Spanier, J., 2009. Atlas of functions with Equator, the atlas function calculator, 2nd ed. Springer, New York. [7] Reinhardt, W.P., Walker, P.L., 2010. Jacobian Elliptic Functions, in: Olver, F.W.J. (Ed.), NIST handbook of mathematical functions. Cambridge University Press : NIST, Cambridge ; New York, pp. xv, 951 p. Internet sources AMath/DAMath (Pascla) http://www.wolfgang-ehrhardt.de/amath_functions.html BOOST (C++) http://www.boost.org/doc/libs/1_53_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/ CERN (Fortran 77) https://root.cern.ch/doc/v608/group__SpecFunc.html DATAPLOT (Fortran 77) http://www.itl.nist.gov/div898/software/dataplot/elli_fun.htm SLATEC (Fortan 77) http://sdphca.ucsd.edu/slatec_source/TOC.htm Mathematics Source Library (C++) http://www.mymathlib.com/functions/elliptic_integrals.html http://www.mymathlib.com/functions/elliptic_functions.html MPMATH (Pyton) http://docs.sympy.org/0.7.1/modules/mpmath/functions/elliptic.html

2

Appendix. List of high-level functions % % % % % % % % %

Burlisch's elliptic integrals ----------------------------BulirschCEL( KC, P, A, B ) BulirschCEL1( KC ) BulirschCEL2( KC, A, B ) BulirschCEL3( KC, P ) BulirschEL1( X, KC ) BulirschEL2( X, KC, A, B ) BulirschEL3( X, KC, P )

General complete elliptic integral Complete elliptic integral of the first kind Complete elliptic integral of the second kind Complete elliptic integral of the third kind Elliptic integral of the first kind Elliptic integral of the second kind Elliptic integral of the third kind

% % % % % % %

Carlson's elliptic integrals ----------------------------CarlsonRC( X, Y ) CarlsonRD( X, Y, Z) CarlsonRF( X, Y, Z ) CarlsonRG( X, Y, Z ) CarlsonRJ( X, Y, Z, P )

Elliptic integral RC Symmetric elliptic integral Symmetric elliptic integral Symmetric elliptic integral Symmetric elliptic integral

RD RF RG RJ

%****************************************************************** % Note % If parameter M is used instead of modulus K then the name of the % function begin with 'm'. E.g. EllipticB(K) vs mEllipticB(M) % ***************************************************************** % % % % % % % %

Complete elliptic integrals --------------------------EllipticB(K) Complete EllipticC(K) Complete EllipticD(K) Complete EllipticK(K) Complete EllipticE(K) Complete EllipticPi(N,K) Complete

% % % % %

Complementary complete elliptic integrals -----------------------------------------EllipticCK(K) Complementary comp. ell. integral of the first kind EllipticCE(K) Complementary comp. ell. integral of the second kind EllipticCPi(N,K) Complementary comp. ell. integral of the third kind

% % % % % % %

Jacobi form of elliptic integrals --------------------------------EllipticB(X,K) Incomplete elliptic EllipticD(X,K) Incomplete elliptic EllipticF(X,K) Incomplete elliptic EllipticE(X,K) Incomplete elliptic EllipticPi(X,N,K) Incomplete elliptic

integral B integral D integral of the first kind integrals of the second kind integrals of the third kind

% % % % % % %

Legendre form of elliptic integrals ----------------------------------pEllipticB(PHI,K) Incomplete elliptic pEllipticD(PHI,K) Incomplete elliptic pEllipticF(PHI,K) Incomplete elliptic pEllipticE(PHI,K) Incomplete elliptic pEllipticPi(PHI,N,K) Incomplete elliptic

integral B integral D integral of the first kind integrals of the second kind integrals of the third kind

% % % % % %

Jacobi second form of elliptic integrals ----------------------------------------JacobiEps(X,K) Jacobi Epsilon function JacobiZeta(X,K) Jacobi Zeta function ( JacobiLambda(X,N,K) Jacobi Lambda function JacobiOmega(X,N,K) Jacobi Omega function (

% % % % % % % % % % % %

Jacobi elliptic functions ------------------------JacobiAM(X,K) Jacobi JacobiSN(X,K) Jacobi JacobiCN(X,K) Jacobi JacobiDN(X,K) Jacobi JacobiCD(X,K) Jacobi JacobiSD(X,K) Jacobi JacobiND(X,K) Jacobi JacobiDC(X,K) Jacobi JacobiNC(X,K) Jacobi JacobiSC(X,K) Jacobi

elliptic elliptic elliptic elliptic elliptic elliptic

integral B integral C integral D integral of the first kind integrals of the second kind integrals of the third kind

(el. int. of 2nd kind) periodic part of Eps) ( el. int. of 3rd kind) periodic part of Lambda)

amplitude function am elliptic function sn elliptic function cn elliptic function dn elliptic function cd elliptic function sd elliptic function nd elliptic function dc elliptic function nc elliptic function sc

3

% JacobiNS(X,K) % JacobiDS(X,K) % JacobiCS(X,K)

Jacobi elliptic function ns Jacobi elliptic function ds Jacobi elliptic function cs

% % % % % % % % % % % % %

InverseJacobiAM(X,K) InverseJacobiSN(X,K) InverseJacobiCN(X,K) InverseJacobiDN(X,K) InverseJacobiCD(X,K) InverseJacobiSD(X,K) InverseJacobiND(X,K) InverseJacobiDC(X,K) InverseJacobiNC(X,K) InverseJacobiSC(X,K) InverseJacobiNS(X,K) InverseJacobiDS(X,K) InverseJacobiCS(X,K)

Inverse Inverse Inverse Inverse Inverse Inverse Inverse Inverse Inverse Inverse Inverse Inverse Inverse

% % % % % % % %

Jacobi Theta Functions -----------------------EllipticNome(K) Nome function EllipticModulus(Q) Modulus function JacobiTheta1(X,Q) Jacobi theta function JacobiTheta2(X,Q) Jacobi theta function JacobiTheta3(X,Q) Jacobi theta function JacobiTheta4(X,Q) Jacobi theta function

% % % % % % %

Misc. functions --------------GausAGM(X,Y) GaussCL(X) GaussSL(X) InverseGaussCL(X) InverseGaussSL(X)

% HeumanLambda0(PHI,K)

Jacobi Jacobi Jacobi Jacobi Jacobi Jacobi Jacobi Jacobi Jacobi Jacobi Jacobi Jacobi Jacobi

amplitude function am elliptic function sn elliptic function cn elliptic function dn elliptic function cd elliptic function sd elliptic function nd elliptic function dc elliptic function nc elliptic function sc elliptic function ns elliptic function ds elliptic function cs

theta1 theta2 theta3 theta4

Gauss' arithmetic geometric mean Lemniscate cos Lemniscate sin Inverse lemniscate cos Inverse lemniscate sin Heuman's Lambda0 function (compl.el.int. of 3rd kd.)

% GudermanGD(X) Gudermannian function gd % InverseGudermannGD(X) Inverse of Gudermannian function gd

4