Compute the integral $\int_0^{\pi/2}\sin(1+\cos^2x)\mathrm{d}x $ My attempt.
$$\int\limits_0^{\pi/2}\sin(1+\cos^2x)\mathrm{d}x $$
Let $t=1+\cos^2x \Rightarrow \mathrm{d}t -2\sin x\cos x~ \mathrm{d}x. $
We have $\cos^2x=t-1 \Rightarrow \cos x=\sqrt{t-1}$ and $\sin x = \sqrt{2-t}.$ So $$\mathrm{d}x = \frac{-\mathrm{d}t}{2\sqrt{2-t}\sqrt{t-1}}$$
Now,
$$\frac{1}{2}\int\limits_1^2\frac{\sin t}{\sqrt{2-t}\sqrt{t-1}}\mathrm{d}t$$
I tried substituting by parts letting $u=\sin t$, and $dv = \int \mathrm{d}t/(\sqrt{(2-t)(t-1)})$. 
But the integral just gets more complicated.
 A: $$
I=\Im\int_{0}^{\pi/2}e^{i(1+\cos^2(x))}=\Im \left(e^{i\frac 32}\int_{0}^{\pi/2}e^{\frac i2\cos(2x)}\right)=\frac{1}{4}\Im\left( e^{i\frac 32}\int_{-\pi}^{\pi}e^{\frac i2\cos(x)}\right)\underbrace{=}_{(\star)}\frac{\pi}{2}J_0\left(\frac{1}{2}\right)\Im (e^{i\frac 32})=\frac{\pi}{2}J_0\left(\frac{1}{2}\right)\sin\left(\frac{3}{2}\right)
$$
where $J_0(z)$ is a Bessel function of the first type and equation $(\star)$ frollows from here
A: Use the integral representations of the Bessel function of the first kind at $0$, 
$$\int_{0}^{\pi/2}\cos\left(z\cos \theta\right)\,\mathrm{d}\theta=\frac{\pi}{2}J_0\left(z\right).$$ 
So, 
$$\begin{align*}
\int_0^{\frac{\pi}{2}}\sin\left(1+\cos^2x\right)\mathrm{d}x&=\int_0^{\frac{\pi}{2}}\sin\left(\frac{1}{2}\cos\left(2x\right)+\frac{3}{2}\right)\mathrm{d}x\\
&=\sin\left(\frac{3}{2}\right)\int_{0}^{\frac{\pi}{2}}\cos\left(\frac{1}{2}\cos\left(2x\right)\right)\mathrm{d}x+\cos\left(\frac{3}{2}\right)\underset{0}{\underbrace{\int^{\frac{\pi}{2}}_{0}\sin\left(\frac{1}{2}\cos\left(2x\right)\right)\mathrm{d}x}}\\
&=\frac{\pi}{2}\sin\left(\frac{3}{2}\right)J_0\left(\frac{1}{2}\right)
\end{align*}$$
A: I took an approach (below) but then dropped the idea to continue since the other answers were so neat and beautiful to follow and mine was a lot of work, which I shall complete at a later point of time (I hope at least). I hence write what I have so far below
\begin{align}
\int_0^{\pi/2}\cos^{2n}(2x)dx&=\int_0^{\pi/2}\cos^{2n}(x)dx\\
&=\frac12\text{Beta}(\frac12,n+\frac12)
\end{align}
hence \begin{align}
\int_0^{\pi/2}\sin(1+\cos^2x)\mathrm{d}x &=\int_0^{\pi/2}\sum_{m=0}^{\infty}\frac{(-1)^m(1+\cos^2x)^{2m+1}}{(2m+1)!}\mathrm{d}x\\
&=\sum_{m=0}^{\infty}\frac{(-1)^m}{(2m+1)!}\int_0^{\pi/2}(1+\cos^2x)^{2m+1}\\
&=\sum_{m=0}^{\infty}\frac{(-1)^m}{(2m+1)!}\int_0^{\pi/2} \sum_{j=0}^{2m+1}{2k+1\choose j} \cos^{2j}(x) \mathrm{d}x\\
&=\sum_{m=0}^{\infty}\frac{(-1)^k}{(2m+1)!}\sum_{j=0}^{2m+1}{2m+1\choose j}\int_0^{\pi/2}  \cos^{2j}(x) \mathrm{d}x\\
&=\sum_{m=0}^{\infty}\frac{(-1)^k}{(2m+1)!}\sum_{j=0}^{2m+1}{2m+1\choose j}\frac12\text{Beta}(\frac12,j+\frac12)\\
&=\sum_{m=0}^{\infty}\frac{(-1)^k}{(2m+1)!}\sum_{j=0}^{2m+1}{2m+1\choose j}\frac12\pi\frac{(2j-1)!!}{2^jj!}\\
&=\frac12\pi\sum_{m=0}^{\infty}\sum_{j=0}^{2m+1}\frac{(-1)^k}{(2m+1-j)!}\frac{(2j-1)!!}{2^jj!^2}\\
\end{align}
