I am able to compute the general solution of a standard geometric Brownian motion, but I'm struggling to find the general solution for a GBM where volatility and mean depend on time, $$\text{d}S_t = \mu(t) S_t\text{d}t+\sigma(t) S_t\text{d}W_t.$$
The general solution for a standard geometric Brownian, $\text{d}S_t = \mu S_t\text{d}t+\sigma S_t\text{d}W_t$ can be computed by firstly separating the variables $\frac{\text{d}S_t}{S_t} = \mu \text{d}t+\sigma \text{d}W_t$, then taking integration on both sides $\int\frac{\text{d}S_t}{S_t} = \int \mu dt+\sigma dW_t$. Since $\frac{\text dS_t}{S_t}$ links to the derivative of $\ln(S_t)$, the proceeding step constitutes the Itô calculus and results in $\ln(S_t) = (\mu - \frac{1}{2} \sigma^2)t + \sigma W_t$. Then taking exponential on both sides and plugging in the initial condition $S(0)$ we obtain the analytical solution $S(t) = S(0) e^{(\mu - \frac{1}{2} \sigma^2)t+ \sigma W_t}$
However, when $\mu$ and $\sigma$ are time dependent $\text{d}S_t = \mu(t) S_t\text{d}t+\sigma(t) S_t\text{d}W_t$, the solution is totally different and I tried applying the same methods I used in a standard geometric Brownian motion but the solution is not correct. I have found some material online but it doesn't seem to make sense to me ... I am able to continue up until integrating on both sides, then after that I don't know what to do.