Jacobi elliptic functions create a new trigonometry that we don't teach in high schools.
Taking the derivative of composite functions of these functions with elementary functions is easy thanks to chain rule. But, evaluating the integrals of these composites are considerablyly more difficult compared to trigonemetric integrals.
As an example I tried to evaluate the indefinite integral of $(sn(u,k))^2$ which I saw in MO.
I will surpass the second argument $k$ in the notation of functions.
$\begin{align} \int sn^2u\,du&=\int\frac{1-dn^2u}{k^2}du\\ &=\int\left(\frac{1}{k^2}-\frac{dn u}{cn u}cn u dn u\right)du\\ &=\frac{u}{k^2}-\frac1{k^2}\int\frac{\sqrt{1-k^2sn^2u}}{\sqrt{1-sn^2u}}cn u dn u\,du\\ &\stackrel{snu=\sin v}{=}\frac{u}{k^2}-\frac1{k^2}\int\sqrt{1-k^2\sin^2v}dv\\ &=\frac{u}{k^2}-\frac1{k^2}E(v)+c\\ &=\frac{u-E(\arcsin snu)}{k^2}+c \end{align}$ where $E(\phi)=\int_0^{\phi}{\sqrt{1-k^2\sin^2\phi}}\,d\phi$ is the incomplete Elliptic integral of the second kind.
Is my evaluation correct? Is there another way to evaluate this integral?
Note: For $k=0$, the integral is indeterminate form $0/0$. Can we apply the L'Hospital rule twice to find the trigonometric integral $$\int\sin^2udu=\frac{u-\sin u\cos u}2+c.$$ I am confused here. Can you help me solve this mystery at $k=0$?