# Homework Help: Best way to integrate a moment generating function?

1. Oct 14, 2011

### trojansc82

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

∫etxx2e-x

2. Relevant equations

M(t) = etx f(x) dx

3. The attempt at a solution

I know the solution is -1/(t-3)3, however I'm having difficulty integrating the function. UV - ∫ V DU is extremely long and challenging, I'm wondering if there is a shortcut (i.e. quotient rule?)

Also, there is a process used here but I'm unable to understand it:

2. Oct 14, 2011

### LCKurtz

Unfortunately, integration by parts is the antiderivative method generated by the product or quotient rules. I don't know of any shortcut. Let u = x2 the first round than u = x the second round and you should be able to integrate the result directly.

3. Oct 14, 2011

### lurflurf

It looks like that example integrated by parts multiple times. It is easy if you practice. Another method could be differentiation by the parameter.
Let In(t) be integrals like yours where n is the power of x

Then notice
In(t)=DnI0(t)=Dn(-1/(t-1))

where
D is differentiation with respect to t
I0(t)=(-1/(t-1))

4. Oct 14, 2011

### trojansc82

I did the integration by parts, and I ended up with 1/(1-t)3...is that incorrect?

The mean and variance were still the same as the book's answers (μ = 3, σ2 = 3)