Skip to main content
Mathematics LibreTexts

4.4: Homogeneous ODEs

  • Page ID
    90409
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \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{\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}\)

    View tutorial on YouTube

    We now study solutions of the homogeneous, constant coefficient ode, written as \[\label{eq:1}a\overset{..}{x}+b\overset{.}{x}+cx=0,\] 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 \(\eqref{eq:1}\), 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 \(\eqref{eq:1}\) is \(x = e^{rt}\), where \(r\) is a constant to be determined. Successive differentiation results in \(\overset{.}{x}= re^{rt}\) and \(\overset{..}{x}= r^2 e^{rt}\), and substitution into \(\eqref{eq:1}\) yields \[\label{eq:2}ar^2e^{rt}+bre^{rt}+ce^{rt}=0.\]

    Our choice of exponential function is now rewarded by the explicit cancelation in \(\eqref{eq:2}\) of \(e^{rt}\). The result is a quadratic equation for the unknown constant \(r\):

    \[\label{eq:3}ar^2+br+c=0.\]

    Our ansatz has thus converted a differential equation into an algebraic equation. Equation \(\eqref{eq:3}\) is called the characteristic equation of \(\eqref{eq:1}\). Using the quadratic formula, the two solutions of the characteristic equation \(\eqref{eq:3}\) are given by \[r_{\pm}=\frac{1}{2a}\left(-b\pm\sqrt{b^2-4ac}\right).\nonumber\]

    There are three cases to consider:

    1. if \(b^2 − 4ac > 0\), then the two roots are distinct and real;
    2. if \(b^2 − 4ac < 0\), then the two roots are distinct and complex conjugates of each other;
    3. if \(b^2 − 4ac = 0\), then the two roots are degenerate and there is only one real root. We will consider these three cases in turn.

    Distinct Real Roots

    When \(r_+\neq r_−\) are real roots, then the general solution to \(\eqref{eq:1}\) can be written as a linear superposition of the two solutions \(e^{r_+t}\) and \(e^{r_−t}\); that is, \[x(t)=c_1e^{r_+t}+c_2e^{r_-t}.\nonumber\]

    The unknown constants \(c_1\) and \(c_2\) can then be determined by the given initial conditions \(x(t_0) = x_0\) and \(\overset{.}{x}(t_0) = u_0\). We now present two examples.

    Example \(\PageIndex{1}\)

    Solve \(\overset{..}{x}+5\overset{.}{x}+6x=0\) with \(x(0)=2\), \(\overset{.}{x}(0)=3\), and find the maximum value attained by \(x\).

    Solution

    View tutorial on YouTube

    We take as our ansatz \(x = e^{rt}\) and obtain the characteristic equation \[r^2+5r+6=0,\nonumber\] which factors to \[(r+3)(r+2)=0.\nonumber\]

    The general solution to the ode is thus \[x(t)=c_1e^{-2t}+c_2e^{-3t}.\nonumber\]

    The solution for \(\overset{.}{x}\) obtained by differentiation is \[\overset{.}{x}(t)=-2c_1e^{-2t}-3c_2e^{-3t}.\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, \\ -2c_1-3c_2&=3.\end{aligned}\]

    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)&=9e^{-2t}-7e^{-3t} \\ &=9e^{-2t}\left(1-\frac{7}{9}e^{-t}\right).\end{aligned}\]

    Note that although both exponential terms decay in time, their sum increases initially since \(\overset{.}{x}(0) > 0\). The maximum value of \(x\) occurs at the time \(t_m\) when \(\overset{.}{x}= 0\), or \[t_m=\ln (7/6).\nonumber\]

    The maximum \(x_m = x(t_m)\) is then determined to be \[x_m=108/49.\nonumber\]

    Example \(\PageIndex{2}\)

    Solve \(\overset{..}{x}-x=0\) with \(x(0)=x_0\), \(\overset{.}{x}(0)=u_0\).

    Solution

    Again our ansatz is \(x = e^{rt}\), and we obtain the characteristic equation \[r^2-1=0,\nonumber\] with solution \(r_± = ±1\). Therefore, the general solution for \(x\) is \[x(t)=c_1e^t+c_2e^{-t},\nonumber\] and the derivative satisfies \[\overset{.}{x}(t)=c_1e^t-c_2e^{-t}.\nonumber\]

    Initial conditions are satisfied when \[\begin{aligned}c_1+c_2&=x_0, \\ c_1-c_2&=u_0.\end{aligned}\]

    Adding and subtracting these equations, we determine \[c_1=\frac{1}{2}(x_0+u_0),\quad c_2=\frac{1}{2}(x_0-u_0),\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^{it}+e^{-it}}{2},\quad\sin t=\frac{e^{it}-e^{-it}}{2i},\nonumber\] so that \[\cosh t=\cos it,\quad\sinh t=-i\sin it.\nonumber\]

    Also note that the hyperbolic trigonometric functions satisfy the differential equations \[\frac{d}{dt}\sinh t=\cosh t,\quad\frac{d}{dt}\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.

    Distinct Complex-Conjugate Roots

    View tutorial on YouTube

    We now consider a characteristic equation \(\eqref{eq:3}\) with \(b^2 − 4ac < 0\), so the roots occur as complex-conjugate pairs. With \[\lambda =-\frac{b}{2a},\quad\mu =\frac{1}{2a}\sqrt{4ac-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 + iy\), then \(\text{Re }z = (z + \overline{z})/2\) and \(\text{Im }z = (z − \overline{z})/2i\). We can therefore form two different linear combinations of \(Z_1(t)\) and \(Z_2(t)\) that are real, namely \(X_1(t) = \text{Re }Z_1(t)\) and \(X_2(t) = \text{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)\):

    \[\label{eq:4}x(t)=e^{\lambda t}(A\cos\mu t+B\sin\mu t).\]

    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 \(\PageIndex{3}\)

    Solve \(\overset{..}{x}+x=0\) with \(x(0)=x_0\) and \(\overset{.}{x}(0)=u_0\).

    Solution

    View tutorial on YouTube

    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 \[\overset{.}{x}(t)=-A\sin t+B\cos t.\nonumber\]

    Applying the initial conditions:

    \[x(0)=A=x_0,\quad\overset{.}{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 \(\overset{..}{x}− x = 0\) as \(x(t) = x_0 \cosh t + u_0 \sinh t\).

    Example \(\PageIndex{4}\)

    Solve \(\overset{..}{x}+\overset{.}{x}+x=0\) with \(x(0)=1\) and \(\overset{.}{x}(0)=0\).

    Solution

    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 \[\overset{.}{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).\nonumber\]

    Applying the initial conditions \(x(0) = 1\) and \(\overset{.}{x}(0) = 0\):

    \[\begin{aligned}A&=1, \\ \frac{-1}{2}A+\frac{\sqrt{3}}{2}B&=0;\end{aligned}\] 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\]

    Repeated Roots

    View tutorial on YouTube

    Finally, we consider the characteristic equation, \[ar^2+br+c=0,\nonumber\] with \(b^2-4ac=0\). The degenerate root is then given by \[r=-\frac{b}{2a},\nonumber\] yielding only a single solution to the ode:

    \[\label{eq:5}x_1(t)=\exp\left(-\frac{bt}{2a}\right).\]

    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 (rt)\).

    One method to determine this missing second solution is to try the ansatz \[\label{eq:6}x(t)=y(t)x_1(t),\] where \(y(t)\) is an unknown function that satisfies the differential equation obtained by substituting \(\eqref{eq:6}\) into \(\eqref{eq:1}\). 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\to 0\).

    Now, the general solution for complex roots was given by \(\eqref{eq:4}\), and to properly limit this solution as \(\mu\to 0\) requires first satisfying the specific initial conditions \(x(0) = x_0\) and \(\overset{.}{x}(0) = u_0\). Solving for \(A\) and \(B\), the general solution given by \(\eqref{eq:4}\) becomes the specific solution \[x(t;\mu )=e^{\lambda t}\left(\overset{.}{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\to 0\), and using \(\lim_{\mu\to 0}\mu^{−1} \sin \mu t = t\), we have \[\underset{\mu\to 0}{\lim}x(t;\mu )=e^{\lambda t}(x_0+(u_0-\lambda x_0)t).\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 \(\eqref{eq:1}\) when \(b^2 − 4ac = 0\) can therefore be written in the for \[x(t)=(c_1+c_2t)e^{rt},\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 \(\PageIndex{5}\)

    Solve \(\overset{..}{x}+2\overset{.}{x}+x=0\) with \(x(0)=1\) and \(\overset{.}{x}(0)=0\).

    Solution

    The characteristic equation is \[\begin{aligned}r^2+2r+1&=(r+1)^2 \\ &=0,\end{aligned}\] which has a repeated root given by \(r = −1\). Therefore, the general solution to the ode is \[x(t)=c_1e^{-t}+c_2te^{-t},\nonumber\] with derivative \[\overset{.}{x}(t)=-c_1e^{-t}+c_2e^{-t}-c_2te^{-t}.\nonumber\]

    Applying the initial conditions, we have \[\begin{aligned}c_1&=1, \\ -c_1+c_2&=0,\end{aligned}\] so that \(c_1=c_2=1\). Therefore, the solution is \[x(t)=(1+t)e^{-t}.\nonumber\]


    This page titled 4.4: Homogeneous ODEs is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Jeffrey R. Chasnov via source content that was edited to the style and standards of the LibreTexts platform.

    • Was this article helpful?