# Evaluate $\int_{0}^{\pi/2}x\sin^a (x) dx$, $a>0$

I want to evaluate $$\int_{0}^{\pi/2}x\sin^a (x)\, dx$$ where $$a>0$$ is a real number.

I tried: $$I(a)= \int_{0}^{\pi/2}x\sin^a(x)\,dx = \int_{0}^{1}\frac{\arcsin x}{\sqrt{1-x^2}}x^a\,dx$$ $$I(a)=\sum_{m\geq 1}\frac{4^m}{2m\left(2m+a\right)\binom{2m}{m}}$$ $$I(a)=\frac{1}{a+2}\cdot\phantom{}_3 F_2\left(1,1,1+\tfrac{a}{2};\tfrac{3}{2},2+\tfrac{a}{2};1\right)$$ Any other method please.

Any help will be appreciated. Thank you. edit The series expansion of $$\arcsin(x)^2$$ is $$2\;\arcsin(x)^2=\sum_{n=1}^\infty \frac{(2x)^{2n}}{n^2\binom{2n}{n}}$$ Differentiating the above series we get the formula used in the question.

• Oops, I thought it said $2\pi$ instead of $\pi/2$ Mar 1, 2023 at 14:51
• According to wolframalpha, the indefinite integral is $\frac14 \sin^{1 + a}(x)\left(\frac{4 x \cos(x) \phantom{}_2 F_1\left(1, \frac{2 + a}2, \frac{3 + a}2, \sin^2(x)\right)}{1 + a} - \frac{2^{-a} \sqrt\pi\ \Gamma(1 + a) \sin(x) \phantom{}_3 F_2\left(1, 1 + \frac a2, 1 + \frac a2;\frac{3+a}2, 2 +\frac a2;\sin^2(x)\right)}{\Gamma(\frac{3 + a}2) \Gamma(\frac{4 + a}2)}\right)$, But I do not know how to calculate it myself. Mar 1, 2023 at 14:59
• For $a=\frac12$ in first and in second formula wolfram finds value $\frac13 \left(\frac{\pi^{\frac32} \Gamma(\frac74)}{\Gamma(\frac54)} - 2 \phantom{}_3 F_2(\frac12, \frac12, 1;\frac32, \frac74 ;1)\right)\approx1.09749$ Mar 1, 2023 at 15:09
• From line $2$ to $3$ is a huge leap. Are you sure you didn't make a mistake? Mar 1, 2023 at 15:18
• @K.defaoite I think it is correct. Please see this:wolframalpha.com/…
– Max
Mar 1, 2023 at 15:22

We have $$\frac{\sin ^{-1}(x)}{\sqrt{1-x^2}}=\frac{\sqrt{\pi }}{2}\sum_{n=0}^\infty \frac{ \Gamma (n+1)}{\Gamma \left(n+\frac{3}{2}\right)}x^{2 n+1}$$ Assuming $$a>0$$ $$I(a)=\int_0^1 \frac{\sin ^{-1}(x)}{\sqrt{1-x^2}}x^a\,dx=\frac{\sqrt{\pi }}{2}\sum_{n=0}^\infty\frac{\Gamma (n+1)}{(2 n+2+a) \Gamma \left(n+\frac{3}{2}\right)}$$ $$I(a)=\frac 1{a+2} \,\,\, _3F_2\left(1,1,\frac{a+2}{2};\frac{3}{2},\frac{a+4}{2};1\right )$$ which is the same (numerically check) as $$\frac{\pi ^{3/2} \,\Gamma \left(\frac{a+1}{2}\right)}{4 \Gamma \left(\frac{a+2}{2}\right)}-\frac{\pi \Gamma (a+1)}{2^{(a+2)}\,\Gamma \left(\frac{a+3}{2}\right)^2}\, _3F_2\left(\frac{1}{2},\frac{a+1}{2},\frac{a+2}{2}; \frac{a+3}{2},\frac{a+3}{2};1\right)$$ given by Mathematica for the original integral.

Edit

I do not see how to expand the result for small values of $$a$$. But, back to $$x \sin^a(x)=x^{a+1}\,\left(\frac{\sin (x)}{x}\right)^a$$ $$\left(\frac{\sin (x)}{x}\right)^a=1-\frac{a }{6}x^2+\frac{a (5 a-2)}{360} x^4-\frac{a \left(35 a^2-42 a+16\right) }{45360}x^6+O(x^8)$$ the integration is simple.

Expanded as a series $$I(a)=\, \frac{\pi ^{a+2}}{2^{(a+12)} }\left( 512-\frac{2 \left(362880+15120 \pi ^2+84 \pi ^4+\pi ^6\right) }{2835}a+O\left(a^2\right) \right)$$ which is not bad for $$0 as show below $$\left( \begin{array}{ccc} a & \text{approximation} & \text{exact value}\\ 0.00 & 1.23370 & 1.23370 \\ 0.01 & 1.23038 & 1.23042 \\ 0.02 & 1.22701 & 1.22717 \\ 0.03 & 1.22358 & 1.22395 \\ 0.04 & 1.22010 & 1.22075 \\ 0.05 & 1.21656 & 1.21758 \\ \end{array} \right)$$

The next term in the expansion is $$\frac{725760+15120 \pi ^2+896 \pi ^4+11 \pi ^6}{5670}a^2$$ which improves signifiantly $$\left( \begin{array}{ccc} a & \text{approximation} & \text{exact value}\\ 0.00 & 1.23370 & 1.23370 \\ 0.01 & 1.23043 & 1.23042 \\ 0.02 & 1.22718 & 1.22717 \\ 0.03 & 1.22396 & 1.22395 \\ 0.04 & 1.22077 & 1.22075 \\ 0.05 & 1.21762 & 1.21758 \\ \end{array} \right)$$

Computing the values of the required derivatives of the generalized hypergeometric function, making them rational, $$I(a)=\frac 1{2+a} \left( \frac{\pi ^2}{4}+\frac{692 }{1203}a-\frac{32 }{645}a^2+\frac{9 }{1072}a^3+O\left(a^4\right)\right)$$ which is quite good up to $$a=1$$

Edit

Type in Wolfram Alpha

Rationalize[N[SeriesCoefficient[HypergeometricPFQ[{1, 1, 1 + a/2}, {3/2, 2 + a/2}, 1],{a,0,1}],20],10^(-6)]

you will obtain the $$\frac{692 }{1203}$$.

Update (after @metamorphy's elegant answer)

Assuming that $$a$$ is an integer, the recurrence relation given by @metamorphy

$$I_a=\frac{a+2}{a+1}I_{a+2}-\frac1{(a+1)(a+2)}$$ has explicit solution $$I_{2a}=\frac{\pi ^{3/2} \Gamma \left(a+\frac{1}{2}\right)}{4 \Gamma (a+1)}-\frac{\, _3F_2\left(1,a+1,a+1;a+\frac{3}{2},a+2;1\right)}{2 (a+1) (2 a+1)}$$ $$I_{2a+1}=\frac{\pi ^{3/2} \Gamma (a+1)}{4 \Gamma \left(a+\frac{3}{2}\right)}-\frac{\, _3F_2\left(1,a+\frac{3}{2},a+\frac{3}{2};a+2,a+\frac{5}{2};1\right)}{2 (a+1) (2 a+3)}$$ For both cases, the first term is asymptotic to $$\frac{\pi ^{3/2}}{4 \sqrt{a}}$$ as @metamorphy already showed.

• Are you saying that the last and second last expression are the same?
– Max
Mar 2, 2023 at 5:55
• @Max. As I wrote, this has been checked numerically (not a proof) Mar 2, 2023 at 5:57
• Can we further simplify what we have in your answer $I(a)=\frac 1{a+2} \,\,\, _3F_2\left(1,1,\frac{a+2}{2};\frac{3}{2},\frac{a+4}{2};1\right )$
– Max
Mar 2, 2023 at 6:07
• @Max. I do not think I could (but who knows ?). Mar 2, 2023 at 6:21
• @Max. I think that we can. I am working it. Mar 2, 2023 at 6:31

Another idea leads to a different formula (still for $$\Re a>-1$$): $$\boxed{I(a)=2^{-a}\sum_{n=0}^\infty\binom{a}{n}\frac1{(2n-a)^2}-\frac{\pi^{3/2}}{4}\frac{\Gamma\left(\frac{a+1}2\right)}{\Gamma\left(\frac{a+2}2\right)}\cot^2\frac{a\pi}2}$$ (interpreted as a limit if $$a$$ is an even integer). It is based on the fact that $$I(a)=\left.\frac{\partial}{\partial b}\int_0^{\pi/2}\sin^a x\sin bx\,dx\right|_{b=0},$$ and the approach I've taken here.

This approach might also be followed directly. Assume (temporarily) $$\color{blue}{-1<\Re a<0}$$. Consider $$f(z)=z^{-a-1}(1-z^2)^a\log z$$ (principal values everywhere) and the contours $$\gamma_+$$, $$\gamma_-$$ from the linked answer. Then, manipulating $$0=\int_{\gamma_\pm}f(z)\,dz$$ the same way, we obtain \begin{align} 2^a I(a)&=J_-(a)\cos\frac{a\pi}2-J_+(a), \\J_\pm(a)&=\int_0^1 x^{-a-1}(1\pm x^2)^a\log x\,dx. \end{align}

Now $$J_-(a)$$ reduces to $$\int_0^1 t^{\lambda-1}(1-t)^{\mu-1}\log t\,dt=\frac{\partial}{\partial\lambda}\mathrm{B}(\lambda,\mu)=\mathrm{B}(\lambda,\mu)\big(\psi(\lambda)-\psi(\lambda+\mu)\big)$$ at $$\mu=a+1$$ and $$\lambda=-a/2$$; with the reflection formulae for $$\Gamma$$ and $$\psi$$, this yields the gamma quotient term in the formula stated at the beginning. And, using the binomial expansion, $$J_+(a)=\sum_{n=0}^\infty\binom{a}{n}\int_0^1 x^{2n-a-1}\log x\,dx=-\sum_{n=0}^\infty\binom{a}{n}\frac1{(2n-a)^2}$$ gives the remaining piece. Finally, the result holds for $$\Re a>-1$$ by analytic continuation.

• Clean up done. Thanks a lot
– Max
Mar 3, 2023 at 6:38
• I doubt that your formula in "this above" answer is correct. Please see and make the changes. With regards.
– Max
Mar 3, 2023 at 15:19
• The integral $I(a)$ is becoming undefined for some values of $a$ such that $\Re(a)>-1$
– Max
Mar 3, 2023 at 15:21
• @Max: Not following. The integral $I(a)$ is defined (in your question) for all $a$ s.t. $\Re a>-1$. The formula stated in the answer takes the "$\infty-\infty$" indeterminate form if $a$ is an even (nonnegative) integer, and that's precisely why the "(interpreted as a limit if...)" remark is made above. (BTW, I've checked it numerically, like I always do in non-trivial cases.) Mar 4, 2023 at 7:39

An elementary (enough) deduction of the (already mentioned) equality $$\boxed{I(a)=\frac{\pi^{3/2}}{4}\frac{\Gamma\left(\frac{a+1}2\right)}{\Gamma\left(\frac{a+2}2\right)}-\sum_{n=1}^\infty\frac{\prod_{k=1}^{n-1}(a+2k)^2}{\prod_{k=1}^{2n}(a+k)}.\quad(\Re a>-1)}$$

We note that $$(a+1)\big(I(a)-I(a+2)\big)=\int_0^{\pi/2}x\cos x\,(\sin^{a+1}x)'\,dx$$ and integrate by parts; this yields the recurrence $$I(a)=\frac{a+2}{a+1}I(a+2)-\frac1{(a+1)(a+2)}.$$

Reusing it with $$a+2$$ in place of $$a$$, we get $$I(a)=\frac{(a+2)(a+4)}{(a+1)(a+3)}I(a+4)-\frac1{(a+1)(a+2)}-\frac{a+2}{(a+1)(a+3)(a+4)}$$ and then, by induction (I'm writing it expanded intentionally), \begin{align} I(a)&=\frac{(a+2)(a+4)\cdots(a+2n)}{(a+1)(a+3)\cdots(a+2n-1)}I(a+2n) \\&-\frac{1}{(a+1)(a+2)}-\frac{a+2}{(a+1)(a+3)(a+4)} \\&-\dots-\frac{(a+2)(a+4)\cdots(a+2n-2)}{(a+1)(a+3)\cdots(a+2n-1)(a+2n)}. \end{align}

And now we take $$n\to\infty$$. The fact that $$\lim_{n\to\infty}\frac{(a+2)(a+4)\cdots(a+2n)}{(a+1)(a+3)\cdots(a+2n-1)}\frac1{\sqrt n}=\frac{\Gamma\left(\frac{a+1}2\right)}{\Gamma\left(\frac{a+2}2\right)}$$ may be obtained using infinite product representations of $$\Gamma$$, or just the known limit $$\lim_{x\to\infty}\frac{\Gamma(x+a)}{x^a\,\Gamma(x)}=1.$$

And Laplace's method gives the remaining piece: $$\lim_{a\to\infty}I(a)\sqrt{a}=(\pi/2)^{3/2}\implies\lim_{n\to\infty}I(a+2n)\sqrt{n}=\frac{\pi^{3/2}}4.$$

• Sure, It will be the right place indeed.
– Max
Mar 3, 2023 at 5:29
• Ok. Thanks a lot
– Max
Mar 3, 2023 at 5:38
• This is a very nice solution, for sure. Mar 3, 2023 at 6:03
• Please explain how by using Laplace's method we get $$\lim_{a\to\infty}I(a)\sqrt{a}=(\pi/2)^{3/2}\implies\lim_{n\to\infty}I(a+2n)\sqrt{n}=\frac{\pi^{3/2}}4.$$ Pardon me, I tried a lot but could not prove this limit.
– Max
Mar 5, 2023 at 16:12
• @Max: the method gives the asymptotics of $\int f(x)e^{ag(x)}\,dx$ as $a\to\infty$, and the linked Wiki page covers the case when $g(x)$ has a single maximum at an interior point of the integration range. In our case $g(x)=\log\sin x$ has the maximum at $x_0=\pi/2$, i.e. a boundary point. This case is not covered in Wiki, but the answer is just half the answer in the interior-point case. In case you didn't study (and/or practice) the method... (TBC) Mar 6, 2023 at 5:53

I prefer to add a separate answer.

In this post, @Aaron Hendrickson gave the complete expansion $$\left(\frac{\sin (x)}{x}\right)^a=\sum_{m=0}^\infty c_m x^{2m}$$ where $$c_0=1$$ and $$c_m=\frac{1}{m}\sum_{k=1}^m (-1)^k\,\frac{k(a+1)-m}{(2k+1)!}\,c_{m-k}$$ $$\int_{0}^{\frac \pi 2} x\sin^a (x)\, dx=\sum_{m=0}^\infty c_m \int_{0}^{\frac \pi 2} x^{2 m+a+1}= \sum_{m=0}^\infty \frac {c_m}{a+2 (m+1) } \left(\frac{\pi}{2}\right)^{a+2 (m+1)}$$

• +1 for this answer.
– Max
Mar 5, 2023 at 4:49
• Please simplify the $c_m$ a little bit. Is there a closed form for $c_m$?
– Max
Mar 5, 2023 at 7:12
• @Max No way and no. Look at the link post for almost the same question from .... yourself ! This form (tanks Aaron !) is really nice. Cheers :-) Mar 5, 2023 at 7:26
• Okay. Thank you again.
– Max
Mar 5, 2023 at 7:37