Analytic Solution to a Generalized Ornstein-Uhlenbeck Process?
The stochastic differential equation solved by $y_t=\mathrm{e}^{\theta t}x_t$ indicates that $$ \mathrm{e}^{\theta t}x_t = x_0 + \int_{0}^{t} \theta\, \mathrm{e}^{\theta s}\mu(s)\,\mathrm{d}s +\sigma \int_{0}^{t} \mathrm{e}^{\theta s}\, \mathrm{d}W_s, $$ hence $$ E(x_t) = x_0 \mathrm{e}^{-\theta t} + \int_{0}^t\theta\, \mathrm{e}^{\theta (s-t)}\mu(s)\,\mathrm{d}s. $$ A more direct way to compute the expectation uses the fact that the function $u$ defined by $u(t)=E(x_t)$ is the unique solution of the ordinary differential equation $$ u'(t)=\theta\cdot(\mu(t)-u(t)),\quad u(0)=x_0. $$