1. ## Integration trouble!

Hey people, I know this may seem trivial but i'm having some trouble integrating a function. I have always been weak with integration but this one has a constant and is baffling me! the function to be integrated is:

f(x) = x^2.e^(-Px)

I would really appreciate if anyone could help me solve this one!

Thanks,
Watto

2. Originally Posted by watto23
Hey people, I know this may seem trivial but i'm having some trouble integrating a function. I have always been weak with integration but this one has a constant and is baffling me! the function to be integrated is:

f(x) = x^2.e^(-Px)

I would really appreciate if anyone could help me solve this one!

Thanks,
Watto
You need to use integration by parts.

$\displaystyle \int{u\,dv} = u\,v - \int{v\,du}$

So for $\displaystyle \int{x^2e^{-px}\,dx}$

you let $\displaystyle u = x^2$ so that $\displaystyle du = 2x$

and $\displaystyle dv = e^{-px}$ so that $\displaystyle v = -\frac{e^{-px}}{p}$.

Therefore

$\displaystyle \int{x^2e^{-px}\,dx} = -\frac{x^2e^{-px}}{p} - \int{-\frac{2x\,e^{-px}}{p}\,dx}$

$\displaystyle = -\frac{x^2e^{-px}}{p} + \frac{2}{p}\int{x\,e^{-px}\,dx}$.

Now you need to use integration by parts again.

Let $\displaystyle u = x$ so that $\displaystyle du = 1$

Let $\displaystyle dv = e^{-px}$ so that $\displaystyle v = -\frac{e^{-px}}{p}$.

So $\displaystyle -\frac{x^2e^{-px}}{p} + \frac{2}{p}\int{x\,e^{-px}\,dx} = -\frac{x^2e^{-px}}{p} + \frac{2}{p}\left(-\frac{x\,e^{-px}}{p} - \int{-\frac{1e^{-px}}{p}\,dx}\right)$

$\displaystyle = -\frac{x^2e^{-px}}{p} - \frac{2x\,e^{-px}}{p^2} + \frac{2}{p^2}\int{e^{-px}\,dx}$

$\displaystyle = -\frac{x^2e^{-px}}{p} - \frac{2x\,e^{-px}}{p^2} - \frac{2e^{-px}}{p^3} + C$.

3. nice one buddy thanks for the quick reply

4. Hey having some more trouble with this problem,

I was asked to numerically integrate the function:

f(x) = x^2.e^(-Px)

between the limits 0 and 2*pi where p=3

On a computer program called MATLAB I have done so using the trapezium and simpsons rule and evaluated the integral as 0.0741 for both with a sufficient number of intervals.

however the proof above seems correct but it gives me an extremely small number for the integral due to e^(-Px) being roughly e^-18.

Can anyone shed some light into where i may have gone wrong?