Jacobi elliptic function
11-02-2017, 05:26 PM (This post was last modified: 11-02-2017 06:22 PM by salvomic.)
Post: #1
 salvomic Senior Member Posts: 1,390 Joined: Jan 2015
Jacobi elliptic function
hi,
here is a first version of a program to return Jacobi elliptic function and its parameters (see here for theory).
This function is related to the Elliptic Integrals: see my version here in the Library.

INPUT: Jacobi_fn(φ, m)
where φ is the amplitude (φ=ASIN(x), where x is upper bound of Elliptic integral 1st kind expressed in other canonical form; the complete form has 0<=x<=1 or 0<=φ<=π/2); m=k^2 is the square of the eccentricity (0<=k<=1).

RETURN a matrix where the first row present u (elliptic integral 1st kind in the sine integral –with φ– form), φ, m and the second row sn (amplitude sine), cn (amplitude cosine) and dn (delta amplitude)

The Code:
Code:
 // Jacobi elliptic functions EXPORT jacobi_fn(φ, m) // Elliptic integral of 1st kind // φ = amplitude, m = k^2 where k is eccentricity BEGIN local θ, u, sn, cn, dn; u := int(1/(SQRT(1-m*SIN(θ)*SIN(θ))),θ,0,φ); sn :=  SIN(φ); cn := COS(φ); dn := SQRT(1-m*SIN(φ)*SIN(φ)); // RETURN a matrix with // u (Elliptic integral 1st kind), φ, m // sn (Amplitude Sine), cn (Amplitude Cosine), dn (Delta Amplitude) RETURN [[u,φ,m], [sn, cn, dn]]; END;

For now there is no control for over boundary values.

Enjoy!
Salvo Micciché

∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
 « Next Oldest | Next Newest »

 Messages In This Thread Jacobi elliptic function - salvomic - 11-02-2017 05:26 PM RE: Jacobi elliptic function - salvomic - 10-17-2020, 08:14 PM RE: Jacobi elliptic function - Albert Chan - 10-18-2020, 03:27 PM RE: Jacobi elliptic function - salvomic - 10-18-2020, 03:37 PM RE: Jacobi elliptic function - pinkman - 10-18-2020, 07:51 AM RE: Jacobi elliptic function - salvomic - 10-18-2020, 03:35 PM RE: Jacobi elliptic function - pinkman - 10-18-2020, 04:18 PM RE: Jacobi elliptic function - salvomic - 10-18-2020, 04:32 PM

User(s) browsing this thread: 1 Guest(s)