TITLE: Expected value of $S_t$ where $dS_t=(\mu S_t+a)dt + (\sigma S_t +b)dW_t$
QUESTION [6 upvotes]: I have the stochastic differential equation: $$dS_t=(\mu S_t+a)dt + (\sigma S_t +b)dW_t$$
where $W_t$ is a Wiener process with $S_0 > 0$ and $\mu, \sigma, a, b \in \mathbb{R}$.
I have found the solution of this equation: $$S_t= S_0\beta^{-1}_t+(a-\sigma b)\int_0^t \frac{ \beta_s} {\beta_t}ds + b\int_0^t \frac{ \beta_s} {\beta_t}dW_s$$
using an integrating factor of $\beta_t = \exp(-(\mu-\frac{1}{2}\sigma^2)t - \sigma W_t)$ and proved that it is a unique solution of this SDE.
I want to now find the expected value of this solution, so $\mathbb{E}(S_t)  $  for all $t\geq 0$, with $- \frac{1}{2} \sigma < \mu < 0$. Could someone just point me in the right direction?

REPLY [5 votes]: Writing the SDE in integral form we have
$$
S_t=S_0+\int_0^t \mu\, S_u+a\,du+\int_0^t\sigma\,S_u+b\,dW_u\,.
$$
Therefore,
$$
\mathbb E[S_t]=S_0+\int_0^t\mu\,\mathbb E[S_u]+a\,du\,.
$$
This is an ODE for $\mathbb E[S_t]$ which is identical to the SDE for $S_t$ when $\sigma=0$ and $b=0$. This ODE therefore has the solution
$$
\mathbb E[S_t]=S_0\,e^{\mu t}+a\frac{e^{\mu t}-1}{\mu}.
$$