Integration – Solving an Interesting Trigonometric Integral

contest-mathdefinite integralsintegrationtrigonometric-integrals

Yesterday I took part in an entry competition to one of the MSc programs in my university, and during one of the mathematical tests, I had to solve some integral and differential equations.

One of those integrals had the following trigonometric form:
$$
I(0,\pi)= \int\limits_0^\pi\left[\cos^2(\cos(x))+\sin^2(\sin(x))\right]dx
$$

Unfortunately, I didn’t manage to solve it analytically during the test, but later, as I came home, I tried to evaluate it numerically using Mathematica. As it turned out, the answer seems to be $I(0,\pi)=\pi$.

Still, I do not understand what transformations or substitutions I had to perform so that to solve this problem analytically during the exam. This is exactly the reason, I am posting my question here, as I haven’t found this kind of problem even posted or solved anywhere yet, and so I am kindly asking for any help to attempt this integral analytically.

Thank you in advance!

Best Answer

\begin{align*} I&= \int_0^\pi \cos^2\cos x+\sin^2\sin x \, dx\\ &= 2\int_0^{\pi/2} \cos^2\cos x+\sin^2\sin x \, dx\\ &= 2\int_0^{\pi/2} \cos^2\sin x+\sin^2\cos x \, dx \quad(x\mapsto\pi/2-x)\\ \end{align*} Hence $$ 2I=2\int_0^{ \pi/2 } 2\, dx\Rightarrow I=\pi $$ from summing the last two lines.