# How to compute $\mathbb{E}[X_{s}^{2}e^{\lambda X_{s}}]$ where $(X_s)$ is a Brownian motion with drift $\mu$?

I'm working on a problem and at a certain point I ran into the problem as described in the title. We have that $$\{W_t,t\geq 0\}$$ is a Brownian motion and $$\mathscr{F}_t$$ is the corresponding filtration. We have that $$\mu>0$$ is given in the process $$\{X_t,t\geq 0\}$$ defined via $$X_t:=\mu t+W_t$$.

I don't want to post the full problem I was solving yet, rather I'd like to know if what I ended up with is even solvable, because if not, I'll know I'm definitely wrong.

As posted in the title, I came at a point where I was left to compute the expectation:

$$\mathbb{E}[X_{s}^{2}e^{\lambda X_{s}}]$$

Earlier in the exercise (it consisted of multiple parts) I used the moment generating function for the normal distribution. However, as far as I know, I cannot take the $$X_{s}^{2}$$ out of the expectation, stopping me from applying the moment generating function.

Is this expectation solvable in a relatively easy way? If not, I'll know I'm wrong and start over.

• Differentiate twice $E(e^{\lambda X_t})$ with respect to $\lambda$. – Did Jan 4 '19 at 20:16
• @Did That works. Thank you very much! – Charlie Shuffler Jan 5 '19 at 8:50

Using the setting as stated in the question and working out the expectation by using the tip given in the comments, yields the following. The key observation is that the expectation we want to compute, equals the second derivative with respect to $$\lambda$$ of the moment generating function for a normal distribution. The moment generating function for a $$N(\mu,\sigma^2)$$ is given by (with $$X$$ in this case a continuous random variable):

$$\mathbb{E}[e^{\lambda X}]=e^{\lambda \mu + \frac{1}{2}\sigma^2 \lambda^2}$$

In our setting we have that $$X_s = \mu s +W_s\sim N(\mu s, s)$$. So the moment generating function becomes:

$$\mathbb{E}[e^{\lambda X_s}]=e^{\lambda \mu s + \frac{1}{2}s \lambda^2}$$

Taking the first derivative with respect to $$\lambda$$ yields:

$$\mathbb{E}[X_{s}e^{\lambda X_s}]=(\mu s+s\lambda)e^{\lambda \mu s + \frac{1}{2}s \lambda^2}$$

Taking the derivative of the first derivative yields our desired answer:

$$\mathbb{E}[X_{s}^{2}e^{\lambda X_s}]=(\mu s+s\lambda)^{2}e^{\lambda \mu s + \frac{1}{2}s \lambda^2}+s e^{\lambda \mu s + \frac{1}{2}s \lambda^2}=((\mu s+s\lambda)^{2}+s)e^{\lambda \mu s + \frac{1}{2}s \lambda^2}$$