Skip to main content
Mathematics LibreTexts

17.7: Second Order Linear Equations II

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

    The method of the last section works only when the function \(f(t)\) in \( a\ddot{y}+b\dot{y}+cy=f(t)\) has a particularly nice form, namely, when the derivatives of \(f\) look much like \(f\) itself. In other cases we can try variation of parameters as we did in the first order case.

    Since as before \(a\ne 0\), we can always divide by \(a\) to make the coefficient of \(\ddot{y}\) equal to \(1\). Thus, to simplify the discussion, we assume \(a=1\). We know that the differential equation \(\ddot{y}+b\dot{y}+cy=0\) has a general solution \( Ay_1+By_2\). As before, we guess a particular solution to \(\ddot{y}+b\dot{y}+cy=f(t)\); this time we use the guess \(y=u(t)y_1+v(t)y_2\). Compute the derivatives:

    \[ \eqalign{ \dot{y}&= \dot{u}y_1 +u\dot{y}_1 +\dot{v}y_2 +v\dot{y}_2\cr \ddot{y}&= \ddot{u}y_1 +\dot{u}\dot{y}_1 +\dot{u}\dot{y}_1 +u\ddot{y}_1 +\ddot{v}y_2 +\dot{v}\dot{y}_2 +\dot{v}\dot{y}_2 +v\ddot{y}_2\cr&= \ddot{u}y_1 +2\dot{u}\dot{y}_1 +u\ddot{y}_1 +\ddot{v}y_2 +2\dot{v}\dot{y}_2 +v\ddot{y}_2. }\nonumber\]

    Now substituting:

    \[\eqalign{ \ddot{y} +b\dot{y} +cy&= \ddot{u}y_1 +2\dot{u}\dot{y}_1 +u\ddot{y}_1 +\ddot{v}y_2 +2\dot{v}\dot{y}_2 +v\ddot{y}_2\cr &\qquad + b\dot{u}y_1 +bu\dot{y}_1 +b\dot{v}y_2 +bv\dot{y}_2 +cuy_1 +cvy_2\cr &=(u\ddot{y}_1 +bu\dot{y}_1 +cuy_1) +(v\ddot{y}_2 +bv\dot{y}_2 +cvy_2)\cr &\qquad + b(\dot{u}y_1 +\dot{v}y_2) + (\ddot{u}y_1 +\dot{u}\dot{y}_1 +\ddot{v}y_2 +\dot{v}\dot{y}_2) + (\dot{u}\dot{y}_1 +\dot{v}\dot{y}_2)\cr &=0+0 + b(\dot{u}y_1 +\dot{v}y_2) + (\ddot{u}y_1 +\dot{u}\dot{y}_1 +\ddot{v}y_2 +\dot{v}\dot{y}_2) + (\dot{u}\dot{y}_1 +\dot{v}\dot{y}_2).\cr } \nonumber\]

    The first two terms in parentheses are zero because \(y_1\) and \(y_2\) are solutions to the associated homogeneous equation. Now we engage in some wishful thinking. If \( \dot{u}y_1+\dot{v}y_2=0\) then, by taking the derivative, also \[ \ddot{u}y_1+\dot{u}\dot{y}_1+\ddot{v}y_2+\dot{v}\dot{y}_2=0. \nonumber\]

    This reduces the entire expression to \(\dot{u}\dot{y}_1+\dot{v}\dot{y}_2\). We want this to be \(f(t)\), that is, we need \(\dot{u}\dot{y}_1+\dot{v}\dot{y}_2=f(t)\). So we would very much like these two equations to be true: \[\eqalign{ \dot{u}y_1+\dot{v}y_2&=0\cr \dot{u}\dot{y}_1+\dot{v}\dot{y}_2&=f(t).\cr} \nonumber\]

    This is a system of two equations in the two unknowns \(\dot{u}\) and \(\dot{v}\), so we can solve as usual to get \(\dot{u}=g(t)\) and \(\dot{v}=h(t)\).

    Then we can find \(u\) and \(v\) by computing antiderivatives. This is of course the sticking point in the whole plan, since the antiderivatives may be impossible to find. Nevertheless, this sometimes works out and is worth a try.

    Example \(\PageIndex{1}\)

    Consider the equation \(\ddot{y}-5\dot{y}+6y=\sin t\).

    Solution

    We can solve this by the method of undetermined coefficients, but we will use variation of parameters. The solution to the homogeneous equation is \( Ae^{2t} +Be^{3t}\), so the simultaneous equations to be solved are \[\eqalign{ \dot{u}e^{2t} +\dot{v}e^{3t}&=0\cr 2\dot{u}e^{2t} +3\dot{v}e^{3t}&= \sin t.\cr} \nonumber\]

    The solution of this pair of simultaneous equations in the "unknowns" \(\dot{u}\) and \(\dot{v}\) is easily found to be \(\dot{u}=-e^{-2t}\sin t, \; \dot{v}=e^{-3t}\sin t\). Integration by parts then gives \(u=\dfrac{1}{5}(2\sin t+\cos t)e^{-2t}\;\) and \(v=-\dfrac{1}{10}(3\sin t+\cos t)e^{-3t}\).

    Now the particular solution we seek is \[\eqalign{ ue^{2t} +ve^{3t}&= \dfrac{1}{5} (2\sin t+\cos t) e^{-2t}e^{2t} -\dfrac{1}{10} (3\sin t+\cos t) e^{-3t}e^{3t} \cr &=\dfrac{1}{5} (2\sin t+\cos t) -\dfrac{1}{10}(3\sin t+\cos t) \cr &=\dfrac{1}{10} (\sin t+\cos t), \cr}\nonumber\]

    and the solution to the differential equation is \(y= Ae^{2t} +Be^{3t} +(\cos t +\sin t)/10.\) For comparison (and practice) you might want to solve this using the method of undetermined coefficients.

    Example \(\PageIndex{2}\)

    The differential equation \( \ddot{y}-5\dot{y}+6y=e^t\sin t\) can be solved using the method of undetermined coefficients, though we have not seen any examples of such a solution.

    Solution

    Again, we will solve it by variation of parameters. The equations to be solved for \(\dot{u}\) and \(\dot{v}\) are \[\eqalign{ \dot{u}e^{2t} +\dot{v}e^{3t} &=0\cr 2\dot{u}e^{2t} +3\dot{v}e^{3t}& =e^t\sin t,\cr} \nonumber\]

    which easily give \(\dot{u}= -e^{-t}\sin t\) and \(\dot{v}= e^{-2t}\sin t\). Integrating these, we have \(u=\dfrac{1}{2} (\sin t +\cos t)e^{-t}\) and \( v=-\dfrac{1}{5} (2\sin t +\cos t)e^{-2t}.\)

    The particular solution is \[\eqalign{ y=ue^{2t}+ve^{3t}&= \dfrac{1}{2} (\sin t+\cos t) e^{-t}e^{2t} - \dfrac{1}{5} (2\sin t+\cos t) e^{-2t}e^{3t}\cr &= \dfrac{1}{2} (\sin t+\cos t)e^t- \dfrac{1}{5}(2\sin t+\cos t) e^t\cr &= \dfrac{1}{10} (\sin t+3\cos t)e^t,\cr} \nonumber\]

    and so the complete solution to the differential equation is \[ y=Ae^{2t}+Be^{3t} +e^t(\sin t+3\cos t)/10. \nonumber\]

    Example \(\PageIndex{3}\):

    The differential equation \( \ddot{y} -2\dot{y}+y=e^t/t^2\) is not of the form amenable to the method of undetermined coefficients. The solution to the homogeneous equation is \(y=Ae^t+Bte^t\), and so the simultaneous equations to be solved for \(\dot{u}\) and \(\dot{v}\) are \[\eqalign{ \dot{u}e^{t} +\dot{v}te^{t}&= 0\cr \dot{u}e^{t} +\dot{v}te^{t} +\dot{v}e^t&= \dfrac{e^t}{t^2}.\cr} \nonumber\]

    So \(\dot{u}= -\dfrac{1}{t}\) and \(\dot{v}= \dfrac{1}{t^2}\), giving \(u=-\ln t,\; v=-\dfrac{1}{t}\). The complete solution is therefore \(y= Ae^t+Bte^t -e^t(1+\ln t)\).

    Exercises \(\PageIndex{}\)

    Find the general solution to these differential equations using the method of variation of parameters.

    Exercise \(\PageIndex{1}\)

    \(\ddot{y}+y=\tan t\)

    Answer

    \(A\sin(t)+B\cos(t)− \cos(t) \ln\big(|\sec t+\tan t|\big)\)

    Exercise \(\PageIndex{2}\)

    \(\ddot{y}+y=e^{2t}\)

    Answer

    \(A\sin(t)+B\cos(t)+e^{2t}/5\)

    Exercise \(\PageIndex{3}\)

    \(\ddot{y}+4y=\sec t\)

    Answer

    \(A\sin(2t)+B\cos(2t)+\cos t-\sin t\cos t\ln\big(|\sec t+\tan t|\big)\)

    Exercise \(\PageIndex{4}\)

    \(\ddot{y}+4y=\tan t\)

    Answer

    \(A\sin(2t)+B\cos(2t) +\dfrac{1}{2} \sin(2t)\sin^2(t) +\dfrac{1}{2} \sin(2t)\ln |\cos t| -\dfrac{t}{2}\cos(2t) +\dfrac{1}{4} \sin(2t)\cos(2t)\)

    Exercise \(\PageIndex{5}\)

    \(\ddot{y}+\dot{y}-6y=t^2e^{2t}\)

    Answer

    \(Ae^{2t}+Be^{-3t} +\dfrac{t^3e^{2t}}{15} - \dfrac{e^{2t}}{5}\left( \dfrac{t^2}{5} -\dfrac{2t}{25} +\dfrac{2}{125} \right)\)

    Exercise \(\PageIndex{6}\)

    \(\ddot{y}-2\dot{y}+2y=e^t\tan t\)

    Answer

    \(Ae^t\sin t +Be^t\cos t -e^t\cos t\ln|\sec t +\tan t|\)

    Exercise \(\PageIndex{7}\)

    \(\ddot{y}-2\dot{y}+2y=\sin(t)\cos(t).\quad\) (This is rather messy when done by variation of parameters; compare to undetermined coefficients.)

    Answer

    \(Ae^t\sin(t)+Be^t\cos(t)-\dfrac{1}{10}\cos t(\cos^3 t+3\sin^3 t-2\cos t-\sin t) +\dfrac{1}{10}\sin t(\sin^3 t-3\cos^3 t-2\sin t +\cos t)\)

    \(=Ae^t\sin(t)+Be^t\cos(t)+\dfrac{1}{10}\cos(2t)-\dfrac{1}{20}\sin(2t)\)

    Contributors


    This page titled 17.7: Second Order Linear Equations II is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by David Guichard via source content that was edited to the style and standards of the LibreTexts platform.