(i) Show that $$\int_{-\pi/2}^{\pi/2}e^x\cos x\,\mathrm dx
=\frac12(e^{\pi/2}+e^{-\pi/2}).$$ [4]
For $n\geqslant0$, let $$I_n=\int_{-\pi/2}^{\pi/2}e^{2x}\cos^nx\,\mathrm dx.$$
(ii) Show that, for $n\geqslant2$, $$4I_n=n(n-1)\int_{-\pi/2}^{\pi/2}e^{2x}\sin^2x\cos^{n-2}x\,\mathrm dx-nI_n,$$ and deduce $$(n^2+4)I_n=n(n-1)I_{n-2}.$$ [6]
(iii) Use these results to find the $y$-coordinate of the centroid under $y=e^x\cos x$ on $[-\pi/2,\pi/2]$, to $3$ significant figures. [4]