<s>[INST] Finding $\int\frac{1}{(1+\sin^2\theta)^{\frac{3}{2}}}d\theta$ 
Finding $$\int\frac{1}{(1+\sin^2\theta)^{\frac{3}{2}}}d\theta$$

Try: $$I=\int\frac{1}{(1+\sin^2\theta)^{\frac{3}{2}}}d\theta =2\sqrt{2}\int \frac{1}{(3-\cos 2\theta)^{\frac{3}{2}}}d\theta$$
How can I write this in terms of the elliptic integral? Could someone help me to explain it? Thanks
 [/INST] As stated by SmarthBansal in the comments, this can be described as an Incomplete Elliptic Integral of the Third Kind, defined as 
$$\Pi(n;\phi,m)=\int_0^\phi \frac{1}{1-n\sin^2(\theta)}\frac{1}{\sqrt{1-m\sin^2(\theta)}} d\theta$$
So we can write this integral as $\Pi(-1,x|-1)$. However, this is not a very satisfying answer, which I believe is why SmarthBansal mentioned this as a comment. Jack D'Aurizio mentions another solution in terms of the Incomplete Elliptic Integral of the Second Kind, defined as
$$E(\phi, m)=\int_0^\phi \sqrt{1-m\sin^2(\theta)} d\theta$$
These two solutions can be reconciled by an elegant relation, namely, 
$$E(\phi, m) = (1-m) \Pi(m;\phi ,m) + \frac{m \sin(2\phi)}{2\sqrt{1-m\sin^2(\phi)}}$$
Now let's derive that equation! If we start with the left side of the equation we get,
$$
\int_0^\phi \sqrt{1-m\sin^2(\theta)}d\theta  
= \int_0^\phi \frac{(1-m\sin^2(\theta))^2}{(1-m\sin^2(\theta))^{3/2}}d\theta $$$$
=\int_0^\phi \frac{1- 2 m \sin^2(\theta)+m^2 \sin^4 (\theta)}{(1-m\sin^2(\theta))^{3/2}}d\theta $$$$
=\int_0^\phi \frac{1-m}{((1-m\sin^2(\theta))^{3/2})}d \theta + m\int_0^\phi \frac{\cos^2(\theta)-\sin^2(\theta)+m\sin^4(\theta)}{(1-m\sin^2(\theta))^{3/2}}d\theta$$$$
=(1-m)\Pi(m; \phi, m) + m\int_0^\phi \frac{(\cos^2(\theta)-\sin^2(\theta))(1-m\sin^2(\theta)) + m \sin^2(\theta)\cos^2(\theta)}{(1-m\sin^2(\theta))^{3/2}}d\theta$$$$
=(1-m)\Pi(m; \phi, m) + m\int_0^\phi \frac{(\cos(2\theta))(1-m\sin^2(\theta)) + m\sin(2\theta)\sin(\theta)\cos(\theta)}{(1-m\sin^2(\theta))^{3/2}}d\theta$$
Now dividing each side by $(1-m\sin^2(\theta))^{1/2}$, we can use the "reverse quotient rule" to get
$$=(1-m)\Pi(m; \phi, m) + \frac{m}{2}\int_0^\phi \frac{2\cos(2\theta)\sqrt{1-m\sin^2(\theta)} - \sin(2\theta)\frac{-2m\sin(\theta)\cos(\theta)}{\sqrt{1-m\sin^2(\theta)}}}{(1-m\sin^2(\theta))}d\theta$$
$$=(1-m) \Pi(m;\phi ,m) + \frac{m}{2} \frac{\sin(2\phi)}{\sqrt{1-m\sin^2(\phi)}}$$
Thus we have our relationship, and solving for $\Pi(m; x, m)$, we get
$$\Pi(m;\phi ,m)= \frac{E(\phi,m)}{1-m} - \frac{m\sin(2\phi)}{2(1-m)\sqrt{1-m\sin^2(\phi)}}$$
And plugging in $m=-1$, we get
$$\int \frac{1}{(1+\sin^2(\theta))^{3/2}}d\theta= \Pi(-1;\phi ,-1)= \frac{E(\phi,-1)}{2} + \frac{\sin(2\phi)}{4\sqrt{1+m\sin^2(\phi)}}$$
</s>