# Integration By Parts help

1. Feb 10, 2010

### Slimsta

1. The problem statement, all variables and given/known data
1.$$\int x^ne^xdx$$
2.$$\int \sin ^nxdx$$

2. Relevant equations
$$\displaystyle \Large \int fg dx = fg - \int gf' dx$$

3. The attempt at a solution
1. f=xn
g'=ex
g=ex
f'=nxn-1

then just plug it in the formula? i tried but i dont get the right answer..

2. i have no idea how to even start..
the antiderivative of sinnx is [(sinx)n+1]/(n+1) ?

2. Feb 10, 2010

### HallsofIvy

No, the anti-derivative of sinn(x) is NOT sinn+1(x)/(n+1)!

Integrating $\int x^n e^x dx$ is very easy- but tedious. Let u= xn, dv= ex dx. Then du= n xn-1 dx and v= ex.

$$\int x^n e^x dx= x^ne^x- n\int x^{n-1}e^x dx$$
That is the same as you started with but the exponent on x is one less. Repeat n-1 more times until the exponent is 0!

As for (2), how you do that depends on whether n is even or odd. If n is odd, it is easy. If n= 2m+1, then the integral is
$$\int sin^{2m+1}(x) dx= \int (sin^2(x))^m sin(x)dx= \int (1- cos^2(x))^msin(x) dx$$
and letting u= cos(x) reduces it to
$$-\int (1- u^2)^m du$$

If n is even, use the trig identity $sin^2(x)= (1/2)(1- cos(2x))$ repeatedly until you have reduced to power 1.