Calculus · real student question

Find the general solution of x'' + kx = 0 for every value of the constant k.

Question

Solve

x+kx=0x''+kx=0

for all real values of the constant kk.

Step-by-step solution

  1. Form the characteristic equation. Substituting the trial solution x=ertx=e^{rt} gives x=r2ertx''=r^{2}e^{rt}, so

    r2ert+kert=ert(r2+k)=0r^{2}e^{rt}+ke^{rt}=e^{rt}\left(r^{2}+k\right)=0

    Since ert0e^{rt}\neq0, the roots satisfy r2=kr^{2}=-k. Everything now hinges on the sign of kk, because that decides whether k-k has real or imaginary square roots.

  2. Case k>0k>0: purely imaginary roots, oscillation. Then k<0-k<0, so r=±ikr=\pm i\sqrt{k}. A conjugate imaginary pair with zero real part converts to sine and cosine:

    x(t)=C1cos ⁣(kt)+C2sin ⁣(kt)x(t)=C_{1}\cos\!\left(\sqrt{k}\,t\right)+C_{2}\sin\!\left(\sqrt{k}\,t\right)

    The motion is bounded and periodic with period 2π/k2\pi/\sqrt{k} — this is the simple-harmonic case. A numerical check with k=2.5k=2.5 gives a residual below 10510^{-5} ✓.

  3. Case k=0k=0: a repeated root at zero. The equation collapses to x=0x''=0. Integrating twice,

    x=C1x(t)=C1t+C2x'=C_{1}\quad\Longrightarrow\quad x(t)=C_{1}t+C_{2}

    The double root r=0r=0 contributes the two independent solutions 11 and tt — the extra factor of tt is the standard repeated-root rule, and it is why the answer is a line rather than a single constant.

  4. Case k<0k<0: two real roots, exponential growth and decay. Now k>0-k>0, so r=±kr=\pm\sqrt{-k} are real and opposite in sign:

    x(t)=C1ekt+C2ektx(t)=C_{1}e^{\sqrt{-k}\,t}+C_{2}e^{-\sqrt{-k}\,t}

    Solutions are unbounded (unless C1=0C_{1}=0) and never oscillate. A numerical check with k=2.5k=-2.5 gives a residual below 10410^{-4} ✓. Equivalently x=Acosh(kt)+Bsinh(kt)x=A\cosh(\sqrt{-k}\,t)+B\sinh(\sqrt{-k}\,t).

  5. Collect the three cases.

    x(t)={C1cos ⁣(kt)+C2sin ⁣(kt),k>0C1t+C2,k=0C1ekt+C2ekt,k<0x(t)=\begin{cases}C_{1}\cos\!\left(\sqrt{k}\,t\right)+C_{2}\sin\!\left(\sqrt{k}\,t\right),&k>0\\ C_{1}t+C_{2},&k=0\\ C_{1}e^{\sqrt{-k}\,t}+C_{2}e^{-\sqrt{-k}\,t},&k<0\end{cases}

    Each case has exactly two arbitrary constants, as a second-order equation must. Physically k>0k>0 is a restoring force (a spring) and k<0k<0 is a repelling one (an inverted pendulum).

Answer

x(t)={C1cos ⁣(kt)+C2sin ⁣(kt),k>0C1t+C2,k=0C1ekt+C2ekt,k<0x(t)=\begin{cases}C_{1}\cos\!\left(\sqrt{k}\,t\right)+C_{2}\sin\!\left(\sqrt{k}\,t\right),&k>0\\ C_{1}t+C_{2},&k=0\\ C_{1}e^{\sqrt{-k}\,t}+C_{2}e^{-\sqrt{-k}\,t},&k<0\end{cases}

Need to solve a different problem like this? Open the solver →