# Solve the SDE $dX_t=\alpha \,dt + \sigma X_t \,dB_t$, $X_0=x_0$ [duplicate]

So I got the following SDE to solve:

$$dX_t=\alpha\, dt + \sigma X_t \,dB_t, X_0=x_0$$

This is what I've tried:

Using Ito's I should get the following relations:

$$X_t=f(s,x)$$ $$\alpha = \frac{1}{2}\frac{d^2f}{dx^2}+\frac{df}{ds}$$ $$\sigma X_t=\frac{df}{dx}$$

The second equation, which seems to be a ODE:

$$\frac{df}{dx}-\sigma X_t=\frac{df}{dx}-\sigma f=0$$ Using the integrating factor: $$I = e^{\int -\sigma \,dx}=e^{-\sigma x + g(s)}$$ $$\frac{df}{dx}I-\sigma fI=0$$ $$(fI)'=0$$ $$f=CI^{-1}$$ Using the initial value: $$f(0,0)=x_0=C$$ $$f=x_0e^{-\sigma x + g(s)}$$ The problem for me is now to solve $g(s)$.

Differentiating by $x$ twice and $s$ once gives: $$\frac{df}{ds}=g'(s)f$$ $$\frac{d^2f}{dx^2}=\sigma^2f$$ $$\alpha = \frac{1}{2}\frac{d^2f}{dx^2}+\frac{df}{ds}$$ $$\frac{1}{2}\sigma^2f+g'(s)f=\alpha$$

At this point I'm quite unsure on what to do.