Consider the SDE $$dX_t = (a+bX_t)dt +cX_t dB_t,$$ where $B_t$ is Brownian motion, and $a,b,c >0$. The solution should be $$X_t = e^{(-\frac{1}{2}c^2+b)t+cB_t}[X_0 + a \int_0^t e^{(\frac{1}{2}c^2-b)s-cB_s} ds].$$
I try to apply Itô formula to $$g = e^{(\frac{1}{2}c^2-b)t-cB_t}X_t,$$ but I get a different solution.
I have: $\frac{dg}{dt} = (\frac{1}{2}c^2-b)g~$ and $~\frac{dg}{dX_t} = e^{(\frac{1}{2}c^2-b)t-cB_t}$. Then $$d e^{(\frac{1}{2}c^2-b)t-cB_t}X_t = \frac{dg}{dt} dt + \frac{dg}{dX_t} dX_t.$$ But should I apply stochastic product rule to $d e^{(\frac{1}{2}c^2-b)t-cB_t}X_t$? I think so, then I get: $$d e^{(\frac{1}{2}c^2-b)t-cB_t}X_t + e^{(\frac{1}{2}c^2-b)t-cB_t}dX_t = (\frac{1}{2}c^2-b)e^{(\frac{1}{2}c^2-b)t-cB_t}X_t dt + e^{(\frac{1}{2}c^2-b)t-cB_t} dX_t.$$ Which yields to: $$d e^{(\frac{1}{2}c^2-b)t-cB_t}X_t = (\frac{1}{2}c^2-b)e^{(\frac{1}{2}c^2-b)t-cB_t}X_t dt.$$
But now the coefficient $a$ does not occur before integral. So where I make mistakes?