[Math] solving simple harmonic oscillator

classical-mechanicsordinary differential equations

I am not understanding the general solution of the simple harmonic oscillator.

How can it get from here:

$\frac{\mathrm{d}^2x }{\mathrm{d} t^2}=-\omega _{0}^2x$

to here:

$x(t)=x_{0}cos(\omega_{0}t) +\frac{v_{0}}{\omega_{0}}sin(\omega_{0}t)$

I do understand that: $x(t)=Asin(\omega_{0}t-\delta)$ and $x(t)=Acos(\omega_{0}t-\phi)$ are solutions. And in this case, i can summ all the possible solutions to have the general one. But i didn't undersand where $x_{0}$ and $\frac{v_{0}}{\omega_{0}}$ came from.

Best Answer

Consider the Cauchy problem $$\begin{cases}x''=-\omega^2 x \\x(0)=x_0 \\\dot{x}(0)=v_0 \end{cases}$$ The first equation is linear and has characteristic equation $$\lambda^2=-\omega_0^2$$ with solutions $\lambda_{1,2}=\pm i\omega_0$. This shows that the general solution is $$x(t)=A\cos(\omega t)+B \sin (\omega t)$$ for some $A,B\in \mathbb R$. Imposing the conditions of the Cauchy problem yields $$\begin{cases}x(0)=A \cos(0)+B \sin (0)=A=x_0 \\ \dot x(0)=-\omega A \sin(0)+\omega B \cos(0)=\omega B=v_0 \end{cases}$$ so $A=x_0$, $B=\frac{v_0}{\omega}$. Hence, $$x(t)=x_0 \cos (\omega t)+\frac{v_0}{\omega}\sin(\omega t)$$

Related Question