Let $\{W_t\}_{t \in \mathbb{R}_+}$ be a Wiener process. I wish to calculate $E \left[ W(t)e^{\lambda W(t)} \right], \lambda \in \mathbb{R}$.
Solution attempt
First define a function given by $f(t,x) = xe^{\lambda x}$. Then, \begin{align} \frac{\partial f(t,x)}{\partial x} &= e^{\lambda x} + \lambda x e^{\lambda x}, \\ \frac{ \partial^2 f(t,x)}{\partial x^2} &= 2\lambda e^{\lambda x} + \lambda^2 xe^{\lambda x}.\end{align}
So by Ito's formula, the differential of $f(t,W(t))$ is given by \begin{align} df = \left[ \lambda e^{\lambda W} + \frac{\lambda^2}{2}We^{\lambda W} \right]dt + \left[ e^{\lambda W} + \lambda We^{\lambda W} \right] dW\end{align}
Or, rather, $$f_s = f_0 + \int_0^s \left[ \lambda e^{\lambda W} + \frac{\lambda^2}{2}We^{\lambda W} \right]dt + \int_0^s \left[ e^{\lambda W} + \lambda We^{\lambda W} \right] dW.$$ Then we take expectations, so that the stochastic integral disappears, then we define $m(t) = E f_s = E f(s,W(s))$, and then we take the derivatives. We then get $$m'(t) = E \lambda e^{\lambda W} + \frac{\lambda^2}{2}m(t).$$ The first term on the left hand side equals $\lambda e^{t\frac{\lambda^2}{2}}$.
At this point, as I am not good with differential equations, I am kind of stuck. And, either way, I would like to have my solution so far checked out as well, as I am unsure whether the stochastic integral really does disappear when I take expectations. What condition needs to be satisfied for this to hold, and how do I check whether it does?
