Proving a reduction formula. $\cos^n (2x)$ Establish a reduction formula for $$\int \cos^n (2x)dx$$
My attempt,
Let $I_n=\int \cos^n 2x dx$
$=\int \cos^{n-1}2x (\cos 2x dx)$
Let$$u=\cos^{n-1}2x$$
$$du=-2(n-1)\cos^{n-2}2x (\sin 2x)dx$$
$$df=\cos 2x dx$$
$$f=\frac{1}{2}\sin 2x$$
So that, $=\cos^{n-1}2x (\frac{1}{2}\sin 2x)+2 \int (n-1)\cos^{n-2}2x \sin2x \frac{1}{2}\sin2xdx$
$2I_n=\sin2x \cos^{n-1}2x+2(n-1)I_{n-2}\sin^2 2x$
Is it correct? But the given answer is $2I_n=2(n-1)I_{n-2}+\sin 2x \cos^{n-1}2x$
 A: The following is NOT true:
$$2\int (n-1)\cos^{n-2}2x\sin 2x\frac 1 2\sin 2x dx=(n-1)\left(\int \cos^{n-2}2xdx\right)\sin^2 2x$$
You can not take functions out of an integral like that. The problem is that you took $\sin^2 2x$ out of the integral even though that includes $x$ in it.
Now, let's go back to before the mistake:
$$\cos^{n-1}2x \left(\frac{1}{2}\sin 2x\right)+2 \int (n-1)\cos^{n-2}2x \sin2x \frac{1}{2}\sin2xdx$$
Take the $\frac{(n-1)}{2}$ out of the integral and simplify both outside and inside the integral:
$$\frac 1 2\cos^{n-1}2x\sin 2x+(n-1)\int\cos^{n-2}2x \sin^2 2xdx$$
Now, $\sin^2 2x=(1-\cos^2 2x)$. Distribute:
$$\frac 1 2\cos^{n-1}2x\sin 2x+(n-1)\int(\cos^{n-2}2x-\cos^n 2x)dx$$
Separate the integral apart:
$$\frac 1 2\cos^{n-1}2x\sin 2x+(n-1)\int\cos^{n-2}2x dx-(n-1)\int\cos^n 2x dx$$
State this in terms of $I_{n-2}$ and $I_n$:
$$I_n=\frac 1 2\cos^{n-1}2x\sin 2x+(n-1)I_{n-2}-(n-1)I_n$$
Add both sides by $(n-1)I_n$:
$$nI_n=\frac 1 2\cos^{n-1}2x\sin 2x+(n-1)I_{n-2}$$
Divide both sides by $n$ and multiply by $2$:
$$2I_n=\frac 1 n\cos^{n-1}2x\sin 2x+2\frac{(n-1)}{n}I_{n-2}$$
I know that this isn't the answer that you were given, but since it's similar to your answer and this answer to a similar problem on Wikipedia, so I think it's right. However, please tell me about any mistakes you find here. Thanks!
