TITLE: Integral $\int_0^{\frac{\pi}{2}} x^2 \sqrt{\sin x} \, dx$
QUESTION [10 upvotes]: Greetings I am trying to find a closed form for:  $$I=\int_0^{\frac{\pi}{2}} x^2 \sqrt{\sin x}\,dx$$ If we rewrite the integral as $$I=\int_0^\infty x^2 \sqrt{\frac{1}{\sqrt{1+\cot^2 x}}}\,dx$$ now with $$\cot x =t $$ $$I=\int_0^{\infty} \operatorname{arccot}^2 (x)(1+x^2)^{-\frac{5}{4}}dx$$ and with https://en.wikipedia.org/wiki/Inverse_trigonometric_functions#Logarithmic_forms $$I=\frac{1}{4i}\int_0^{\infty}\log^2\left(\frac{z-i}{z+i}\right)(1+x^2)^{-\frac{5}{4}} \, dx$$ Now for the $\log$ I thought to expand into power series but since the radius of converge is abit smaller, this fails. Also integrating by parts or combining the initial integral with $\int_0^{\frac{\pi}{2}} x^2 \sqrt{\cos x}\,dx$ wasn't much of a help, could you help me evaluate this integral ?

REPLY [8 votes]: The original integral in the question unfortunately lacks a closed form. You can rewrite it in terms of the hypergeometric function, but that's the best you can get. However I did a bit of digging and found an explicit expression for the integral below
$$\mathfrak{I}=\int\limits_0^{\pi/2}\mathrm dx\, x^2\sqrt{\cos x}$$
Perhaps this may help in some way. First, let $x=\arcsin\sqrt t$ and our integral transforms into
$$\mathfrak{I}=\frac 12\int\limits_0^1\mathrm dt\,t^{-1/2}(1-t)^{-1/4}\arcsin^2\sqrt t$$
The integrand is very similar to the beta function, so we can substitute $\arcsin(\cdot)$ with it's infinite series counterpart and rewrite the integral in terms of the gamma function. Recalling that
$$\arcsin^2z=\sum\limits_{n\geq1}\frac {2^{2n-1}z^{2n}}{n^2\binom {2n}n}$$
We get
$$\begin{align*}\mathfrak{I} & =\frac 14\sum\limits_{n\geq1}\frac {4^n}{n^2\binom {2n}n}\int\limits_0^1\mathrm dt\, t^{n-1/2}(1-t)^{-1/4}\\ & =\frac 14\sum\limits_{n\geq1}\frac {4^n\Gamma^2(n+1)}{n^2\Gamma(2n+1)}\frac {\Gamma\left(n+\frac 12\right)\Gamma\left(\frac 34\right)}{\Gamma\left(n+\frac 54\right)}\end{align*}$$
Using the two equations$$\Gamma\left(n+\frac 12\right)=\frac {\Gamma(2n+1)\sqrt\pi}{4^n\Gamma(n+1)}$$$$\Gamma\left(\frac 14\right)\Gamma\left(\frac 34\right)=\pi\sqrt2$$
The infinite sum simplifies into something much less daunting
$$\mathfrak{I}=\frac {\pi\sqrt{2\pi}}{4\Gamma\left(\frac 14\right)}\sum\limits_{n\geq1}\frac {\Gamma(n)}{n\Gamma\left(n+\frac 54\right)}$$
The gamma functions can again be rewritten as the beta function and converted back to an integral to get
$$\begin{align*}\mathfrak{I} & =\frac {\pi\sqrt{2\pi}}{\Gamma^2\left(\frac 14\right)}\sum\limits_{n\geq1}\frac 1n\operatorname{B}\left(n,\frac 54\right)\\ & =\frac {\pi\sqrt{2\pi}}{\Gamma^2\left(\frac 14\right)}\int\limits_0^1\mathrm dt\,\frac {(1-t)^{1/4}}t\sum\limits_{n\geq1}\frac {t^n}n\\ & =-\frac {\pi\sqrt{2\pi}}{\Gamma^2\left(\frac 14\right)}\int\limits_0^1\mathrm dt\,\frac {(1-t)^{1/4}\log(1-t)}t\end{align*}$$
The resulting integral is rather easy to compute by first using the substitution $1-t\mapsto t^4$ and then using partial fraction decomposition to arrive at
$$\int\limits_0^1\mathrm dt\,\frac {(1-t)^{1/4}\log(1-t)}t=16-8G-\pi^2$$
where $G$ is Catalan's constant. Therefore, it's easy to see that the final result, in color, is
$$\mathfrak{I}=\int\limits_0^{\pi/2}\mathrm dx\, x^2\sqrt{\sin x}\color{blue}{=\frac {\pi\sqrt{2\pi}}{\Gamma^2\left(\frac 14\right)}\biggr[\pi^2+8G-16\biggr]}$$
If we put that together into the original integral, another possible solution, given by ComplexYetTrivial, is
$$\int\limits_0^{\pi/2}\mathrm dx\, x^2\sqrt{\sin x}\color{red}{=\frac{\pi\sqrt{2\pi}}{\Gamma^2\left(\frac 14\right)}\biggr[\frac {3\pi^2}2+8G-16\biggr]-\frac {4\pi}{15}{}_3F_2\left[\begin{array}{c}1,\frac 54,\frac 54\\\frac 74,\frac 94\end{array}\right]}$$