Integral without numerical calculation of $ I = \int_{0}^{\frac{\pi}{2}} \frac{\sin\left(4\,\cos^2\theta\right)}{2}\,\text{d}\theta$ Given the integral:
$$ I = \int_{0}^{\frac{\pi}{2}} \frac{\sin\left(4\,\cos^2\theta\right)}{2}\,\text{d}\theta$$
thanks to the composite formula of Cavalieri-Simpson I managed to calculate $I = 0.16$ with an error $\epsilon < 0.01$. Could it be done in another way, avoiding numerical calculation? Thank you!
 A: Taking $z=e^{i\theta}$ after changing a bit the initial inetgral we aplly the Cauchy formula in the following, $$I = \int_{0}^{\frac{\pi}{2}} \frac{\sin\left(4\,\cos^2\theta\right)}{4}\,\text{d}\theta =  \int_{0}^{\pi} \frac{\sin\left(4\,\cos^2\theta\right)}{2}\,\text{d}\theta \\= \int_{-\pi}^{\pi} \frac{\sin\left(4\,\cos^2\theta\right)}{8}\,\text{d}\theta = \int_\gamma \frac{\sin\left(z+\frac{1}{z}\right)^2}{8iz}\,\text{d}z= \pi\frac{Res(f,0)}{4}$$
Where $$f(z)=\frac{\sin\left(z+\frac{1}{z}\right)^2}{z}=\frac{\sin\left(z^2+\frac{1}{z^2}+2\right)}{z}~~~~~ 
and ~~~\gamma=\{e^{it}:t\in (-\pi,\pi]\}$$

Note the singularity at $z=0$ is essential hence one should compute  the Laurent series of $f$  which will give the Residue. don't forget to use the Cauchy product involving taylor series of $\sin $ and $\cos$

at the end you will get:
$$Res(f,0) = \color{red}{\sin(2)\sum_{n\geq 0}\frac{(-1)^n}{n!^2}}$$
For detailed about this check this book

A: We write
$$
\sin(4\cos^2\theta)=\sin(2+2\cos(2\theta))=\sin 2\cos(2\cos(2\theta))+\cos 2\sin(2\cos(2\theta)).
$$
The second term is odd in the line $\theta=\pi/4$, so it gives no contribution to your integral. Thus
$$
\begin{aligned}
\int_0^{\pi/2}\frac{1}{2}\sin(4\cos^2\theta)\,d\theta
&=\frac{\sin 2}{2}\int_0^{\pi/2}\cos(2\cos(2\theta))\,d\theta\\
&=\frac{\sin 2}{4}\int_0^\pi\cos(2\cos(t))\,dt\\
&=\frac{\sin 2}{4}\pi J_0(2).
\end{aligned}
$$
Here, $J_0$ is the Bessel function of the first kind and of order zero.
