(* Elliptic Integral 1. Kind *)
F[x_, k_] := f[x, Sqrt[k]];
(* Jacobi Amplitude *)
Am[x_, k_] := π/(2 K[Sqrt[k]]) x + 2 \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(n = 1\), \(5\)]
\*FractionBox[\(
\*SuperscriptBox[\(q[
\*SqrtBox[\(k\)]]\), \(n\)] Sin[2\ n\ ξ[x,
\*SqrtBox[\(k\)]]]\), \(n \((1 +
\*SuperscriptBox[\(q[
\*SqrtBox[\(k\)]]\), \(2 n\)])\)\)]\);
(* Jacobi Elliptic Function *)
Dn[x_, k_] := Sqrt[1 - k Sin[Am[x, k]]^2];
(* Definitions *)
f[f_, k_] := \!\(
\*SubsuperscriptBox[\(\[Integral]\), \(0\), \(f\)]\(
\*FractionBox[\(1\),
SqrtBox[\(1 -
\*SuperscriptBox[\(k\), \(2\)]\
\*SuperscriptBox[\(Sin[u]\), \(2\)]\)]] \[DifferentialD]u\)\);
K[k_] := f[π/2, k];
q[k_] := Exp[(-π K[Sqrt[1 - k^2]])/K[k]];
ξ[x_, k_] := (π x)/(2 K[k]);