# How to integrate (x^2-1)^n

1. Aug 20, 2009

### raul_l

1. The problem statement, all variables and given/known data

The whole expression is
$$\frac{(-1)^n (2n)!}{2^{2n} (n!)^2} \int^{1}_{-1} (x^2-1)^n dx$$
$$\frac{2}{2n+1}$$
but I don't know how to get there.

I came across this while checking the orthogonality of the associated Legendre functions.

2. Relevant equations

3. The attempt at a solution

First I tried integrating by parts.
$$\int^{1}_{-1} (x^2-1)^n dx = \int^{1}_{-1} (x^2-1)^{n-1} (x^2-1) dx =$$
$$= [(x^2-1)^{n-1} (x^3/3-x)]^{1}_{-1} - 2(n-1) \int^{1}_{-1} (x^2-1)^{n-2} x(x^3/3-x) dx =$$
$$= - 2(n-1) \int^{1}_{-1} (x^2-1)^{n-2} x(x^3/3-x) dx$$

I think that by integrating by parts I would eventually get rid of n under the integral sign which is good but the integrand itself gets more and more complicated so I'm not sure whether I should continue doing this.

Then I tried making the substitution $$x \rightarrow cos(x)$$

$$\int^{1}_{-1} (x^2-1)^n dx = - \int^{0}_{\pi} (cos^2 (x)-1)^{n} sin(x) dx =$$
$$= \int^{\pi}_{0} (-1)^n sin^2 (x)^{2n-1} dx$$

and again, I'm not sure whether that will lead me anywhere or not.

And guidance would be appreciated.

2. Aug 20, 2009

### Elucidus

Try the binomial expansion of $(x^2-1)^n$ and exploit the fact that the interval of integration is [-1, 1]. Hint: even vs. odd terms. See if that gets anywhere.

--Elucidus

Last edited: Aug 20, 2009
3. Aug 20, 2009

### raul_l

Yes, I forgot to mention earlier that I had also tried the binomial formula.

$$\int^{1}_{-1} (x^2-1)^n dx = \int^{1}_{-1} \sum^n_{k=0} \frac{n!}{k!(n-k)!} x^{2n-2k} (-1)^k dx = \sum^n_{k=0} \frac{(-1)^k n!}{k!(n-k)!} \int^{1}_{-1} x^{2n-2k} dx = \sum^n_{k=0} \frac{(-1)^k n!}{k!(n-k)!} \frac{2}{2n-2k+1}$$

So far the expression has become

$$\frac{(-1)^n (2n)!}{2^{2n} (n!)^2} \sum^n_{k=0} \frac{(-1)^k n!}{k!(n-k)!} \frac{2}{2n-2k+1}$$

which has to be equal to $$\frac{2}{2n+1}$$

I still don't understand how.
Perhaps there are some formulas that could be used but I'm unaware of.

Most of the derivation is given in this book: http://physics.bgu.ac.il/~gedalin/Teaching/Mater/mmp.pdf
I understand all of it except the very end (page 311).

4. Aug 20, 2009

### Dick

5. Aug 20, 2009

### raul_l

Okay, I can use
$$\int sin^n (x) dx = -\frac{1}{n}sin^{n-1}(x) cos (x) + \frac{n-1}{n} \int sin^{n-2}(x)dx$$

which in my case becomes
$$\int^{\pi}_0 sin^n (x) dx = \frac{n-1}{n} \int^{\pi}_0 sin^{n-2}(x)dx$$

Now
$$\frac{(-1)^n (2n)!}{2^{2n} (n!)^2} \int^{\pi}_{0} (-1)^n sin^{2n+1}(x) dx =$$

$$= \frac{(2n)!}{2^{2n} (n!)^2} \frac{2n}{2n+1} \int^{\pi}_{0} sin^{2n-1}(x) dx =$$

$$= \frac{(2n)!}{2^{2n} (n!)^2} \frac{2n(2n-2)}{(2n+1)(2n-1)} \int^{\pi}_{0} sin^{2n-3}(x) dx =$$

$$= \frac{(2n)!}{2^{2n} (n!)^2} \frac{2n(2n-2)...(2n-2n+2)}{(2n+1)(2n-1)...(2n-2n+1)} \int^{\pi}_{0} sin(x) dx =$$

$$= \frac{(2n)!}{2^{2n} (n!)^2} \frac{2^n n(n-1)...1}{(2n+1)(2n-1)...(2n-2n+1)} 2 =$$

$$= \frac{(2n)!n!}{2^n (n!)^2} 2 \frac{2n(2n-2)...2}{(2n+1)2n(2n-1)...1} =$$

$$= \frac{(2n)!}{2^n n!} 2 \frac{2^n n(n-1)...1}{(2n+1)!} =$$

$$= \frac{2}{2n+1}$$

Problem solved. Thank you.