I've come across the following integral while studying the motion of a steady 2D fluid with stream function cos(x)cos(y), the flow of which involves Jacobi elliptic functions [sn, cn, dn]. I'm hoping there's a relatively simple expression for it in terms of $k$, but I don't know enough about elliptic function tricks to evaluate it, and it's not in any handbook I could find (Gradshteyn-Ryzhik 6th ed. or the Handbook of Elliptic Integrals for Scientists and Engineers by Byrd and Friedman).
$$ J(k) := \int_0^{K(k)} \Big[ sn(u,k) dn(u,k) - cn(u,k) zn(u,k)\Big]^2 \, du.$$ Here $zn(u,k)$ is the Jacobi zeta function. By some symmetry it's a quarter of the complete integral around a full period.
I think this can be related to the Jacobi theta functions as follows (using Gradshteyn-Ryzhik p. xxxiv): $$ J(k) = \frac{\pi\sqrt{1-k^2}}{2kK(k)} \int_0^{\pi/2} \frac{\vartheta_2'(\phi)^2}{\vartheta_4(\phi)^2} \, d\phi,$$ which again is a quarter of the integral over a full period.
Maple can't evaluate either one, although it can plot the function $J(k)$ numerically. Any help would be much appreciated; it's for a research paper I'm writing.