Suppose that a random variable X has an exponential distribution with rate $\lambda$. Write down the moment generating function for the random variable $-X$. Compute $E(X^n)$, and check calculations of the mean and variance of X.
(The reason for working with $-X$ rather than $X$, is that if t $\geq 0$, (and this is in fact sufficient) then all the integrals are finite.
My attempt so far;
Below I put in $-X$ instead of $X$, and I figure the limits don't change but I can't really convince myself of a good reason why I think that, it's just a gut feeling.
$$M_{-X}(t)=\lambda\int\limits_0^\infty e^{-tX} e^{\lambda X}dx.$$
$$M_{-X}(t)=\lambda\int\limits_0^\infty e^{X(\lambda-t)}dx = \dfrac{\lambda e^{X(\lambda-t)}}{\lambda-t}\Big|_0^\infty$$
$$\dfrac{\lambda e^{X(\lambda-t)}}{\lambda-t}\Big|_0^\infty=\dfrac{\lambda e^{\infty(\lambda-t)}}{\lambda-t}-\dfrac{\lambda e^{0(\lambda-t)}}{\lambda-t}.$$
Assuming $\dfrac{\lambda e^{\infty(\lambda-t)}}{\lambda-t}$ is correct for the first term, I don't know how to evaluate this to get a number. I'm assuming after everything has been evaluated I end up with, $$\dfrac{-\lambda }{\lambda-t}?$$
After this I'm just completely confused. I feel like I lack context over what I'm doing so I can't really think about what I'm supposed to be doing.
Appreciate any help on this, thanks.