I want to solve the Stochastic Differential Equation $$\mathrm{d} S(t) = \left( \beta S(t) + (1- \beta) S_0\right) \sigma \mathrm{d} W(t)$$ where $\beta \in [0,1]$ and $S_0>0$.
I recognized the first part as a Geometric Brownian motion and the second part as a "normal" Brownian motion. My first guess was to assume the solution had the form $S(t)=f(t,W(t))$. This yielded Using Itô's lemma I get: $$\mathrm{d}S(t) = \left(\frac{\partial f}{\partial t} + \frac{\sigma^2}{2}\frac{\partial^2 f}{\partial W^2} \right) \mathrm{d} t + \sigma \frac{\partial f}{\partial W} \mathrm{d}W(t)$$ To solve this we must have $\frac{\partial f}{\partial W} = \beta f + (1-\beta)S_0$ and $\frac{\partial f}{\partial t} + \frac{\sigma^2}{2}\frac{\partial^2 f}{\partial W^2}=0$. Since I did not know how to solve this easily I tried some forms of functions to see if they fit the solution: $S(t)=e^{f(t,W)} g(t,W)$
$$\mathrm{d}S(t) = \left(\frac{\partial f}{\partial t} e^fg + e^f \frac{\partial g}{\partial t} + \frac{\sigma^2}{2}\left[e^f \frac{\partial^2 f}{\partial W^2}g + e^f \left(\frac{\partial f}{\partial W}\right)^2g + 2e^f \frac{\partial f}{\partial W} \frac{\partial g}{\partial W} + e^f \frac{\partial^2 g}{\partial W^2} \right] \right) \mathrm{d} t + \sigma \left[\frac{\partial f}{\partial W} e^fg + e^f \frac{\partial g}{\partial W}\right] \mathrm{d}W(t)$$ This was not much better. Any help or hints would be much appreciated!
The unique solution to the ODE $$\frac{\partial}{\partial x} f(x) = \beta f(x)$$ is clearly given by
$$f(x) = c e^{\beta x}.$$
To obtain a solution of the inhomogeneous ODE $$\frac{\partial}{\partial x} f(x) = \beta f(x) + (1-\beta)S_0 \tag{1}$$
we use a variation of constants approach, i.e. we set
$$f(x) = g(x) e^{\beta x}. \tag{2}$$
Plugging this into $(1)$, we find
$$\beta f(x) + g'(x) e^{\beta x} \stackrel{!}{=} \beta f(x) + (1-\beta)S_0,$$
i.e. $$g'(x) = e^{-\beta x} (1-\beta) S_0.$$ Hence, $$g(x) = c - \frac{1-\beta}{\beta} S_0 e^{-\beta x}.$$ By $(2)$,
$$f(x)= c e^{\beta x} -\frac{1-\beta}{\beta} S_0.$$
We have to choose $c=c(t)$ in such a way that
$$\partial_t f+ \frac{\sigma^2}{2} \partial_{xx} f = 0. \tag{3}$$
Because of our choice of $f$, $(3)$ is equivalent to
$$c'(t) e^{\beta x} + c(t)\frac{\sigma^2}{2} \beta^2 e^{\beta x}=0,$$
i.e.
$$c'(t) = - \frac{\sigma^2 \beta^2}{2} c(t)$$
implying
$$c(t) = C \exp \left(- \frac{\sigma^2 \beta^2}{2} t \right).$$
Hence,
$$f(t,x) = C \exp \left( \beta x- \frac{\sigma^2 \beta^2}{2} t \right) + \frac{\beta-1}{\beta} S_0$$
which means that the candidate for the solution is
$$S_t := C \exp \left( \beta W_t- \frac{\sigma^2 \beta^2}{2} t \right) + \frac{\beta-1}{\beta} S_0.$$
It remains to pick the constant $C$ to get the right initial condition:
$$C + \frac{\beta-1}{\beta} S_0 \stackrel{!}{=} S_0,$$
i.e.
$$C = S_0 \left(1 + \frac{1-\beta}{\beta} \right) = \frac{S_0}{\beta}.$$
Thus, $$S_t= \frac{S_0}{\beta} \exp \left( \beta W_t- \frac{\sigma^2 \beta^2}{2} t \right) + \frac{\beta-1}{\beta} S_0.$$