\begin{equation*}

\frac{d^2 x}{dt^2} = -\omega^2_g \frac{dx}{dt}

\end{equation*}

I tried solving this by substitution of the second order derivative into a variable and transforming the equation into a second order polynomial, and I get the solution involving an exponential. But, the solution includes a sinusoidal function, which I don't know how it got a sinusoidal function.