Hi this problem is posed in Sean M. Stewart's How to Integrate It book pg.143
$$K(k) = \int^{\pi/2}_0 \frac{du}{\sqrt{1-(k\sin{u})^2}}$$ where $ 0 \leq k < 1$
Based on the substitution:
$$ \tan{u} = \frac{\sin{2\theta}}{k+k\cos{2\theta}} =\frac{\tan{\theta}}{k} $$
Show that:
$$K(k) = \frac{1}{1+k}K\left(\frac{2\sqrt{k}}{1+k}\right)$$
$K(k) $ is some function defined in term of definite-integral called complete elliptic integral which is not easily computable, so attacking $K(k)$ gave no fruitful result.
Well then proceeding with substitution ( It is easy to lose track as it involved a lot of trigonometric manipulations )
I reduced the integral into this form : $$K(k) = k\int^{\pi/2}_0 \frac{\sec^2{\theta}d\theta}{\sqrt{k^2 + \tan^2{\theta}}\sqrt{k^2 + \tan^2{\theta} - k^2\tan^2{\theta}}}$$
Using substitution : $\tan{\theta} = p$
$$K(k) = k\int^{\infty}_0 \frac{dp}{\sqrt{k^2 +p^2}\sqrt{k^2 +p^2 - (kp)^2}}$$
To my naive eyes this looked manageable but WolframAlpha says otherwise.
Any hint or ideas on how to attack this problem?
I thought the trig manipulations to find a more suitable form but in the I end up transform $\sin {u}$ term into $\tan{u}$ to use the given substitution
EDIT: It has been suggested in commens that there is typo in the substituion(given in book) , it should be :
$$ \tan{u} = \frac{\sin{2\theta}}{k+\cos{2\theta}} $$
Here is my solution based on Paramanand Singh's hint:
Using the definite integral property :
$\int^{2a}_0 f(x) dx = 2\int^a_0 f(x)dx$ if $f(2a-x) = f(x)$
We change the limits to : Upper Limit $ = \pi$ and lower limit $= 0$ which will allow us to use the substitution given in the book [ $$ ]
$$K(k) = \int^{\pi/2}_0 \frac{du}{\sqrt{1-(k\sin{u})^2}} = \frac{1}{2}\int^{\pi}_0 \frac{du}{\sqrt{1-(k\sin{u})^2}} $$
As the substitution is in the form of $\tan u $ we will express the integrand in terms of $\tan u$
We arrive at :
$$\frac{1}{2}\int^{\pi}_0 \frac{\sec{u}du}{\sqrt{1 + \tan^2{u}-(k\tan{u})^2}} $$
Substituting : $\tan{u} = \frac{\sin{2\theta}}{k+\cos{2\theta}}$ [ $$ ]
$$\frac{1}{2}\int^{\pi}_0 \frac{(k+ \cos{2\theta})}{k\cos{2\theta} +1}\sec{u}du $$
Now,
$$\sec^2{u}du = \frac{2(k\cos{2\theta}+1)d\theta}{(k + cos{2\theta})} $$
Leading to a cleaner integral:
$$\int^{\pi/2}_0 \frac{d\theta}{(k+\cos{2\theta})\sec{u}}$$
As
$\sec u = \sqrt{1+ \tan^2{u}} = \frac{\sqrt{k^2 + 1 + 2k\cos{2\theta}}}{(k + \cos{2\theta})} = \frac{\sqrt{(k+1)^2 - 4k\sin^2{\theta}}}{(k + \cos{2\theta})} $
Integrand reduces to desired form:
$$ \int^{\pi/2}_0 \frac{d\theta}{\sqrt{(k+1)^2-(2\sqrt{k} \sin{\theta})^2}} $$
I think it is trivial to take from here to the desired form :)
[ $$ ] If you are coming here from the book, this problem passage had lot of minor typos, rely on this post as a reference.
For.eg
This is incorrect