Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
you have a minus missing in the right hand side. – lab bhattacharjee Mar 24 '13 at 15:10
@labbhattacharjee, fixed the sign. – vonbrand Mar 24 '13 at 15:22
@71GA, please follow my generic answer. – lab bhattacharjee Mar 24 '13 at 15:23
Linear differential equation. – 1015 Mar 24 '13 at 15:26

Assuming $$ \frac{d^2 \psi}{dx^2} = k^2\psi $$ to be correct,

the Characteristic equation will be $r^2=k^2\implies r=\pm k$

So, $\psi=Ae^{kx}+Be^{-kx}$ where $A,B$ are arbitrary constants

If $k=i b, \psi=Ae^{ibx}+Be^{-ibx}=A(\cos bx+i\sin bx)+B(\cos bx-i\sin bx)$ using Euler's Formula

So, $\psi=(A+B)\cos bx+i(A-B)\sin bx$

$\psi=C\cos bx+D\sin bx$ where $C=A+B,D=i(A-B)$ are arbitrary constants

share|cite|improve this answer

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.
share|cite|improve this answer

There are many ways, as you already know it, you can prove that it is a solution by just plugging it in. But that is not really satisfying I guess. We can write \[ \frac{d^2 \psi}{dx^2}=- k^2 \psi \] as a first order differential equation system \begin{align*} \psi_1 &= \psi'\\ \psi_1' &= - k^2 \psi \end{align*} We can write this equation system as \[ \begin{pmatrix} \psi \\ \psi' \\ \end{pmatrix}' = \begin{pmatrix} 0 & 1\\ -k^2 & 0 \\ \end{pmatrix} \cdot \begin{pmatrix} \psi \\ \psi' \end{pmatrix}\] Here we gonna use the matrix exponential function for which we only need to know the eigenvalues und their multiplicity. The Matrix exponential function comes from the idea that the solution of the 1 dimensional linear ode \[ y'= a y \] is the exponential function, so with a bit luck \[ y'=A y\] will be solved by $y=\exp( A t )$. In fact that is true and as the characteristic polynomial is $$x^2+k^2=(x+ik)\cdot (x-ik)$$ So you get your solutions by a linear combination of $\exp(ikt )$ and $\exp(-ikt )$ and with the identiy \begin{align*} \sin(x)&=\frac{1}{2} \cdot (e^{ix} - e^{-ix})\\ \cos(x)&=\frac{1}{2} \cdot (e^{ix} + e^{-ix}) \end{align*}

share|cite|improve this answer
I am a total beginner in an area of differential equations- haven't even started. So i would need some recommendations on books where i can learn enough dif. eq. to understand this. – 71GA Mar 24 '13 at 16:13
@71GA do you knwo that eigenvalues and eigenvectors are ? – Dominic Michaelis Mar 24 '13 at 16:15
If i recall "eigenvector" is an operator which operates on a matrix and gives a value - "eigenvalue" which is only scalar multiplication of the original eigenvector? I think it is like that but please correct me if i am wrong. – 71GA Mar 24 '13 at 17:15
@71GA an eigenvector is a vector who only get stretches by a matrix (maybe mirrored to) such that $A v = \lambda v$ where $\lambda$ is a scalar. – Dominic Michaelis Mar 24 '13 at 17:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.