Calculate integral $\int_0^{\pi/2} \frac{\cos^3x}{\sin^2x + \cos^3x}dx$.

Solution 1:

Rewrite the integral with $t=\tan\frac x2$ $$I=\frac\pi2-\int_0^{\pi/2} \frac{\sin^2x}{\sin^2x + \cos^3x}dx =\frac\pi2 +8 \int_0^1 \frac{t^2}{t^6-7t^4-t^2-1} dt$$ Note that $t^6-7t^4-t^2-1$ is cubic in $t^2$, with one real root $r=7.159$ (analytically solvable with the Cadano’s formula). Then, factorize $$ t^6-7t^4-t^2-1 =(t^2-r)[t^4+(r-7)t^2+1/r]$$ and partially-fractionalize the integrand to proceed

\begin{align} I &= \frac\pi2+ \frac8{2r^3-7r^2+1}\int_0^1 \left( \frac{r^2}{t^2-r} +\frac{1-r^2t^2}{ t^4+(r-7)t^2+1/r}\right) dt\\ &= \frac\pi2 +\frac8{2r^3-7r^2+1} \left(- r^{3/2}\coth^{-1} \sqrt{r} -\frac{r^2-\sqrt r}{2\sqrt{ \frac2{\sqrt r}+r-7 }} \cot^{-1} \frac{\frac1{\sqrt r} -1}{\sqrt{ \frac2{\sqrt r}+r-7 }}\\ + \frac{r^2+\sqrt r}{ 2\sqrt{ \frac2{\sqrt r}-r+7 }}\coth^{-1} \frac{\frac1{\sqrt r} +1}{\sqrt{ \frac2{\sqrt r}-r+7 }}\right)\\ \end{align} where, as mentioned above $$r= \frac13\left( 7 + \sqrt[3]{388 +12\sqrt{69}}+ \sqrt[3]{388 -12\sqrt{69}}\right) $$

Solution 2:

This integral does have a closed form despite being very messy. We have \begin{align}I&=\int_0^{\pi/2} \frac{\cos^3x}{\sin^2x + \cos^3x}\,dx\\&=\frac14\int_{-\pi}^\pi\frac{\cos^3(u/2)}{\sin^2(u/2)+\cos^3(u/2)}\,du\\&=\frac14\oint_{|z|=1}\frac{\frac18(z^{1/2}+z^{-1/2})^3}{-\frac14(z^{1/2}-z^{-1/2})^2+\frac18(z^{1/2}+z^{-1/2})^3}\frac{dz}{iz}\\&=-\frac i4\oint_{|z|=1}\frac{(z+1)^3}{z((z+1)^3-2z^{1/2}(z-1)^2)}\,dz.\end{align} Note that $(z+1)^3-2z^{1/2}(z-1)^2=(w^2+1)-2w(w^2-1)^2=\prod\limits_{i=1}^6(w-z_i)$ where $z_1=\overline{z_2}$, $z_3=\overline{z_4}$ and $z_5=\overline{z_6}$. Hence $$I=-\frac i4\cdot2\pi i\left(\operatorname{Res}(f,0)+\sum_{i=1}^6\operatorname{Res}(f,z_i^2)\right)=\frac\pi2\left(1+\sum_{i=1}^6\operatorname{Res}(f,z_i^2)\right).$$ An interesting property about this polynomial is that it is symmetric about its coefficients \begin{align}(w^2+1)-2w(w^2-1)^2&=w^6-2w^5+3w^4+4w^3+3w^2-2w+1\\&=w^3(w^3-2w^2+3w+4+3w^{-1}-2w^{-2}+w^{-3}).\end{align} This means we can make the substitution $w=v+1/v$ to obtain a cubic equation which is solvable in radicals, as in @Quanto's answer.

Solution 3:

A Physicist's Point of View.

The closed form solution to the integral is very impressive, of course.

Sometimes when needed a quick numerical estimate for such a hard-to-calculate integral it is useful to take a closer look at the integrand.

Consider the denominator of the integrand

$$\sin^2x + \cos^3x$$

What happens if we replace here $\cos^3x$ with $\cos^2x$?

Probably not much because $\cos x$ varies within $\left [0,1 \right ]$

But we get a considerable simplification

$$I_{approx}\approx\int_0^{\pi/2} \cos^3x dx.=\frac{2}{3}$$

Absolute error from the exact value is about $0.05$