Integrate $\int\frac{\sin^2(x)}{\cos^7(x)}dx$ Integrate $\int\frac{\sin^2(x)}{\cos^7(x)}\,dx$
I tried $\int\frac{\sin^2(x)}{\cos^2(x)}\cdot\frac{1}{\cos^5(x)}\,dx$
thean by replacing $\tan^2(x)=t\:\:$ I have $\:\:dx=2\cdot\frac{\sin(x)}{\cos^3(x)}$ but can't get so far with trig manipulations.
Need a bit help if possible :)
 A: hint
Write it as
$$\int \frac{\sin^2(x)}{\cos^8(x)}\cos(x)dx$$
$$=\int \frac{\sin^2(x)}{(1-\sin^2(x))^4}d(\sin(x))$$
$$=\int \frac{ t^2dt}{(1-t^2)^4}$$
$$=- \int (\frac{1}{(1-t^2)^3}-\frac{1}{(1-t^2)^4})dt$$
By parts,
$$\int \frac{dt}{(1-t^2)^n}=$$
$$\Bigl[\frac{t}{(1-t^2)^n}\Bigr]+2n\int \frac{1-t^2+1}{(1-t^2)^{n+1}}dt$$
A: Rewrite
$$\int\frac{\sin^2x}{\cos^7x}\,dx
= \int\frac{1-\cos^2x}{\cos^7x}\,dx
= \int \sec^7x dx - \int \sec^5x dx 
$$
and apply the recursive fomula
$$I_n= \int \sec^n x dx
=\frac1{n-1}\tan x\sec^{n-2}x +\frac{n-2}{n-1}I_{n-2}
$$
A: The first idea that I thought of is rewriting the numerator as $1-\cos^2x$; this shows that the integral is equivalent to
$$\int\frac{1-\cos^2x}{\cos^7x}dx=\int\sec^7x-\sec^5x~dx$$
Now, these integrals can be solved by using integration by parts, as follows.
$$\begin{align}\int\sec^7x~dx&=\int\sec^2x\cdot\sec^5x~dx=\sec^5x\tan x-\int 5\sec^5x\tan x\cdot\tan x~dx\\
&=\sec^5x\tan x-5\int\sec^5x\tan^2x~dx\\
&=\sec^5x\tan x-5\int\sec^5x(\sec^2x-1)~dx\\
&=\sec^5x\tan x-5\int\sec^7x~dx+5\int\sec^5x~dx\end{align}$$
and therefore
$$6\int\sec^7x~dx=\sec^5x\tan x+5\int\sec^5x~dx$$
and so on.
This is a pretty tedious method, and to be honest I much prefer hamam-Abdallah's answer.
