How to manipulate integrals? How would one prove that 
$$\int_0^{\pi/2} e^{\sin x} \sin^2 x\, dx = 1/2\int_0^{\pi/2} e^{\sin x}  (1 + \sin x \cos^2 x)\, dx $$
 A: As $\displaystyle2e^{\sin x}\sin^2x=e^{\sin x}(1-\cos2x)=e^{\sin x}-e^{\sin x}\cos2x$
$$\int_0^{\frac\pi2}e^{\sin x}(2\sin^2x)\ dx=\int_0^{\frac\pi2}e^{\sin x}\ dx-\int_0^{\frac\pi2}e^{\sin x}\cos2x\ dx\  \ \ \  (1)$$
Now integrating by parts, $\displaystyle\int e^{\sin x}\cos2x\ dx=e^{\sin x}\int\cos2x\ dx-\left(\frac{d(e^{\sin x})}{dx}\cdot \int\cos2x\ dx\right)\ dx$
$\displaystyle=e^{\sin x}\cdot\frac{\sin2x}2-\int e^{\sin x}\cos x\cdot\frac{\sin2x}2\ dx $
$\displaystyle=\frac{e^{\sin x}\cdot\sin2x}2-\int e^{\sin x}\cos^2 x\sin x\ dx $
$\displaystyle\implies\int_0^{\frac\pi2}e^{\sin x}\cos2x\ dx$
$\displaystyle=\frac{e^{\sin x}\cdot\sin2x}2\large|_0^{\frac\pi2}-\int_0^{\frac\pi2}e^{\sin x}\cos^2 x\sin x\ dx$
$\displaystyle=-\int_0^{\frac\pi2}e^{\sin x}\cos^2 x\sin x\ dx$ as $\sin\pi=\sin0=0$
Put this value of $\displaystyle\int_0^{\frac\pi2}e^{\sin x}\cos2x\ dx$ in $(1)$
A: Let $I$ and $J$ denote the left-hand and right hand integrals respectively. Observe that:
\begin{eqnarray*}
J &=& 1/2\int_0^{\pi/2} e^{\sin x}\ dx + 1/4\int_0^{\pi/2} e^{\sin x} \cos x \cdot \sin 2x\ \ dx\\
&=& 1/2\int_0^{\pi/2} e^{\sin x}\ dx + 1/4\left(\underbrace{\left[ e^{\sin x}\sin 2x \right]_0^{\pi/2}}_{=\ 0} - \int_0^{\pi/2} e^{\sin x} \cdot \underbrace{2\cos 2x}_{=\ 2(1-2\sin ^2x) } dx\right) & \text{(via parts)}\\
&=& 1/2\int_0^{\pi/2} e^{\sin x}\ dx  -1/4\int_0^{\pi/2} 2e^{\sin x}\ dx +1/4 \int_0^{\pi/2}4 e^{\sin x} \sin^2x \ dx\\
&=& \int_0^{\pi/2} e^{\sin x} \sin^2 x\, dx\\
\\
\\
\\
&=& I
\end{eqnarray*}
