Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

May I know how this integral was evaluated using hypergeometric function? $$\int \sin^n x\ dx$$

Wolframalpha showed this result but with no steps

Thanks in advance.

share|improve this question
1  
You can prove using integration by parts that these integrals (as a sequence of functions) satisfy a recurrence relation. Similarly, hypergeometric series satisfy lots of similar relations (which is one of the main reasons they are special, actually). This is why they often pop up when doing integrals. –  Marek Jan 15 '13 at 20:28
    
@Marek, thanks for your highlights. –  Tariq Jan 16 '13 at 17:47
add comment

1 Answer

up vote 9 down vote accepted

Assuming $n$ is a non-negative integer, you could use binomial theorem: $$\begin{eqnarray} \sin^n(x) &=& \left( \frac{\exp(i x) - \exp(-i x)}{2i}\right)^n = \frac{1}{2^n i^n} \sum_{m=0}^n \binom{n}{m} (-1)^m \exp\left( i \left(n-2m\right)x \right) \\ &=& \frac{1}{2^n i^n} \sum_{m=0}^n \binom{n}{m} (-1)^m \left(\cos\left(\left(n-2m\right)x \right) + i \sin\left( \left(n-2m\right)x \right) \right) \end{eqnarray} $$ Since the left-hand-side is real we only keep cosines for even $n$: $$\begin{eqnarray} \sin^{2n}(x) &=& \frac{1}{2^{2n}} \sum_{m=0}^{2n} \binom{2n}{m}\left(-1\right)^{n-m} \cos\left(\left(2n-2m\right)x\right) \\ &\stackrel{\text{symmetry}}{=}& \frac{1}{2^{2n}} \binom{2n}{n} + \frac{1}{2^{2n-1}} \sum_{m=0}^{n-1} \binom{2n}{m}\left(-1\right)^{n-m} \cos\left(2 \left(n-m\right)x\right) \\ &\stackrel{m\to n-m} =& \frac{1}{2^{2n}} \binom{2n}{n} + \frac{1}{2^{2n-1}} \sum_{m=1}^n \binom{2n}{n+m} (-1)^n \cos(2 m x) \tag{1} \end{eqnarray}$$ and, likewise, only sines for odd $n$: $$ \sin^{2n+1}(x) = \frac{1}{2^{2n}} \sum_{m=0}^n \binom{2n+1}{n+1+m} (-1)^m \sin\left((2m+1)x\right) \tag{2} $$ We can now integrate element-wise: $$ \int \sin^{2n}(x) \, \mathrm{d}x = \frac{1}{2^{2n}} \binom{2n}{n} x + \frac{1}{2^{2n-1}} \sum_{m=1}^n \binom{2n}{n+m} (-1)^n \frac{\sin(2 m x)}{2m} + \text{const.} $$ $$ \int \sin^{2n+1}(x) \, \mathrm{d}x = -\frac{1}{2^{2n}} \sum_{m=0}^n \binom{2n+1}{n+1+m} (-1)^m \frac{\cos\left((2m+1)x\right)}{2m+1} + \text{const.} $$


To obtain a hypergeometric function, let $u = \sin(x)$. Then $$ \int \sin^n(x)\, \mathrm{d}x = \int \frac{u^n}{\sqrt{1-u^2}} \mathrm{d}u $$ Now see this answer of mine on how to find the anti-derivative of $\int u^a (1-u)^b \mathrm{d} u$. Applying the same principles, we find: $$ \int \frac{u^n}{\sqrt{1-u^2}} \mathrm{d}u =\int u^n \cdot {}_1F_0\left(\left.\begin{array}{c} \frac{1}{2} \\ - \end{array} \right| u^2 \right) \mathrm{d} u = \int \frac{\mathrm{d}}{\mathrm{d}u} \left( \frac{u^{n+1}}{n+1} \cdot {}_2F_1\left(\left.\begin{array}{cc} \frac{1}{2} & \frac{n+1}{2} \\ & \frac{n+3}{2} \end{array} \right| u^2 \right) \right) \mathrm{d} u $$ Thus, we have: $$ \int \sin^n(x) \, \mathrm{d}x = \frac{\sin^{n+1}(x)}{n+1} \cdot {}_2F_1\left(\left.\begin{array}{cc} \frac{1}{2} & \frac{n+1}{2} \\ & \frac{n+3}{2} \end{array} \right| \sin^2(x) \right) + \text{const.} \tag{3} $$ This works where $u = \sin(x)$ is invertible. To extend validity of the answer, differentiate it. We would get $$ \frac{\mathrm{d}}{\mathrm{d}x} \left( \frac{\sin^{n+1}(x)}{n+1} \cdot {}_2F_1\left(\left.\begin{array}{cc} \frac{1}{2} & \frac{n+1}{2} \\ & \frac{n+3}{2} \end{array} \right| \sin^2(x) \right) \right) = \frac{\sqrt{\cos^2(x)}}{\cos(x)} \sin^{n} (x) $$ and since the pre-factor $\frac{\sqrt{\cos^2(x)}}{\cos(x)}$ is a differential constant, i.e. its derivative is zero, we arrive at: $$ \int \sin^n(x) \, \mathrm{d}x = \frac{\cos(x)}{\sqrt{\cos^2(x)}} \frac{\sin^{n+1}(x)}{n+1} \cdot {}_2F_1\left(\left.\begin{array}{cc} \frac{1}{2} & \frac{n+1}{2} \\ & \frac{n+3}{2} \end{array} \right| \sin^2(x) \right) + \text{const.} \tag{4} $$ This can be related to the answer provided by Wolfram|Alpha, and thus by Mathematica, using Kummer's relations.

share|improve this answer
    
Nice and clean... (+1) –  J. M. Jan 16 '13 at 17:46
    
@J.M. Thanks! $\ \ $ –  Sasha Jan 16 '13 at 17:53
    
I'm really astonished with this answer. I still need to study the relevant links before closing :). –  Tariq Jan 16 '13 at 18:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.