8.4: Homogeneous linear second-order ode with con- stant coefficients
- Page ID
- 96177
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\dsum}{\displaystyle\sum\limits} \)
\( \newcommand{\dint}{\displaystyle\int\limits} \)
\( \newcommand{\dlim}{\displaystyle\lim\limits} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\(\newcommand{\longvect}{\overrightarrow}\)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)We now study solutions of the homogeneous, constant coefficient ode, written as
\[a \ddot{x}+b \dot{x}+c x=0, \nonumber \]
with \(a, b\), and \(c\) constants. Such an equation arises for the charge on a capacitor in an unpowered RLC electrical circuit, or for the position of a freely-oscillating frictional mass on a spring, or for a damped pendulum. Our solution method finds two linearly independent solutions to Equation \ref{8.10}, multiplies each of these solutions by a constant, and adds them. The two free constants can then be used to satisfy two given initial conditions.
Because of the differential properties of the exponential function, a natural ansatz, or educated guess, for the form of the solution to Equation \ref{8.10} is \(x=e^{r t}\), where \(r\) is a constant to be determined. Successive differentiation results in \(\dot{x}=r e^{r t}\) and \(\ddot{x}=r^{2} e^{r t}\), and substitution into Equation \ref{8.10} yields
\[a r^{2} e^{r t}+b r e^{r t}+c e^{r t}=0 . \nonumber \]
Our choice of exponential function is now rewarded by the explicit cancelation in Equation \ref{8.11} of \(e^{r t}\). The result is a quadratic equation for the unknown constant \(r\) :
\[a r^{2}+b r+c=0 . \nonumber \]
Our ansatz has thus converted a differential equation into an algebraic equation. Equation Equation \ref{8.12} is called the characteristic equation of Equation \ref{8.10}. Using the quadratic formula, the two solutions of the characteristic equation Equation \ref{8.12} are given by
\[r_{\pm}=\frac{1}{2 a}\left(-b \pm \sqrt{b^{2}-4 a c}\right) . \nonumber \]
There are three cases to consider: (1) if \(b^{2}-4 a c>0\), then the two roots are distinct and real; (2) if \(b^{2}-4 a c<0\), then the two roots are complex conjugates (3) if \(b^{2}-\) \(4 a c=0\), then the two roots are degenerate and there is only one real root. We will consider these three cases in turn.
8.4.1. Distinct real roots
When \(r_{+} \neq r_{-}\)are real roots, then the general solution to Equation \ref{8.10} can be written as a linear superposition of the two solutions \(e^{r+t}\) and \(e^{r-t}\); that is,
\[x(t)=c_{1} e^{r_{+} t}+c_{2} e^{r-t} . \nonumber \]
The unknown constants \(c_{1}\) and \(c_{2}\) can then be determined by the given initial conditions \(x\left(t_{0}\right)=x_{0}\) and \(\dot{x}\left(t_{0}\right)=u_{0}\). We now present two examples.
Example 1: Solve \(\ddot{x}+5 \dot{x}+6 x=0\) with \(x(0)=2, \dot{x}(0)=3\), and find the maximum value attained by \(x\).
We take as our ansatz \(x=e^{r t}\) and obtain the characteristic equation
\[r^{2}+5 r+6=0 \nonumber \]
which factors to
\[(r+3)(r+2)=0 \nonumber \]
The general solution to the ode is thus
\[x(t)=c_{1} e^{-2 t}+c_{2} e^{-3 t} \nonumber \]
The solution for \(\dot{x}\) obtained by differentiation is
\[\dot{x}(t)=-2 c_{1} e^{-2 t}-3 c_{2} e^{-3 t} . \nonumber \]
Use of the initial conditions then results in two equations for the two unknown constant \(c_{1}\) and \(c_{2}\) :
\[\begin{aligned} c_{1}+c_{2} &=2 \\ -2 c_{1}-3 c_{2} &=3 . \end{aligned} \nonumber \]
Adding three times the first equation to the second equation yields \(c_{1}=9\); and the first equation then yields \(c_{2}=2-c_{1}=-7\). Therefore, the unique solution that satisfies both the ode and the initial conditions is
\[\begin{aligned} x(t) &=9 e^{-2 t}-7 e^{-3 t} \\ &=9 e^{-2 t}\left(1-\frac{7}{9} e^{-t}\right) . \end{aligned} \nonumber \]
Note that although both exponential terms decay in time, their sum increases initially since \(\dot{x}(0)>0\). The maximum value of \(x\) occurs at the time \(t_{m}\) when \(\dot{x}=0\), or
\[t_{m}=\ln (7 / 6) \text {. } \nonumber \]
The maximum \(x_{m}=x\left(t_{m}\right)\) is then determined to be
\[x_{m}=108 / 49 . \nonumber \]
Example 2: Solve \(\ddot{x}-x=0\) with \(x(0)=x_{0}, \dot{x}(0)=u_{0}\).
Again our ansatz is \(x=e^{r t}\), and we obtain the characteristic equation
\[r^{2}-1=0 \nonumber \]
with solution \(r_{\pm}=\pm 1\). Therefore, the general solution for \(x\) is
\[x(t)=c_{1} e^{t}+c_{2} e^{-t} \nonumber \]
and the derivative satisfies
\[\dot{x}(t)=c_{1} e^{t}-c_{2} e^{-t} \nonumber \]
Initial conditions are satisfied when
\[\begin{aligned} &c_{1}+c_{2}=x_{0} \\ &c_{1}-c_{2}=u_{0} . \end{aligned} \nonumber \]
Adding and subtracting these equations, we determine
\[c_{1}=\frac{1}{2}\left(x_{0}+u_{0}\right), \quad c_{2}=\frac{1}{2}\left(x_{0}-u_{0}\right) \nonumber \]
so that after rearranging terms
\[x(t)=x_{0}\left(\frac{e^{t}+e^{-t}}{2}\right)+u_{0}\left(\frac{e^{t}-e^{-t}}{2}\right) \nonumber \]
The terms in parentheses are the usual definitions of the hyperbolic cosine and sine functions; that is,
\[\cosh t=\frac{e^{t}+e^{-t}}{2}, \quad \sinh t=\frac{e^{t}-e^{-t}}{2} . \nonumber \]
Our solution can therefore be rewritten as
\[x(t)=x_{0} \cosh t+u_{0} \sinh t \nonumber \]
Note that the relationships between the trigonometric functions and the complex exponentials were given by
\[\cos t=\frac{e^{i t}+e^{-i t}}{2}, \quad \sin t=\frac{e^{i t}-e^{-i t}}{2 i} \nonumber \]
so that
\[\cosh t=\cos i t, \quad \sinh t=-i \sin i t . \nonumber \]
Also note that the hyperbolic trigonometric functions satisfy the differential equations
\[\frac{d}{d t} \sinh t=\cosh t, \quad \frac{d}{d t} \cosh t=\sinh t \nonumber \]
which though similar to the differential equations satisfied by the more commonly used trigonometric functions, is absent a minus sign.
8.4.2. Distinct complex-conjugate roots
We now consider a characteristic equation Equation \ref{8.12} with \(b^{2}-4 a c<0\), so the roots occur as complex conjugate pairs. With
\[\lambda=-\frac{b}{2 a}, \quad \mu=\frac{1}{2 a} \sqrt{4 a c-b^{2}} \nonumber \]
the two roots of the characteristic equation are \(\lambda+i \mu\) and \(\lambda-i \mu\). We have thus found the following two complex exponential solutions to the differential equation:
\[Z_{1}(t)=e^{\lambda t} e^{i \mu t}, \quad Z_{2}(t)=e^{\lambda t} e^{-i \mu t} . \nonumber \]
Applying the principle of superposition, any linear combination of \(Z_{1}\) and \(Z_{2}\) is also a solution to the second-order ode
Recall that if \(z=x+i y\), then \(\operatorname{Re} z=(z+\bar{z}) / 2\) and \(\operatorname{Im} z=(z-\bar{z}) / 2 i\). We can therefore form two different linear combinations of \(Z_{1}(t)\) and \(Z_{2}(t)\) that are real, namely \(X_{1}(t)=\operatorname{Re} Z_{1}(t)\) and \(X_{2}(t)=\operatorname{Im} Z_{1}(t)\). We have
\[X_{1}(t)=e^{\lambda t} \cos \mu t, \quad X_{2}(t)=e^{\lambda t} \sin \mu t . \nonumber \]
Having found these two real solutions, \(X_{1}(t)\) and \(X_{2}(t)\), we can then apply the principle of superposition a second time to determine the general solution for \(x(t)\) :
\[x(t)=e^{\lambda t}(A \cos \mu t+B \sin \mu t) . \nonumber \]
It is best to memorize this result. The real part of the roots of the characteristic equation goes into the exponential function; the imaginary part goes into the argument of cosine and sine.
Example 1: Solve \(\ddot{x}+x=0\) with \(x(0)=x_{0}\) and \(\dot{x}(0)=u_{0}\).
The characteristic equation is
\[r^{2}+1=0 \nonumber \]
with roots
\[r_{\pm}=\pm i \nonumber \]
The general solution of the ode is therefore
\[x(t)=A \cos t+B \sin t . \nonumber \]
The derivative is
\[\dot{x}(t)=-A \sin t+B \cos t . \nonumber \]
Applying the initial conditions:
\[x(0)=A=x_{0}, \quad \dot{x}(0)=B=u_{0} ; \nonumber \]
so that the final solution is
\[x(t)=x_{0} \cos t+u_{0} \sin t . \nonumber \]
Recall that we wrote the analogous solution to the ode \(\ddot{x}-x=0\) as \(x(t)=\) \(x_{0} \cosh t+u_{0} \sinh t\).
Example 2: Solve \(\ddot{x}+\dot{x}+x=0\) with \(x(0)=1\) and \(\dot{x}(0)=0\).
The characteristic equation is
\[r^{2}+r+1=0 \nonumber \]
with roots
\[r_{\pm}=-\frac{1}{2} \pm i \frac{\sqrt{3}}{2} . \nonumber \]
The general solution of the ode is therefore
\[x(t)=e^{-\frac{1}{2} t}\left(A \cos \frac{\sqrt{3}}{2} t+B \sin \frac{\sqrt{3}}{2} t\right) \nonumber \]
The derivative is
\[\begin{aligned} \dot{x}(t)=-\frac{1}{2} e^{-\frac{1}{2} t}\left(A \cos \frac{\sqrt{3}}{2} t+B \sin \frac{\sqrt{3}}{2} t\right) \\ &+\frac{\sqrt{3}}{2} e^{-\frac{1}{2} t}\left(-A \sin \frac{\sqrt{3}}{2} t+B \cos \frac{\sqrt{3}}{2} t\right) . \end{aligned} \nonumber \]
Applying the initial conditions \(x(0)=1\) and \(\dot{x}(0)=0\) :
\[\begin{gathered} A=1 \\ -\frac{1}{2} A+\frac{\sqrt{3}}{2} B=0 \end{gathered} \nonumber \]
or
\[A=1, \quad B=\frac{\sqrt{3}}{3} \nonumber \]
Therefore,
\[x(t)=e^{-\frac{1}{2} t}\left(\cos \frac{\sqrt{3}}{2} t+\frac{\sqrt{3}}{3} \sin \frac{\sqrt{3}}{2} t\right) \nonumber \]
8.4.3. Degenerate roots
Finally, we consider the characteristic equation,
\[a r^{2}+b r+c=0, \nonumber \]
with \(b^{2}-4 a c=0\). The degenerate root is then given by
\[r=-\frac{b}{2 a} \nonumber \]
yielding only a single solution to the ode:
\[x_{1}(t)=\exp \left(-\frac{b t}{2 a}\right) . \nonumber \]
To satisfy two initial conditions, a second independent solution must be found with nonzero Wronskian, and apparently this second solution is not of the form of our ansatz \(x=\exp (r t)\).
One method to determine this missing second solution is to try the ansatz
\[x(t)=y(t) x_{1}(t), \nonumber \]
where \(y(t)\) is an unknown function that satisfies the differential equation obtained by substituting Equation \ref{8.15} into Equation \ref{8.10}. This standard technique is called the reduction of order method and enables one to find a second solution of a homogeneous linear differential equation if one solution is known. If the original differential equation is of order \(n\), the differential equation for \(y=y(t)\) reduces to an order one lower, that is, \(n-1\).
Here, however, we will determine this missing second solution through a limiting process. We start with the solution obtained for complex roots of the characteristic equation, and then arrive at the solution obtained for degenerate roots by taking the limit \(\mu \rightarrow 0\).
Now, the general solution for complex roots was given by Equation \ref{8.13}, and to properly limit this solution as \(\mu \rightarrow 0\) requires first satisfying the specific initial conditions \(x(0)=x_{0}\) and \(\dot{x}(0)=u_{0}\). Solving for \(A\) and \(B\), the general solution given by Equation \ref{8.13} becomes the specific solution
\[x(t ; \mu)=e^{\lambda t}\left(x_{0} \cos \mu t+\frac{u_{0}-\lambda x_{0}}{\mu} \sin \mu t\right) \nonumber \]
Here, we have written \(x=x(t ; \mu)\) to show explicitly that \(x\) depends on \(\mu\).
Taking the limit as \(\mu \rightarrow 0\), and using \(\lim _{\mu \rightarrow 0} \mu^{-1} \sin \mu t=t\), we have
\[\lim _{\mu \rightarrow 0} x(t ; \mu)=e^{\lambda t}\left(x_{0}+\left(u_{0}-\lambda x_{0}\right) t\right) . \nonumber \]
The second solution is observed to be a constant, \(u_{0}-\lambda x_{0}\), times \(t\) times the first solution, \(e^{\lambda t}\). Our general solution to the ode \(Equation \ref{8.10}\) when \(b^{2}-4 a c=0\) can therefore be written in the form
\[x(t)=\left(c_{1}+c_{2} t\right) e^{r t}, \nonumber \]
where \(r\) is the repeated root of the characteristic equation. The main result to be remembered is that for the case of repeated roots, the second solution is \(t\) times the first solution.
Example: Solve \(\ddot{x}+2 \dot{x}+x=0\) with \(x(0)=1\) and \(\dot{x}(0)=0\).
The characteristic equation is
\[\begin{aligned} r^{2}+2 r+1 &=(r+1)^{2} \\ &=0 \end{aligned} \nonumber \]
which has a repeated root given by \(r=-1\). Therefore, the general solution to the ode is
\[x(t)=c_{1} e^{-t}+c_{2} t e^{-t} \nonumber \]
with derivative
\[\dot{x}(t)=-c_{1} e^{-t}+c_{2} e^{-t}-c_{2} t e^{-t} . \nonumber \]
Applying the initial conditions, we have
\[\begin{gathered} c_{1}=1, \\ -c_{1}+c_{2}=0, \end{gathered} \nonumber \]
so that \(c_{1}=c_{2}=1\). Therefore, the solution is
\[x(t)=(1+t) e^{-t} . \nonumber \]


