Skip to main content
Mathematics LibreTexts

2.2: Constant Coefficient Equations

  • Page ID
    91052
  • \( \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}}\)

    \THE SIMPLEST SECOND ORDER DIFFERENTIAL EQUATIONS are those with constant coefficients. The general form for a homogeneous constant coefficient second order linear differential equation is given as

    \[a y^{\prime \prime}(x)+b y^{\prime}(x)+c y(x)=0 \label{2.10} \]

    where \(a, b\), and \(c\) are constants.

    Solutions to Equation \(\PageIndex{1}\) are obtained by making a guess of \(y(x)=e^{r x} .\) Inserting this guess into Equation \(\PageIndex{1}\) leads to the characteristic equation

    \[a r^{2}+b r+c=0 \nonumber \]

    The characteristic equation for \(a y^{\prime \prime}+b y^{\prime}+c y=0\) is \(a r^{2}+b r+c=0\). Solutions of this quadratic equation lead to solutions of the differential equation.

    Two real, distinct roots, \(r_{1}\) and \(r_{2}\), give solutions of the form

    \(y(x)=c_{1} e^{r_{1} x}+c_{2} e^{r_{2} x} .\)

    Namely, we compute the derivatives of \(y(x)=e^{r x}\), to get \(y(x)=r e^{r x}\), and \(y(x)=r^{2} e^{r x} .\) Inserting into \(Equation \(\PageIndex{1}\)\), we have

    \(0=a y^{\prime \prime}(x)+b y^{\prime}(x)+c y(x)=\left(a r^{2}+b r+c\right) e^{r x}\)

    Since the exponential is never zero, we find that \(a r^{2}+b r+c=0\).

    The roots of this equation, \(r_{1}, r_{2}\), in turn lead to three types of solutions depending upon the nature of the roots. In general, we have two linearly independent solutions, \(y_{1}(x)=e^{r_{1} x}\) and \(y_{2}(x)=e^{r_{2} x}\), and the general solution is given by a linear combination of these solutions,

    \(y(x)=c_{1} e^{r_{1} x}+c_{2} e^{r_{2} x}\)

    For two real distinct roots, we are done. However, when the roots are real, but equal, or complex conjugate roots, we need to do a little more work to obtain usable solutions.

    Example \(\PageIndex{1}\)

    \(y^{\prime \prime}-y^{\prime}-6 y=0 y(0)=2, y^{\prime}(0)=0\).

    Solution

    The characteristic equation for this problem is \(r^{2}-r-6=0\). The roots of this equation are found as \(r=-2,3\). Therefore, the general solution can be quickly written down:

    \(y(x)=c_{1} e^{-2 x}+c_{2} e^{3 x}\)

    Note that there are two arbitrary constants in the general solution. Therefore, one needs two pieces of information to find a particular solution. Of course, we have the needed information in the form of the initial conditions.

    One also needs to evaluate the first derivative

    \(y^{\prime}(x)=-2 c_{1} e^{-2 x}+3 c_{2} e^{3 x}\)

    in order to attempt to satisfy the initial conditions. Evaluating \(y\) and \(y^{\prime}\) at \(x=0\) yields

    \[ \begin{aligned} &2=c_{1}+c_{2} \\ &0=-2 c_{1}+3 c_{2} \end{aligned}\label{2.12} \]

    These two equations in two unknowns can readily be solved to give \(c_{1}=6 / 5\) and \(c_{2}=4 / 5\). Therefore, the solution of the initial value problem is obtained as \(y(x)=\dfrac{6}{5} e^{-2 x}+\dfrac{4}{5} e^{3 x} .\)

    Repeated roots, \(r_{1}=r_{2}=r\), give solutions of the form

    \(y(x)=\left(c_{1}+c_{2} x\right) e^{r x} .\)

    In the case when there is a repeated real root, one has only one solution, \(y_{1}(x)=e^{r x}\). The question is how does one obtain the second linearly in- dependent solution? Since the solutions should be independent, we must have that the ratio \(y_{2}(x) / y_{1}(x)\) is not a constant. So, we guess the form \(y_{2}(x)=v(x) y_{1}(x)=v(x) e^{r x}\). (This process is called the Method of Reduction of Order. See Section 2.2.1)

    For more on the Method of Reduction of Order, see Section 2.2.1.

    For constant coefficient second order equations, we can write the equation as

    \((D-r)^{2} y=0\)

    where \(D=\dfrac{d}{d x} .\) We now insert \(y_{2}(x)=v(x) e^{r x}\) into this equation. First we compute

    \((D-r) v e^{r x}=v^{\prime} e^{r x}\)

    Then,

    \(0=(D-r)^{2} v e^{r x}=(D-r) v^{\prime} e^{r x}=v^{\prime \prime} e^{r x}\)

    So, if \(y_{2}(x)\) is to be a solution to the differential equation, then \(v^{\prime \prime}(x) e^{r x}=0\) for all \(x .\) So, \(v^{\prime \prime}(x)=0\), which implies that

    \(v(x)=a x+b\)

    \(y_{2}(x)=(a x+b) e^{r x}\)

    Without loss of generality, we can take \(b=0\) and \(a=1\) to obtain the second linearly independent solution, \(y_{2}(x)=x e^{r x}\). The general solution is then

    \(y(x)=c_{1} e^{r x}+c_{2} x e^{r x}\)

    Example \(\PageIndex{2}\)

    \(y^{\prime \prime}+6 y^{\prime}+9 y=0\)

    Solution

    In this example we have \(r^{2}+6 r+9=0 .\) There is only one root, \(r=-3 .\) From the above discussion, we easily find the solution \(y(x)=\) \(\left(c_{1}+c_{2} x\right) e^{-3 x}\)

    When one has complex roots in the solution of constant coefficient equations, one needs to look at the solutions

    \(y_{1,2}(x)=e^{(\alpha \pm i \beta) x}\)

    We make use of Euler’s formula \({ }^{1}\), which is treated in Section 8.1.

    1

    Euler’s Formula is found using Maclaurin series expansion

    \(e^{x}=1+x+\dfrac{1}{2} x^{2}+\dfrac{1}{3 !} x^{3}+\cdots\)

    Let \(x=i \theta\) and find

    \(\begin{aligned}
    e^{i \theta} &=1+i \theta+\dfrac{1}{2}(i \theta)^{2}+\dfrac{1}{3 !}(i \theta)^{3}+\cdots \\
    &=1-\dfrac{1}{2} \theta^{2}+\dfrac{1}{4 !} \theta^{4}+\cdots \\
    & i\left[\theta-\dfrac{1}{3 !} \theta^{3}+\dfrac{1}{5 !} \theta^{5}+\cdots\right] \\
    &=\cos \theta+i \sin \theta
    \end{aligned}\)

    \[ e^{i \beta x}=\cos \beta x+i \sin \beta x \nonumber \]

    Then, the linear combination of \(y_{1}(x)\) and \(y_{2}(x)\) becomes

    \[\begin{equation} \begin{aligned}
    A e^{(\alpha+i \beta) x}+B e^{(\alpha-i \beta) x} &=e^{\alpha x}\left[A e^{i \beta x}+B e^{-i \beta x}\right] \\
    &=e^{\alpha x}[(A+B) \cos \beta x+i(A-B) \sin \beta x] \\
    & \equiv e^{\alpha x}\left(c_{1} \cos \beta x+c_{2} \sin \beta x\right)
    \end{aligned} \end{equation}\label{2.14} \]

    Thus, we see that we have a linear combination of two real, linearly independent solutions, \(e^{\alpha x} \cos \beta x\) and \(e^{\alpha x} \sin \beta x\).

    Complex roots, \(r=\alpha \pm i \beta\), give solutions of the form

    \(y(x)=e^{\alpha x}\left(c_{1} \cos \beta x+c_{2} \sin \beta x\right) .\)

    Example \(\PageIndex{3}\)

    \(y^{\prime \prime}+4 y=0\). The characteristic equation in this case is \(r^{2}+4=0 .\) The roots
    are pure imaginary roots, \(r=\pm 2 i\), and the general solution consists
    purely of sinusoidal functions, \(y(x)=c_{1} \cos (2 x)+c_{2} \sin (2 x)\), since
    \(\alpha=0\) and \(\beta=2\).

    Example \(\PageIndex{4}\)

    \(y^{\prime \prime}+2 y^{\prime}+4 y=0 .\)
    The characteristic equation in this case is \(r^{2}+2 r+4=0 .\) The roots The characteristic equation in this case is \(r^{2}+2 r+4=0 .\) The roots
    re complex, \(r=-1 \pm \sqrt{3} i\) and the general solution can be written as

    \(y(x)=\left[c_{1} \cos (\sqrt{3} x)+c_{2} \sin (\sqrt{3} x)\right] e^{-x}\)

    Example \(\PageIndex{5}\)

    \(y^{\prime \prime}+4 y=\sin x\).

    This is an example of a nonhomogeneous problem. The homogeneous problem was actually solved in Example \(\PageIndex{3}\). According to the theory, we need only seek a particular solution to the nonhomogeneous problem and add it to the solution of the last example to get the general solution.

    The particular solution can be obtained by purely guessing, making an educated guess, or using the Method of Variation of Parameters. We will not review all of these techniques at this time. Due to the simple form of the driving term, we will make an intelligent guess of \(y_{p}(x)=A \sin x\) and determine what \(A\) needs to be. Inserting this guess into the differential equation gives \((-A+4 A) \sin x=\sin x .\) So, we see that \(A=1 / 3\) works. The general solution of the nonhomogeneous problem is therefore \(y(x)=c_{1} \cos (2 x)+c_{2} \sin (2 x)+\dfrac{1}{3} \sin x\).

    The three cases for constant coefficient linear second order differential equations are summarized below.

    Classification of Roots of the Characteristic Equation for Second Order Constant Coefficient ODEs

    1. Real, distinct roots \(r_{1}, r_{2} .\) In this case the solutions corresponding to each root are linearly independent. Therefore, the general solution is simply \(y(x)=c_{1} e^{r_{1} x}+c_{2} e^{r_{2} x} .\)
    2. Real, equal roots \(r_{1}=r_{2}=r\). In this case the solutions corresponding to each root are linearly dependent. To find a second linearly independent solution, one uses the Method of Reduction of Order. This gives the second solution as \(x e^{r x}\). Therefore, the general solution is found as \(y(x)=\left(c_{1}+c_{2} x\right) e^{r x}\)
    3. Complex conjugate roots \(r_{1}, r_{2}=\alpha \pm i \beta .\) In this case the solutions corresponding to each root are linearly independent. Making use of Euler’s identity, \(e^{i \theta}=\cos (\theta)+i \sin (\theta)\), these complex exponentials can be rewritten in terms of trigonometric functions. Namely, one has that \(e^{\alpha x} \cos (\beta x)\) and \(e^{\alpha x} \sin (\beta x)\) are two linearly independent solutions. Therefore, the general solution becomes \(y(x)=e^{\alpha x}\left(c_{1} \cos (\beta x)+\right.\) \(\left.c_{2} \sin (\beta x)\right)\).

    As we will see, one of the most important applications of such equations is in the study of oscillations. Typical systems are a mass on a spring, or a simple pendulum. For a mass \(m\) on a spring with spring constant \(k>0\), one has from Hooke’s law that the position as a function of time, \(x(t)\), satisfies the equation

    \(m \ddot{x}+k x=0\)

    This constant coefficient equation has pure imaginary roots \((\alpha=0)\) and the solutions are simple sine and cosine functions, leading to simple harmonic motion.

    2.2.1: Reduction of Order

    WE HAVE SEEN THE THE METHOD OF REDUCTION OF ORDER Was useful in obtaining a second solution of a second order differential equation with constant coefficients when one solution was known. It can also be used to solve other second order differential equations. First, we review the method by example.

    Example \(\PageIndex{6}\)

    Verify that \(y_{1}(x)=x e^{2 x}\) is a solution of \(y^{\prime \prime}-4 y^{\prime}+4 y=0\) and use the Method of Reduction of Order to find a second linearly independent solution.

    We note that

    \(\begin{aligned} &y_{1}^{\prime}(x)=(1+2 x) e^{2 x} \\ &y_{1}^{\prime \prime}(x)=[2+2(1+2 x)] e^{2 x}=(4+4 x) e^{2 x} \end{aligned}\)

    Substituting the \(y_{1}(x)\) and its derivatives into the differential equation, we have

    \[\begin{equation} \begin{aligned} y_{1}^{\prime \prime}-4 y_{1}^{\prime}+4 y_{1} &=(4+4 x) e^{2 x}-4(1+2 x) e^{2 x}+4 x e^{2 x} \\ &=0 \end{aligned}\end{equation} \label{2.15} \]

    In order to find a second linearly independent solution, \(y_{2}(x)\), we need a solution that is not a constant multiple of \(y_{1}(x) .\) So, we guess the form \(y_{2}(x)=v(x) y_{1}(x)\). For this example, the function and its derivatives are given by

    \(\begin{aligned} y_{2} &=v y_{1} \\ y_{2}^{\prime} &=\left(v y_{1}\right)^{\prime} \\ &=v^{\prime} y_{1}+v y_{1}^{\prime} \\ y_{2}^{\prime \prime} &=\left(v^{\prime} y_{1}+v y_{1}^{\prime}\right)^{\prime} \\ &=v^{\prime \prime} y_{1}+2 v^{\prime} y_{1}^{\prime}+v y_{1}^{\prime \prime} \end{aligned}\)

    Substituting \(y_{2}\) and its derivatives into the differential equation, we have

    \[\begin{equation} \begin{aligned} 0 &=y_{2}^{\prime \prime}-4 y_{2}^{\prime}+4 y_{2} \\ &=\left(v^{\prime \prime} y_{1}+2 v^{\prime} y_{1}^{\prime}+v y_{1}^{\prime \prime}\right)-4\left(v^{\prime} y_{1}+v y_{1}^{\prime}\right)+4 v y_{1} \\ &=v^{\prime \prime} y_{1}+2 v^{\prime} y_{1}^{\prime}-4 v^{\prime} y_{1}+v\left[y_{1}^{\prime \prime}-4 y_{1}^{\prime}+4 y_{1}\right] \\ &=v^{\prime \prime} y_{1}+2 v^{\prime} y_{1}^{\prime}-4 v^{\prime} y_{1} \\ &=v^{\prime \prime} x e^{2 x}+2 v^{\prime}(1+2 x) e^{2 x}-4 v^{\prime} x e^{2 x} \\ &=\left[v^{\prime \prime} x+2 v^{\prime}\right] e^{2 x} \end{aligned} \end{equation} \label{2.16} \]

    Therefore, \(v(x)\) satisfies the equation

    \(v^{\prime \prime} x+2 v^{\prime}=0\)

    This is a first order equation for \(v^{\prime}(x)\), which can be seen by introducing \(z(x)=v^{\prime}(x)\), leading to the separable first order equation

    \(x \dfrac{d z}{d x}=-2 z .\)

    This is readily solved to find \(z(x)=\dfrac{A}{x^{2}}\). This gives

    \(z=\dfrac{d v}{d x}=\dfrac{A}{x^{2}}\)

    Further integration leads to

    \(v(x)=-\dfrac{A}{x}+C\)

    This gives

    \(\begin{aligned} y_{2}(x) &=\left(-\dfrac{A}{x}+C\right) x e^{2 x} \\ &=-A e^{2 x}+C x e^{2 x} \end{aligned}\)

    Note that the second term is the original \(y_{1}(x)\), so we do not need this term and can set \(C=0\). Since the second linearly independent solution can be determined up to a multiplicative constant, we can set \(A=-1\) to obtain the answer \(y_{2}(x)=e^{2 x} .\) Note that this argument for obtaining the simple form is reason enough to ignore the integration constants when employing the Method of Reduction of Order.

    For an example without constant coefficients, consider the following example.

    Example \(\PageIndex{7}\)

    Verify that \(y_{1}(x)=x\) is a solution of \(x^{2} y^{\prime \prime}-4 x y^{\prime}+4 y=\) 0 and use the Method of Reduction of Order to find a second linearly independent solution.

    Substituting the \(y_{1}(x)=x\) and its derivatives into the differential equation, we have

    \[\begin{equation} \begin{aligned} x^{2} y_{1}^{\prime \prime}-4 x y_{1}^{\prime}+4 y_{1} &=0-4 x+4 x \\ &=0 \end{aligned} \end{equation}\label{2.17} \]

    In order to find a second linearly independent solution, \(y_{2}(x)\), we need a solution that is not a constant multiple of \(y_{1}(x) .\) So, we guess the form \(y_{2}(x)=v(x) y_{1}(x)\). For this example, the function and its derivatives are given by

    \(\begin{aligned} y_{2} &=x v \\ y_{2}^{\prime} &=(x v)^{\prime} \\ &=v+x v^{\prime} \\ y_{2}^{\prime \prime} &=\left(v+x v^{\prime}\right)^{\prime} \\ &=2 v^{\prime}+x v^{\prime \prime} \end{aligned}\)

    Substituting \(y_{2}=x v(x)\) and its derivatives into the differential equation, we have

    \[ \begin{aligned} 0 &=x^{2} y_{2}^{\prime \prime}-4 x y_{2}^{\prime}+4 y_{2} \\ &=x^{2}\left(2 v^{\prime}+x v^{\prime \prime}\right)-4 x\left(v+x v^{\prime}\right)+4 x v \\ &=x^{3} v^{\prime \prime}-2 x^{2} v^{\prime} \end{aligned} \label{2.18} \]

    Note how the \(v\)-terms cancel, leaving

    \(x v^{\prime \prime}=2 v^{\prime}\)

    This equation is solved by introducing \(z(x)=v^{\prime}(x) .\) Then, the equation becomes

    \(x \dfrac{d z}{d x}=2 z .\)

    Using separation of variables, we have

    \(z=\dfrac{d v}{d x}=A x^{2}\)

    Integrating, we obtain

    \(v=\dfrac{1}{3} A x^{3}+B\)

    This leads to the second solution in the form

    \(y_{2}(x)=x\left(\dfrac{1}{3} A x^{3}+B\right)=\dfrac{1}{3} A x^{4}+B x .\)

    Since the general solution is

    \(y(x)=c_{1} x+c_{2}\left(\dfrac{1}{3} A x^{4}+B x\right)\)

    we see that we can choose \(B=0\) and \(A=3\) to obtian the general solution as

    \(y(x)=c_{1} x+c_{2} x^{4}\)

    Therefore, we typically do not need the arbitrary constants found in using reduction of order and simply report that \(y_{2}(x)=x^{4}\).


    This page titled 2.2: Constant Coefficient Equations is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Russell Herman via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?