<s>[INST] Evaluate $\int_0^{\frac{\pi}{4}} \left( \frac{\sin^2{(5x)}}{\sin^2{x}} -\frac{\cos^2{(5x)}}{\cos^2{x}} \right)\mathop{dx}$ Evaluate $$\int_0^{\frac{\pi}{4}} \left( \frac{\sin^2{(5x)}}{\sin^2{x}} -\frac{\cos^2{(5x)}}{\cos^2{x}} \right)\mathop{dx}$$
I tried substitutions like $u=\frac{\pi}{4}-x$, and trig identities like $\cos^2{x}=1-\sin^2{x}$ after getting a common denominator.
$$4\int_0^{\frac{\pi}{4}} \frac{\sin^2{(5x)\cos^2{x}-\cos^2{(5x)}\sin^2{x}}}{\sin^2{(2x)}} \mathop{dx}$$
Where should I go from here?  Any help is appreciated!
 [/INST] De Moivre's law says that:
$(\cos x + i\sin x)^5 = \cos 5x + i\sin 5x$
To find $\cos 5x, \sin 5x$ we just need to separate the real and imaginary parts of the left hand side.
$\cos^5 x + 5i\cos^4x\sin x - 10\cos^3x \sin^2x - 10i\cos^2x\sin^3 x+ 5\cos x\sin^4x + i\sin^5 x$
$\cos 5x = \cos^5x - 10\cos^3x\sin^2x + 5\cos x\sin^4x\\
\sin 5x = 5\cos^4x\sin x - 10\cos^2x\sin^3x + \sin^5x$
$\frac {\cos^2 5x}{\cos^2 x} = (\cos^4 x - 10\cos^2 x\sin^2 x + 5\sin^4 x)^2\\
\frac {\sin^2 5x}{\sin^2 x} = (\sin^4 x - 10\cos^2 x\sin^2 x + 5\cos^4 x)^2$
</s>