On deriving the arclength of a hyperbola

In my attempts to derive the closed form for the arclength of the hyperbola, I wound up with the following integral:

$$\int\frac{\sqrt{1-m\;\sin^2 u}}{\sin^2 u}\mathrm{d}u$$

I am aware that such integrals are expressible as combinations of elliptic integrals and trigonometric functions, and Mathematica does return a result containing elliptic integrals. However, the result I got from Mathematica seems to suggest that the original integrand was split like so:

$$\frac{\sqrt{1-m\;\sin^2 u}}{\sin^2 u}=\frac{1-m}{\sqrt{1-m\;\sin^2 u}}-\sqrt{1-m\;\sin^2 u}+\frac{\csc^2u-m\;\sin^2 u}{\sqrt{1-m\;\sin^2 u}}$$

and then integrated to yield the expression containing the elliptic integrals.

What I'm stuck with is how this splitting was thought of so that the final integral is expressible in terms of the Legendre elliptic integrals. A possible clue lay in the fact that through an appropriate substitution, the original integral can be expressed as

$$\int\mathrm{ds}^2(v|m)\mathrm{d}v$$

where $\mathrm{ds}(v|m)=\frac{\mathrm{dn}(v|m)}{\mathrm{sn}(v|m)}$ is a Jacobian elliptic function, from which this formula applies. However, I don't know how the formula listed in the DLMF was derived, and I suspect that the answer to my question will also explain that formula.

I would appreciate any help in understanding why the integrand was split in that manner.

Update:

Trivially,

$$\mathrm{ds}^2(v|m)=\mathrm{ns}^2(v|m)-m=1-m+\mathrm{cs}^2(v|m)$$

The elliptic integral of the second kind is supposed to arise due to the fact that

$$\int\mathrm{dn}^2(v|m)\mathrm{d}v$$

$$=\int\mathrm{dn}(v|m)\mathrm{d}(\mathrm{am}(v|m))$$

$$=\int\sqrt{1-m\;\mathrm{sn}^2(v|m)}\mathrm{d}(\mathrm{am}(v|m))$$

$$=\int\sqrt{1-m\;\sin^2(\mathrm{am}(v|m))}\mathrm{d}(\mathrm{am}(v|m))$$

$$=E(\mathrm{am}(v|m)|m)$$

so I suppose figuring out how to integrate the squares of any of $\mathrm{cs}$, $\mathrm{ns}$, or $\mathrm{ds}$ would do the trick. I suspect something like integration by parts or tricks similar to those used for integrating ratios of trigonometric functions would work here, but I can't seem to find the proper strategy.

Yet another way would be to show that

$$-\int\left(\mathrm{cs}^2(v|m)+\mathrm{dn}^2(v|m)\right)\mathrm{d}v=\mathrm{cs}(v|m)\mathrm{dn}(v|m)$$

Differentiating the RHS gives the integrand, but supposing I did not know this expression, how would this integral be evaluated?

-
M.: Have you seen the presentation in sections 60-61 in Cayley's book –  Bill Dubuque Oct 19 '10 at 16:07
M.: Also another very useful reference is Markushevich: The remarkable sine functions, which is accessible via the usual ebook databases (e.g. gigapedia). –  Bill Dubuque Oct 19 '10 at 16:23
I can't see the Google link to Cayley's book, but the Markushevich books is available in the nearby library, and I shall take a good look at it in the morning. Thanks @Bill! –  Ｊ. Ｍ. Oct 19 '10 at 16:45
M.: You can contact me at my first.lastname at gmail.com and I'll be happy to help you get the pertinent pages. Cayley's book is freely downloadable here, so you may be facing restrictions based on your IP address. –  Bill Dubuque Oct 19 '10 at 16:59

Using the substitution $x=\sin(u)$, you get your problem in the form $\int\!dx\, \frac{\sqrt{(1-mx^2)(1-x^2)}}{x^2 (1-x^2)}$.

Legendre studied the problem of solving integrals which involve rational functions of $x$ and the square root of a polynomial of degree less or equal four in $x$. You will find a recipe on the page http://everything2.com/title/elliptic+integral+standard+forms. Following the argument, noting that in your case $A=0, B=1, C=x^2-x^4, D=1, R=(1-mx^2)(1-x^2)$, you will obtain the result as a function of the three elliptic integrals.

-

Observe this formulas:

$$\sin^2 u = \frac{1 - \cos 2u}{2}$$

$$\cos^2 u = \frac{1 + \cos 2u}{2}$$

Then:
$$\int \frac{1}{1 - \cos 2u} \, du = - \frac{\cot u}{2}$$

Using of this formulas and partial integration formula you can easily get last part of the answer.