X is a random variable with density $$f(x)=2e^{-2x+2} , x\geq1$$ and 0 otherwise.
Determine $Mx(θ)$, the moment generating function for X, and the values of θ for which $Mx(θ)$ is defined. Use $Mx(θ)$ to determine $E(X^2)$
Working: I know that
$Mx(θ) = E(e^{\theta x})= \int_{0}^{\theta}e^{\theta x}fx(x) \ dx =\int_{0}^{\theta} e^{\theta x} (\lambda e^{-\lambda x}) \ dx$ $=\frac{\lambda}{\lambda-\theta}$
But I am unsure how to use this with the more complicated $f(x)=2e^{-2x+2}$ . Any help is appreciated!
You have
$$ M_{X}(\theta) = E(e^{\theta X}) = \int_{-\infty}^{\infty} e^{\theta x} f(x) \, dx = 2 \int_{1}^{\infty} e^{\theta x} e^{-2x + 2} \, dx = 2 \int_{1}^{\infty} e^{(\theta - 2)x + 2} \, dx. $$
Can you determine for which $\theta$ the integral converges and to what value?