Problems solving the SDE $dX_t = aX_tdt +\sigma dB_t$. Why don't Ito's lemma work? I am trying to solve the SDE below and I am running into some problems. We're given that $X_0=1$, $a \in R$, $\sigma > 0.$ $$dX_t = aX_tdt +\sigma dB_t$$
I tried to solve it the following manner. Assuming that $X_t=f(t, B_t)$ and applying Ito's lemma yielded:
$$(\frac{\partial f}{\partial t} + \frac{1}{2}\frac{\partial f^2}{\partial^2 x})dt + \frac{\partial f}{\partial x}dB_t$$
Now here is where I want to match "coefficients". That is saying
$$\frac{\partial f}{\partial x} = \sigma  \implies f=\sigma x + g(t)$$
Entering this into the other "coefficent" yields:
$$\frac{\partial f}{\partial t} + \frac{1}{2}\frac{\partial f^2}{\partial^2 x} = g'(t) = aX_t = af=a(\sigma x+g(t))$$
Now we've arrived at a seperable ODE for $g(t)$ which when solved would yield the final solution $f(t, B_t)$. However, this doesn't work, and looking at the solution set I am completely off target. My question is why is this? Why can't I solve this SDE using this method? Where is the flaw in the solution method?
The suggested solution method was to study $Y_t= e^{-at}X_t$. How on earth would you come up with this anstaz by looking purely at the SDE?
EDIT (completed tried solution):
After having said that $f= \sigma x + g(t)$ I used this fact to obtain that:
$$\frac{\partial f}{\partial t} + \frac{1}{2}\frac{\partial f^2}{\partial^2 x}=\frac{\partial f}{\partial t} =g'(t)=a(\sigma x  +g(t))$$
Now I tried to solve that ODE by the follwing processes:
$$g'(t)=a(\sigma x+g(t))\iff \int \frac{dg}{a(\sigma x + g(t))} = t + C$$
This yielded further that $g(t)=Ce^{at}-\sigma x$ and so $f=\sigma x + g(t) = Ce^{at}$. This clearly isn't the solution however.
 A: There is a peculiar method for that SDE that goes as follows. I will show just a slightly different case. Assume $-a<0$
$$dX_t=-aX_tdt+\sigma dW_t$$
$$dX_t+aX_tdt=\sigma dW_t$$
Multiply by $e^{at}$
$$dX_te^{at}+aX_te^{at}dt=e^{at}\sigma dW_t$$
$$d(X_te^{at})=e^{at}\sigma dW_t$$
Integrate from $0$ to $t$ assuming $X_0=x_0$ known
$$X_te^{at}-x_0=\sigma\int_0^te^{as}dW_s$$
$$X_t=x_0e^{-at}+\sigma\int_0^te^{-a(t-s)}dW_s$$
So you shouldn't need Ito. In fact, to use Ito you need a 'guess', i.e. $F(t,X_t)=e^{at}X_t$. This is also called 'educated guess' and it is just intuition (of an author). The derivatives are
$$\frac{\partial F}{\partial t}=ae^{at}x, \ \ \ \frac{\partial F}{\partial x}=e^{at}, \ \ \ \ \frac{\partial^2 F}{\partial x^2}=0$$
So
$$dF=\frac{\partial F}{\partial t}dt+\frac{\partial F}{\partial x}dX_t+\frac{1}{2}\sigma^2\frac{\partial^2 F}{\partial x^2}dt=$$
$$=ae^{at}X_tdt-ae^{at}X_tdt+e^{at}\sigma dW_t$$
Thus, by integration,
$$X_te^{at}-x_0=\sigma\int_0^te^{as}dW_s$$
$$X_t=x_0e^{-at}+\sigma\int_0^te^{-a(t-s)}dW_s$$
A: Taking into account of the comment made by @user6247850 , your analysis is wrong... Instead, try to use $\frac{\partial f}{\partial x} = \sigma$ (which is a constant) to deduce that $$\frac{\partial f}{\partial t} + \frac{1}{2}\frac{\partial f^2}{\partial^2 x} = \frac{\partial f}{\partial t} = aX_t = a\,f(t,x),$$ then solve $f(t,x)$ directly... Following these lines lead you to $f(t,x) = f(0,x)\,\mathrm{e}^{a\,t}$. But the determination of $f(0,x)$ seems a bit tricky
