Integrating $\int \left( \frac{\cos\theta}{1+\sin^2\theta} \right)^n \, d\theta$, for $n=2$ and $n=3$ How do you integrate the following functions:
$$\int \left( \frac{\cos\theta}{1+\sin^2\theta} \right)^2 \, d\theta$$ and $$\int \left( \frac{\cos\theta}{1+\sin^2\theta} \right)^3 \, d\theta 
$$
respectively?
Note: Initially, I tried integrating the function without the power and obtained the result below. 
$$
\int \frac{\cos\theta}{1+\sin^2\theta} \, d\theta = \arctan(\sin\theta)+ C
$$
However, from here it is difficult to proceed. Integration by substitution doesn't seem to work.
How should I go on from here? Any pointers would be greatly appreciated. 

The latter integral may be done by substituting $\tan{\phi} = \sin{\theta}$; the result is the integral
$$\int d\theta \left ( \frac{\cos{\theta}}{1+\sin^2{\theta}}\right)^3 = \int d\phi\, (\cos^4{\phi}-\cos^2{\phi} \sin^2{\phi})$$
which I trust is an improvement.
