This notebook contains additional material to the Mathematica GuideBooks  (Springer-Verlag, New York, 2004) http://www.MathematicaGuideBooks.org . It uses the stylesheet of the Mathematica GuideBooks, which is embedded.

Symbolics Volume, Chapter 3

Derive an ordinary differential equation for the Jacobi elliptic function sn(z|m) with respect to m.

{D[JacobiSN[z, m], m], D[JacobiSN[z, m], m, m]} // TraditionalForm

Most functions appearing in the derivatives are Jacobi functions themselves and we could use the algebraic identities between them to eliminate them in favor of sn(z|m). Most troublesome are the two elliptic integrals E(am(z|m)|m) and F(am(z|m)|m). The last one is of the form inverseFunction(function(z)) and ignoring branch cuts, we assume for differential-algebraic purposes it is equal to z. This leaves us with E(am(z|m)|m), which we eliminate from the first two derivatives.

For shorter formulas, we start by introducing some obvious abbreviations for the functions and derivatives involved.

eqs1 = Table[Numerator[Together[
         d[k] - TrigExpand[D[JacobiSN[z, m], {m, k}]]]], {k, 2}] //. 
     (* introduce some abbreviations *)    
     {JacobiSN[z, m] -> sn, JacobiCN[z, m] -> cn, JacobiDN[z, m] -> dn, 
      JacobiCD[z, m] -> cd, JacobiDC[z, m] -> dc, JacobiNS[z, m] -> ns, 
      JacobiSD[z, m] -> sd, JacobiNC[z, m] -> nc, JacobiDS[z, m] -> ds,
      JacobiND[z, m] -> nd, JacobiSC[z, m] -> sc, JacobiCS[z, m] -> cs,
       EllipticE[JacobiAmplitude[z, m], m] -> EA,
       EllipticF[JacobiAmplitude[z, m], m] -> z} /.
     (* use only sn, cn, and dn *)   
     {cd -> cn/dn, dc -> dn/cn, ns -> 1/sn, sd -> sn/dn, nc -> 1/cn,  
      ds -> dn/sn, nd -> 1/dn,  sc -> sn/cn, cs -> cn/sn}

We eliminate EA=E(am(z|m)|m) and obtain the following expression.

eqs2 = Factor[Numerator[Together[eqs1[[2]] /. Solve[eqs1[[1]] == 0, EA][[1]]]]]

Ignoring the irrelevant factors m and m-1, we arrive at the following expression containing the a square root. By squaring, we eliminate this square root.

(eqs3 = Factor[((eqs2[[-1]] + #)^2 - #^2)&[
               2 cn^2 dn^3 Sqrt[1 - m sn^2] d[1]]]) // Short[#, 4]&

The remaining expression contains the three Jacobi functions sn(z|m), cn(z|m), and dn(z|m) polynomially. We use the two fundamental quadratic relations between the three functions to eliminate cn(z|m), and dn(z|m).

Variables[eqs3]

(eqs4 = Expand[eqs3 /. {cn -> Sqrt[1 - sn^2], 
                        dn -> Sqrt[1 - m sn^2]}]) // Short[#, 4]&

Squaring one more time to eliminate the square roots yields a product of two polynomials in the Jacobi function sn(z|m) and its derivatives.

(eqs5 = Factor[Expand[((eqs4 - #)^2 - #^2)&[Plus @@
               Cases[eqs4, __ Power[_, 1/2]]]]]) // Short[#, 4]&

A quick numerical check shows that the first factor contains the differential equation we were looking for.

eqs6 = (List @@ eqs5) /. {sn -> w[m], d[j_] :> Derivative[j][w][m]};

eqs6 /. w -> (JacobiSN[z, #]&) /. {z -> 1/Pi, m -> 1/E} // N[#, 100]&

Here is the resulting differential equation.

Collect[eqs6[[1]], {w''[m], w'[m]}, Factor] // TraditionalForm

Because the differential equation in quadratic in the second derivative, we could differentiate it with respect to m and obtain a differential equation linear in the highest derivative. Such a differential equation allows for an easy numerical solution (no choice of the branch of a root has to be made). The function sn(z|m) is a meromorphic function of m for any z [✶].