Solution to the second order differential equation Hello i have read in a book that second order diferential equation of this form ($\psi$ is a function of $x$): 
$$
\frac{d^2 \psi}{dx^2} = - k^2\, \psi
$$
describes a simple harmonic oscilator and the solution to this second order differential equation is of form: 
$$
\psi = A \sin(k x) + B \cos(kx)
$$
This solution is generaly known, but i want to know the background on how it is calculated out of the first equation. 

You can do this two ways:


*

*Try a solution of the form $\Psi(t) = c e^{\alpha t}$ gives you that $c$ is arbitrary, and $\alpha = \pm k i$, where $i = \sqrt{-1}$. So you have solutions $\Psi(t) = c_1 e^{i k t} + c_2 e^{- i k t}$. By Euler's formula, you can write this in terms of $\sin k t$ and $\cos k t$.

*Note that $\dfrac{d^2}{d t^2} \sin c t = - c^2 \sin c t$ and $\dfrac{d^2}{d t^2} \cos c t = - c^2 \cos c t$, so this is a promising lead to fugde up a pair of solutions.

