# Stochastic differential equation with constant drift and linear diffusion

I'm new to Itô calculus and currently examining a process with the dynamics: $$dX_t = \mu dt + \sigma X_t dB_t,\quad 0\leq t\leq T < \infty, \quad X_0 = x$$ where $\{B_t, t\geq 0\}$ is a standard 1-dimensional Brownian motion. The task of the current exercise is to calculate $\mathbb{E}[X_T^2]$, any ideas on how to approach this?

I have tried defining a new process $Y_t=X_t^2$ and using Itô's formula but it doesn't seem to get my anywhere. Thankful for all input!

• Where exactly are you stuck when you apply Itô's formula?
– saz
Feb 26, 2018 at 20:07
• Applying Itô's formula with the suggested transformation yields: $$dY_t = (2\mu X_t + \sigma^2 Y_t)dt + 2\sigma Y_t dB_t,$$ which to me doesn't seem like an easier thing to deal with
– erik
Feb 26, 2018 at 20:28
• Well, what happens if you take the expectation?
– saz
Feb 26, 2018 at 20:39
• @saz Is there a better way to go than the one in my answer? Feb 27, 2018 at 9:42
• @HartoSaarinen Not really. In order to avoid the $\mathbb{E}(X_t)$-term in the ODE you can consider $\mathbb{E}((X_t-\mathbb{E}(X_t))$ instead of $\mathbb{E}(X_t^2)$...
– saz
Feb 27, 2018 at 16:36

Remember that your notation $$dX_t = \mu dt + \sigma X_t dB_t$$ is just a shorthand for $$X_t=X_0 + \int_0^t \mu ds + \int_0^t\sigma X_sdB_s.$$ Now after applying Itô's lemma (which you have done correctly) you get $$dX_t^2=(2\mu X_t+ \sigma^2 X_t^2)dt+2 \sigma X_t^2 dB_t.$$ Now taking the expectation you get \begin{align} E[X_t^2]& = E[X_0^2+ \int_0^t 2\mu X_s + \sigma^2 X_s ds+ \int_0^t 2 \sigma X_s^2 dB_s] \\ & = E[X_0^2]+2 \mu \int_0^t E[X_s]ds+ \sigma^2 \int_0^t E[X_s^2]ds + 0 \\ & = X_0^2 + 2 \mu \int_0^t E[X_s]ds+ \sigma^2 \int_0^t E[X_s^2]ds \end{align} where we used linearity of expectation, Fubini's theorem (to change the order of expectation and the integral) and the fact that the expectation of stochastic integral is zero.
Now this can be written as $$\frac{d}{dt} E[X_t^2] = 2 \mu E[X_t]+ \sigma^2 E[X_t^2] = 2 \mu X_0+2\mu^2 t +\sigma^2E[X_t^2].$$ This is because $E[X_t]=X_0+\mu t$. Solving this linear ODE gives you the solution.