Finding the value of given integral The given integral is :$$\displaystyle\int_0^1 \dfrac{\sin{\theta}(\cos^2{\theta} -\cos^2{\frac{\pi}{5}})(\cos^2{\theta} -\cos^2{\frac{2\pi}{5}})}{\sin{5\theta}} \, d\theta$$
I tried solving it with some trigonometric identities but comes out it does not work here.
However solution given starts with these equations mentioned down below and later they substituted $z= \cos{\theta}+ i\sin(\theta)$
$$\begin{array}{r}
z^{10}-1=\left(z^2-1\right)\left[z^2-2 \cos \left(\frac{\pi}{5}\right) z+1\right]\left[z^2-2\left(\cos \frac{2 \pi}{5}\right) z+1\right] \\
\quad \times\left(z^2-2 \cos \frac{4 \pi}{5} z+1\right)\left(z^2-2 \cos \frac{6 \pi}{5} z+1\right)
\end{array}$$
$$\begin{aligned}
z^5-\frac{1}{z^5}=\left(z-\frac{1}{z}\right) &\left(z-2 \cos \frac{\pi}{5}+\frac{1}{z}\right)\left(z-2 \cos \frac{2 \pi}{5}+\frac{1}{z}\right) \\
& \times\left(z-2 \cos \frac{4 \pi}{5}+\frac{1}{z}\right)\left(z-2 \cos \frac{6 \pi}{5}+\frac{1}{z}\right)
\end{aligned}$$
Can anyone help me understand how I can derive these equations and use them here in this integral?
Thank you for your help.
 A: Note that
$$\begin{aligned}
z^5-\frac{1}{z^5}
=&\ \left(z-\frac{1}{z}\right)\left(z-2 \cos \frac{\pi}{5}+\frac{1}{z}\right)\left(z-2 \cos \frac{2 \pi}{5}+\frac{1}{z}\right) \\
& \>\>\> \times\left(z+2 \cos \frac{2 \pi}{5}+\frac{1}{z}\right)\left(z+2 \cos \frac{\pi}{5}+\frac{1}{z}\right)\\
\end{aligned}$$
Then, set $z=e^{i\theta}$ to get
$$\begin{aligned}
\sin5\theta=&\ \sin\theta\left(2\cos\theta -2 \cos \frac{\pi}{5}\right)\left(2\cos\theta -2 \cos \frac{2 \pi}{5}\right) \\
& \>\>\>\times\left(2\cos\theta+2 \cos \frac{\pi}{5}\right)\left(2\cos\theta+2 \cos \frac{2 \pi}{5}\right)\\
=&\ 16\sin{\theta}\left(\cos^2{\theta} -\cos^2{\frac{\pi}{5}}\right)\left(\cos^2{\theta} -\cos^2{\frac{2\pi}{5}}\right)
\end{aligned}$$
Thus
$$\int_0^1 \dfrac{\sin{\theta}(\cos^2{\theta} -\cos^2{\frac{\pi}{5}})(\cos^2{\theta} -\cos^2{\frac{2\pi}{5}})}{\sin{5\theta}} \, d\theta
= \int_0^1 \frac1{16}d\theta = \frac1{16}$$
A: First you should simplify the term and then bild the antiderivative, what is really easy after simplifying the term:
$$
\begin{align*}
y &= \int_{0}^{1} \dfrac{\sin{\theta}(\cos^2{\theta} -\cos^2{\frac{\pi}{5}})(\cos^2{\theta} -\cos^2{\frac{2\pi}{5}})}{\sin{5\theta}} ~\operatorname{d}\theta\\
F(\theta) &= \int_{0}^{\theta} \dfrac{\sin{\theta}(\cos^2{\theta} -\cos^2{\frac{\pi}{5}})(\cos^2{\theta} -\cos^2{\frac{2\pi}{5}})}{\sin{5\theta}} ~\operatorname{d}\theta = \int_{0}^{\theta} f(\theta) ~\operatorname{d}\theta\\
f(\theta) &= \dfrac{\sin{\theta}(\cos^2{\theta} -\cos^2{\frac{\pi}{5}})(\cos^2{\theta} -\cos^2{\frac{2\pi}{5}})}{\sin{5\theta}}\\
f(\theta) &= \dfrac{1}{16}\\
F(\theta) &= \int_{0}^{\theta} \dfrac{1}{16} ~\operatorname{d}\theta\\
F(\theta) &= \dfrac{\theta}{16}\\
y &= \int_{0}^{1} \dfrac{\sin{\theta}(\cos^2{\theta} -\cos^2{\frac{\pi}{5}})(\cos^2{\theta} -\cos^2{\frac{2\pi}{5}})}{\sin{5\theta}} ~\operatorname{d}\theta = F(1) - F(0)\\
F(1) - F(0) &= \dfrac{1}{16} - \dfrac{0}{16}\\
F(1) - F(0) &= \dfrac{1}{16} - 0\\
F(1) - F(0) &= \dfrac{1}{16}\\
F(1) - F(0) &= 0.0625\\
\end{align*}
$$
$$ 
\int_{0}^{1} \dfrac{\sin{\theta}(\cos^2{\theta} -\cos^2{\frac{\pi}{5}})(\cos^2{\theta} -\cos^2{\frac{2\pi}{5}})}{\sin{5\theta}} ~\operatorname{d}\theta = 0.0625\\ $$
If you can't simplefy it, you also would be able to integrate it without simplefying it but that's way more complex and unambiguously.
A: Note
$$ \sin(5\theta)=\sin \theta(1+2\cos2\theta+2\cos4\theta), \cos^4\theta=\frac18(3+4\cos2\theta+\cos4\theta) $$
from here.
Using
$$ \cos^2{\frac{\pi}{5}}+\cos^2{\frac{2\pi}{5}}=\frac{3}{4}, \cos^2{\frac{\pi}{5}}\cos^2{\frac{2\pi}{5}}=\frac{1}{16} $$
one has
\begin{eqnarray}
&&(\cos^2{\theta} -\cos^2{\frac{\pi}{5}})(\cos^2{\theta} -\cos^2{\frac{2\pi}{5}})\\
&=&\cos^4\theta-(\cos^2{\frac{\pi}{5}}+\cos^2{\frac{2\pi}{5}})\cos^2\theta+\cos^2{\frac{\pi}{5}}\cos^2{\frac{2\pi}{5}}\\
&=&\cos^4\theta-\frac34\cos^2\theta+\frac1{16}\\
&=&\frac18(3+4\cos2\theta+\cos4\theta)-\frac34\frac{1+\cos2\theta}{2}+\frac1{16}\\
&=&\frac1{16}(1+2\cos2\theta+2\cos4\theta)
\end{eqnarray}
and hence
$$\int_0^1 \dfrac{\sin{\theta}(\cos^2{\theta} -\cos^2{\frac{\pi}{5}})(\cos^2{\theta} -\cos^2{\frac{2\pi}{5}})}{\sin{5\theta}} \, d\theta
= \int_0^1 \frac1{16}d\theta = \frac1{16}$$
