How to reproduce the Mathematica solution for $\int(\cos x)^{\frac23}dx$?

I entered this integration problem to Mathematica Online Integrator an got a solution I would never have been able to find manually.

$$\int\root 3 \of{\cos(x)^2}\,dx=\frac{(-3\cos(x)\root 3 \of{\cos(x)^2}*Hypergeometric2F1[1/2, 5/6, 11/6, \cos(x)^2]*\sin(x))}{5\sqrt{\sin(x)^2}}$$

I would like to see/learn how the trick works to solve/reproduce this the manual way.

• It's really ugly answer to me. – Tunk-Fey May 27 '14 at 16:37
• Use the binomial series and then switch the order of summation and integration. – Lucian May 27 '14 at 19:26
• I also was disappointed that such a "nice" integral results in such an "ugly" answer. – Wolfgang Tintemann May 28 '14 at 15:55

Expanding the above comment, we can write (say, for $x\in\left[0,\frac{\pi}{2}\right]$) \begin{align} \int \cos^{r}x\,dx&=-\int \cos^r x\left(1-\cos^2 x\right)^{-\frac12}\,d(\cos x)=\\ &=-\int \sum_{k=0}^{\infty}\frac{\Gamma(k+\frac12)}{k!\,\Gamma(\frac12)}\cos^{r+2k}x\,d(\cos x)=\\ &=-\sum_{k=0}^{\infty}\frac{\Gamma(k+\frac12)}{k!\,\Gamma(\frac12)}\frac{\cos^{r+1+2k}x}{r+1+2k}=\\ &=-\frac{\cos^{r+1}x}{r+1}\sum_{k=0}^{\infty}\frac{(\frac12)_k(\frac{r+1}{2})_k}{k!\,(\frac{r+3}{2})_k}\left(\cos^2 x\right)^k=\\ &=-\frac{\cos^{r+1}x}{r+1}{}_2F_1\left(\frac12,\frac{r+1}{2};\frac{r+3}{2};\cos^2 x\right),\tag{1} \end{align} where $(a)_k=\frac{\Gamma(a+k)}{\Gamma(a)}$ denotes the Pochhammer symbol. It remains to set $r=\frac23$ in the last formula.
• If I set $r=0$ in the above equation there results a funny formula. – Wolfgang Tintemann May 29 '14 at 15:49
• I noticed the following. $$\int_{-\frac \pi 2}^{\frac \pi 2} \root 3 \of{\cos^2(x)}\,dx$$ is greater zero. But if I try to calculate with the solution given I get zero ( I used WolframAlpha ). This seems not to be an error using the CAS as $$\cos(x)=0$$ for $$\pm \frac \pi 2$$. – Wolfgang Tintemann May 29 '14 at 18:26
• @WolfgangTintemann Good point. The seeming contradiction is related to that for $x\in(-\pi/2,0)$ we should replace (at the very first step) $\sin x$ by $-\sqrt{1-\cos^2x}$ (i.e. there is a sign difference). If you want to have an antiderivative valid for $x\in(-\pi/2,\pi/2)$, in addition to modifying the sign one should add a constant to one of the two expressions ensuring that they match at $x=0$. – Start wearing purple May 29 '14 at 22:33