TITLE: How to calculate $\int_{0}^{\pi/2}x^2\sqrt{\cos (x)}dx$
QUESTION [5 upvotes]: I've tried everything. I made $x = \pi / 2 - y$. I looked up the questions here on MSE and did not see anything similar.
I thought I'd use complex variables, but I do not even know where to start.

REPLY [5 votes]: Just for the fun of it !
Since Dahaka provided a splendid and exact solution, I have been wondering what would give the approximation
$$\cos(x) \simeq\frac{\pi ^2-4x^2}{\pi ^2+x^2}\qquad (-\frac \pi 2 \leq x\leq\frac \pi 2)$$ So, considering
$$I=\int_0^{\frac \pi 2}x^2 \sqrt{\frac{\pi ^2-4 x^2}{x^2+\pi ^2}}\,dx$$ the antiderivative expresses in terms of elliptic integrals but, using bounds, we get the simple
$$I=\frac{ \pi ^3}{6} \left(9 E\left(-\frac{1}{4}\right)-10
   K\left(-\frac{1}{4}\right)\right)\approx 0.71832$$ which is in error by $0.14$%.