A second order differential equation is one containing the second derivative. These are in general quite complicated, but one fairly simple type is useful: the second order linear equation with constant coefficients.

Example 17.5.1 Consider the intial value problem $\ddot y-\dot y-2y=0$, $y(0)=5$, $\dot y(0)=0$. We make an inspired guess: might there be a solution of the form $\ds e^{rt}$? This seems at least plausible, since in this case $\ds\ddot y$, $\ds\dot y$, and $y$ all involve $\ds e^{rt}$.

If such a function is a solution then $$\eqalign{ r^2 e^{rt}-r e^{rt}-2e^{rt}&=0\cr e^{rt}(r^2-r-2)&=0\cr (r^2-r-2)&=0\cr (r-2)(r+1)&=0,\cr} $$ so $r$ is $2$ or $-1$. Not only are $\ds f=e^{2t}$ and $\ds g=e^{-t}$ solutions, but notice that $\ds y=Af+Bg$ is also, for any constants $A$ and $B$: $$\eqalign{ (Af+Bg)''-(Af+Bg)'-2(Af+Bg)&=Af''+Bg''-Af'-Bg'-2Af-2Bg\cr &=A(f''-f'-2f)+B(g''-g'-2g)\cr &=A(0)+B(0)=0.\cr} $$ Can we find $A$ and $B$ so that this is a solution to the initial value problem? Let's substitute: $$ 5=y(0)=Af(0)+Bg(0)=Ae^0+Be^0=A+B $$ and $$0=\dot y(0)=Af'(0)+Bg'(0)=A2e^{0}+B(-1)e^0=2A-B.$$ So we need to find $A$ and $B$ that make both $5=A+B$ and $0=2A-B$ true. This is a simple set of simultaneous equations: solve $B=2A$, substitute to get $5=A+2A=3A$. Then $A=5/3$ and $B=10/3$, and the desired solution is $\ds (5/3)e^{2t}+(10/3)e^{-t}$. You now see why the initial condition in this case included both $y(0)$ and $\dot y(0)$: we needed two equations in the two unknowns $A$ and $B$

You should of course wonder whether there might be other solutions; the answer is no. We will not prove this, but here is the theorem that tells us what we need to know:

Theorem 17.5.2 Given
the differential equation $\ds a\ddot y+b\dot y+cy=0$, $a\not=0$,
consider the quadratic polynomial $ax^2+bx+c$, called the
**characteristic polynomial**.
Using the quadratic formula, this polynomial
always has one or two roots, call them $r$ and $s$. The general
solution of the differential equation is:

(a) $\ds y=Ae^{rt}+Be^{st}$, if the roots $r$ and $s$ are real numbers and $r\not=s$.

(b) $\ds y=Ae^{rt}+Bte^{rt}$, if $r=s$ is real.

(c) $\ds y=A\cos(\beta t)e^{\alpha t}+B\sin(\beta t)e^{\alpha t}$, if the roots $r$ and $s$ are complex numbers $\alpha+\beta i$ and $\alpha-\beta i$.

Example 17.5.3 Suppose a mass $m$ is hung on a spring with spring constant $k$. If the spring is compressed or stretched and then released, the mass will oscillate up and down. Because of friction, the oscillation will be damped: eventually the motion will cease. The damping will depend on the amount of friction; for example, if the system is suspended in oil the motion will cease sooner than if the system is in air. Using some simple physics, it is not hard to see that the position of the mass is described by this differential equation: $\ds m\ddot y+b\dot y+ky=0$. Using $m=1$, $b=4$, and $k=5$ we find the motion of the mass. The characteristic polynomial is $x^2+4x+5$ with roots $(-4\pm\sqrt{16-20})/2=-2\pm i$. Thus the general solution is $\ds y=A\cos(t)e^{-2t}+B\sin(t)e^{-2t}$. Suppose we know that $y(0)=1$ and $\dot y(0)=2$. Then as before we form two simultaneous equations: from $y(0)=1$ we get $1=A\cos(0)e^0+B\sin(0)e^0=A$. For the second we compute $$\ddot y=-2Ae^{-2t}\cos(t)+Ae^{-2t}(-\sin(t))-2Be^{-2t}\sin(t)+ Be^{-2t}\cos(t),$$ and then $$2=-2Ae^0\cos(0)-Ae^0\sin(0)-2Be^0\sin(0)+Be^0\cos(0) =-2A+B.$$ So we get $A=1$, $B=4$, and $\ds y=\cos(t)e^{-2t}+4\sin(t)e^{-2t}$.

Here is a useful trick that makes this easier to understand: We have $\ds y=(\cos t+4\sin t)e^{-2t}$. The expression $\cos t+4 \sin t$ is a bit reminiscent of the trigonometric formula $\cos(\alpha-\beta)=\cos(\alpha)\cos(\beta)+\sin(\alpha)\sin(\beta)$ with $\alpha=t$. Let's rewrite it a bit as $$\sqrt{17}\left({1\over\sqrt{17}}\cos t + {4\over\sqrt{17}}\sin t\right).$$ Note that $\ds (1/\sqrt{17})^2+(4/\sqrt{17})^2=1$, which means that there is an angle $\beta$ with $\ds \cos\beta=1/\sqrt{17}$ and $\ds \sin\beta=4/\sqrt{17}$ (of course, $\beta$ may not be a "nice'' angle). Then $$\cos t+4\sin t = \sqrt{17}\left(\cos t\cos \beta+\sin\beta\sin t\right) =\sqrt{17}\cos(t-\beta).$$ Thus, the solution may also be written $\ds y=\sqrt{17}e^{-2t}\cos(t-\beta)$. This is a cosine curve that has been shifted $\beta$ to the right; the $\ds \sqrt{17}e^{-2t}$ has the effect of diminishing the amplitude of the cosine as $t$ increases; see figure 17.5.1. The oscillation is damped very quickly, so in the first graph it is not clear that this is an oscillation. The second graph shows a restricted range for $t$.

Other physical systems that oscillate can also be described by such differential equations. Some electric circuits, for example, generate oscillating current.

Example 17.5.4 Find the solution to the intial value problem $\ds\ddot y-4\dot y+4y=0$, $y(0)=-3$, $\dot y(0)=1$. The characteristic polynomial is $x^2-4x+4=(x-2)^2$, so there is one root, $r=2$, and the general solution is $\ds Ae^{2t}+Bte^{2t}$. Substituting $t=0$ we get $-3=A+0=A$. The first derivative is $\ds 2Ae^{2t}+2Bte^{2t}+Be^{2t}$; substituting $t=0$ gives $1=2A+0+B=2A+B=2(-3)+B=-6+B$, so $B=7$. The solution is $\ds -3e^{2t}+7te^{2t}$.

## Exercises 17.5

**Ex 17.5.1**
Verify that the function in part (a) of
theorem 17.5.2 is a solution to
the differential equation $\ds a\ddot y+b\dot y+cy=0$.

**Ex 17.5.2**
Verify that the function in part (b) of
theorem 17.5.2 is a solution to
the differential equation $\ds a\ddot y+b\dot y+cy=0$.

**Ex 17.5.3**
Verify that the function in part (c) of
theorem 17.5.2 is a solution to
the differential equation $\ds a\ddot y+b\dot y+cy=0$.

**Ex 17.5.4**
Solve the initial value problem $\ds\ddot y-\omega^2y=0$,
$y(0)=1$, $\ds\dot y(0)=1$, assuming $\omega\not=0$.
(answer)

**Ex 17.5.5**
Solve the initial value problem $\ds2\ddot y+18y=0$,
$y(0)=2$, $\ds\dot y(0)=15$.
(answer)

**Ex 17.5.6**
Solve the initial value problem
$\ds \ddot y+6\dot y +5y=0$,
$y(0)=1$, $\ds\dot y(0)=0$.
(answer)

**Ex 17.5.7**
Solve the initial value problem
$\ds\ddot y-\dot y-12y=0$,
$y(0)=0$, $\ds\dot y(0)=14$.
(answer)

**Ex 17.5.8**
Solve the initial value problem
$\ds\ddot y+12\dot y+36y=0$,
$y(0)=5$, $\ds\dot y(0)=-10$.
(answer)

**Ex 17.5.9**
Solve the initial value problem
$\ds\ddot y-8\dot y+16y=0$,
$y(0)=-3$, $\ds\dot y(0)=4$.
(answer)

**Ex 17.5.10**
Solve the initial value problem
$\ds\ddot y+5y=0$,
$y(0)=-2$, $\ds\dot y(0)=5$.
(answer)

**Ex 17.5.11**
Solve the initial value problem
$\ds\ddot y+y=0$,
$y(\pi/4)=0$, $\ds\dot y(\pi/4)=2$.
(answer)

**Ex 17.5.12**
Solve the initial value problem
$\ds\ddot y+12\dot y+37y=0$,
$y(0)=4$, $\ds\dot y(0)=0$.
(answer)

**Ex 17.5.13**
Solve the initial value problem
$\ds\ddot y+6\dot y+18y=0$,
$y(0)=0$, $\ds\dot y(0)=6$.
(answer)

**Ex 17.5.14**
Solve the initial value problem
$\ds\ddot y+4y=0$,
$y(0)=\sqrt3$, $\ds\dot y(0)=2$. Put your answer in the form developed
at the end of example 17.5.3.
(answer)

**Ex 17.5.15**
Solve the initial value problem
$\ds\ddot y+100y=0$,
$y(0)=5$, $\ds\dot y(0)=50$. Put your answer in the form developed
at the end of example 17.5.3.
(answer)

**Ex 17.5.16**
Solve the initial value problem
$\ds\ddot y+4\dot y+13y=0$,
$y(0)=1$, $\ds\dot y(0)=1$. Put your answer in the form developed
at the end of example 17.5.3.
(answer)

**Ex 17.5.17**
Solve the initial value problem
$\ds\ddot y-8\dot y+25y=0$,
$y(0)=3$, $\ds\dot y(0)=0$. Put your answer in the form developed
at the end of example 17.5.3.
(answer)

**Ex 17.5.18**
A mass-spring system $\ds m\ddot y+b\dot y+ky$ has
$k=29$, $b=4$, and $m=1$. At time $t=0$ the position is $y(0)=2$ and
the velocity is $\dot y(0)=1$. Find $y(t)$.
(answer)

**Ex 17.5.19**
A mass-spring system $\ds m\ddot y+b\dot y+ky$ has
$k=24$, $b=12$, and $m=3$. At time $t=0$ the position is $y(0)=0$ and
the velocity is $\dot y(0)=-1$. Find $y(t)$.
(answer)

**Ex 17.5.20**
Consider
the differential equation $\ds a\ddot y + b\dot
y=0$, with $a$ and $b$ both non-zero. Find the general solution by the
method of this section. Now let $\ds g=\dot y$; the equation may be
written as $\ds a\dot g+bg=0$, a first order linear homogeneous
equation. Solve this for $g$, then use the relationship $\ds g=\dot y$ to
find $y$.

**Ex 17.5.21**
Suppose that $y(t)$ is a solution to $\ds a\ddot y+b\dot
y+cy=0$, $y(t_0)=0$, $\ds\dot y(t_0)=0$. Show that $y(t)=0$.