Section 4.2 Forcing
Objectives

To understand that the general solution to the equation
\begin{equation*} x'' +p(t) x' + q(t) x = g(t) \end{equation*}is \(x = x_h + x_p\text{,}\) where \(x_p\) is a particular solution \(x_p\) to \(x'' +p(t) x' + q(t) x = g(t)\) and \(x_h\) is the general solution of the corresponding homogeneous equation
\begin{equation*} x'' +p(t) x' + q(t) x = 0. \end{equation*} To understand and be able to apply the Method of Undetermined Coefficients to find particular solutions to \(x'' +p(t) x' + q(t) x = g(t)\text{.}\)
Harmonic oscillators such as a springmass system (SubsectionÂ 1.1.3) or an RLC circuit (SectionÂ 4.1) can be modeled with secondorder linear differential equations. Indeed, we can model a springmass system with the equation
where \(m\) is the mass, \(b\) is the damping coefficient, \(k\) is the spring constant, and \(F(t) = g(t)\) represents some external force applied to our system. RLC circuits can also be modeled to provide another example of forcing. If \(I(t)\) is the rate at which a charge flows through a circuit (measured in amperes or amps), \(R\) is the resistance (measured in ohms), \(C\) is the capacitance (measured in farads), and the inductance, \(L\text{,}\) is (measured in henrys), then the derivative of the impressed voltage (measured in volts), \(E(t)\text{,}\) is the forcing term
What is different about these two equations from those that we considered in SectionÂ 4.1 is that the terms on the righthand side, \(g(t)\) and \(E'(t)\text{,}\) are not zero. Such a term is called a forcing term.
Subsection 4.2.1 Nonhomogeneous Equations
A nonhomogeneous secondorder linear differential equation is an equation of the form
We have already seen how examples of such equations arise when examining models of harmonic oscillators with forcing terms. Our goal is to be able to solve such equations. In general, these equations can be difficult to solve for an arbitrary function \(g(t)\text{.}\) Before we attempt to find solutions for some of the more common functions that might occur for \(g(t)\text{,}\) let us derive some fundamental facts about secondorder linear differential equations.
Theorem 4.2.1.
Suppose that
has solutions \(x_1 = x_1(t)\) and \(x_2 = x_2(t)\text{.}\) Then \(x_1(t)  x_2(t)\) is a solution of the homogeneous linear differential equation
Proof.
Since \(x_1\) and \(x_2\) are solutions of (4.2.1), we know that
Thus,
We can use TheoremÂ 4.2.1 to derive the fact that the general solution to
can be written in the form
where \(x_h\) is the general solution of the homogeneous equation
and \(x_p\) is any solution of (4.2.2). Indeed, suppose that \(x_q\) is another solution to (4.2.2). Then \(x_q  x_p\) is a solution to the homogeneous equation
Therefore,
or
We state this fact in the following theorem.
Theorem 4.2.2.
Let \(x_p\) be a particular solution of the equation
and \(x_h\) be the general solution of the corresponding homogeneous equation
Then the general solution to \(x'' +p(t) x' + q(t) x = g(t)\) is \(x = x_h + x_p\text{.}\)
Subsection 4.2.2 Forcing Terms
The equation
can be used to model a harmonic oscillator where forcing occurs. In general, we will not be able to solve this equation explicitly for a given \(g(t)\text{;}\) however, certain forcing functions often occur in practice. Some of the more important forcing functions are \(g(t) = e^{at}\text{,}\) where the external force decreases exponentially over time; \(g(t) = k\text{,}\) where a constant force is applied; and \(g(t) = \cos \omega t\) or \(g(t) = \sin \omega t\text{,}\) where a force is applied periodically.
In the case of the unforced damped harmonic oscillator,
we know that \(m \gt 0\text{,}\) \(b \gt 0\text{,}\) and \(k \gt 0\text{.}\) Thus, we can rewrite this equation as
where \(p = b/m\) and \(q = k/m\) are both positive. As a firstorder linear system, the harmonic oscillator is
The matrix corresponding to this system,
has trace of \(p\) and determinant \(q\text{.}\) Since \(\trace(A) \lt 0\) and \(\det(A) \gt 0\text{,}\) we know that any solution of the unforced equation tends toward the origin as \(t \to \infty\text{.}\) That is, the solution is a sink. This leads us to the following conclusion.
Theorem 4.2.3.
Suppose
has solution \(x = x_h + x_p\text{,}\) where \(p \gt 0\) and \(q \gt 0\text{.}\) If
is the general solution to the equation, then
as \(t \to \infty\text{.}\)
In other words, all solutions of a damped harmonic oscillator with nonzero damping are essentially the same for large values of \(t\text{.}\)
Subsection 4.2.3 The Method of Undetermined Coefficients
Example 4.2.4.
Let us solve the differential equation
a harmonic oscillator with a constant forcing function. It is easy to check that the general solution to the homogeneous equation
is
A particular solution to (4.2.3) is given by \(x_p = 1/4\text{.}\) Thus, the general solution is
As \(t \to \infty\text{,}\) all solutions approach the constant solution \(x = 1/4\) (FigureÂ 4.2.5).
Example 4.2.6.
Now let us consider a more complicated example. Suppose that we wish to solve
This is the equation of a harmonic oscillator with a forcing function that decreases exponentially with time. We already know the solution to the homogeneous equation. We will use the Method of Undetermined Coefficients to find a particular solution to (4.2.4). It is reasonable to guess that a particular solution will have the form
Substituting this expression into (4.2.4), we find that
Hence, \(A = 1/2\text{.}\) Therefore, the solution that we seek is
Again, all solutions approach zero as \(t \to \infty\) (FigureÂ 4.2.7).
Example 4.2.8.
Now let us examine what happens if we have a periodic forcing function. Let us assume that the particular solution to the equation
takes the form
Then
Substituting these expressions into the differential equation, we see that
We must solve the following system of equations to find a particular solution:
The solution of this system is \(A = 3/17\) and \(B = 5/17\text{.}\) Consequently,
is a particular solution to \(x'' +5x' + 4x = 2 \cos t\text{.}\) The general solution to our equation is
The solutions to this equation are given in FigureÂ 4.2.9.
Example 4.2.10.
As a final example, consider the equation
Recall that the solution to the homogeneous equation \(x'' + 5x' + 4x = 0\) is
Our guess of \(x_p(t) = A e^{t}\) for a particular solution will no longer work since \(e^{t}\) is a solution to the homogeneous equation. We must therefore consider a function of a different form. Such a function must yield a multiple of \(e^{t}\) when differentiated. The simplest such function is of the form
Using this guess,
Thus, \(A = 1/3\) and our general solution is
Solutions to the differential equation \(x'' + 5x' + 4x = e^{t}\) are given in FigureÂ 4.2.11.
Activity 4.2.1. Solving Forced SecondOrder Linear Differential Equations.
Find (1) a particular solution and (2) a general solution for each of the following differential equations.
(a)
\(x'' + 4x'  21x = 2 e^{4t}\)
(b)
\(x'' + 4x'  21x = 3e^{3t}\)
(c)
\(x''  4x' + 20x = 3 \sin 3t\)
(d)
\(x''  4x' + 20x = 2 \cos 4t\)
(e)
\(x''  14 x' + 49 x = \sin 3t\)
Subsection 4.2.4 A Strategy
We outline a general strategy for choosing \(x_p\) for the Method of Undetermined Coefficients in TableÂ 4.2.12. Here \(s = 0, 1, 2\) is the smallest integer that will ensure that no term in \(x_p\) is a solution of the corresponding homogeneous equation.
\(g(t)\)  \(x_p\) 
\(P_n(t) = a_nt^n + \cdots + a_1 t + a_0\)  \(t^s(A_nt^n + \cdots + A_1 t + A_0)\) 
\(P_n(t) e^{\alpha t}\)  \(t^s(A_nt^n + \cdots + A_1 t + A_0) e^{\alpha t}\) 
\(\displaystyle P_n(t) e^{\alpha t} \left\{\begin{array}{c} \sin \beta t \\ \cos \beta t \end{array}\right.\)  \(t^se^{\alpha t}[(A_nt^n + \cdots + A_1 t + A_0) \cos \beta t \) 
\(+ (B_n t^n + \cdots + B_1 t + B_0) \sin \beta t]\) 
Subsection 4.2.5 Important Lessons
A nonhomogeneous secondorder linear differential equation is an equation of the form
\begin{equation*} x'' + p(t) x' + q(t) x = g(t). \end{equation*}Forced harmonic oscillators and RLC circuits provide good examples of nonhomogeneous secondorder linear differential equations.Suppose that
\begin{equation*} x'' +p(t) x' + q(t) x = g(t) \end{equation*}has solutions \(x_1 = x_1(t)\) and \(x_2 = x_2(t)\text{.}\) Then \(x_1(t)  x_2(t)\) is a solution of the homogeneous linear differential equation\begin{equation*} x'' +p(t) x' + q(t) x = 0. \end{equation*}Let \(x_p\) be a particular solution of the equation
\begin{equation*} x'' +p(t) x' + q(t) x = g(t), \end{equation*}and \(x_h\) be the general solution of the corresponding homogeneous equation\begin{equation*} x'' +p(t) x' + q(t) x = 0. \end{equation*}Then the general solution to \(x'' +p(t) x' + q(t) x = g(t)\) is \(x = x_h + x_p\text{.}\) In particular, if the solution to \(x'' +p(t) x' + q(t) x = 0\) has a sink at the origin, all solutions of the equation \(x'' +p(t) x' + q(t) x = g(t)\) approach \(x_p(t)\) as \(t \to \infty\text{.}\)The Method of Undetermined Coefficients is useful for solving the equation \(x'' +p(t) x' + q(t) x = g(t)\text{,}\) when \(g\) is of the form
\begin{equation*} g(t) = P_n(t) e^{\alpha t} \left\{\begin{array}{c} \sin \beta t \\ \cos \beta t \end{array}\right. \end{equation*}
Reading Questions 4.2.6 Reading Questions
1.
Suppose that \(x_p(t)\) and \(x_q(t)\) are two solutions for \(ax'' + bx' + cx = g(t)\text{.}\) How are these two solutions related?
2.
Describe the Method of Undetermined Coefficients in your own words.
Exercises 4.2.7 Exercises
Finding Particular Solutions.
Find a particular solution for each equation in Exercise GroupÂ 4.2.7.1â€“8.
1.
\(y''  2y'  3y = 3 e^{2t}\)
2.
\(y''  y'  2y = 4x^2\)
3.
\(\dfrac{d^2x}{dx^2}  6 \dfrac{dx}{dt} + 25 x = 64e^{t}\)
4.
\(y'' + 16y = 2 \sin 2t\)
5.
\(y'' + 16y = 2 \sin 4t\)
6.
\(y'' + 2y' + y = 2e^{t}\)
7.
\(y'' + 6y' + 8y = \cos 3t\)
8.
\(u'' + \omega_0^2 y = \cos \omega t\text{,}\) \(\omega^2 \neq \omega_0^2\)
Finding General Solutions.
Find the general solution for each equation in Exercise GroupÂ 4.2.7.9â€“16.
9.
\(y''  2y'  3y = 3 e^{2t}\)
10.
\(y''  y'  2y = 4x^2\)
11.
\(\dfrac{d^2x}{dx^2}  6 \dfrac{dx}{dt} + 25 x = 64e^{t}\)
12.
\(y'' + 16y = 2 \sin 2t\)
13.
\(y'' + 16y = 2 \sin 4t\)
14.
\(y'' + 2y' + y = 2e^{t}\)
15.
\(y'' + 6y' + 8y = \cos 3t\)
16.
\(u'' + \omega_0^2 y = \cos \omega t\text{,}\) \(\omega^2 \neq \omega_0^2\)
Solving Initial Value Problems.
Solve the initial problems in Exercise GroupÂ 4.2.7.17â€“24.
17.
\(y''  2y'  3y = 3 e^{2t}\text{,}\) \(y(0) = 1\text{,}\) \(y'(0) = 0\)
18.
\(y''  y'  2y = 4x^2\text{,}\) \(y(0) = 1\text{,}\) \(y'(0) = 1\)
19.
\(\dfrac{d^2x}{dx^2}  6 \dfrac{dx}{dt} + 25 x = 64e^{t}\text{,}\) \(x(0) = 1\text{,}\) \(x'(0) = 2\)
20.
\(y'' + 16y = 2 \sin 2t\text{,}\) \(y(0) = 1\text{,}\) \(y'(0) = 0\)
21.
\(y'' + 16y = 2 \sin 4t\text{,}\) \(y(0) = 1\text{,}\) \(y'(0) = 0\)
22.
\(y'' + 2y' + y = 2e^{t}\text{,}\) \(y(0) = 1\text{,}\) \(y'(0) = 3\)
23.
\(y'' + 6y' + 8y = \cos 3t\text{,}\) \(y(0) = 2\text{,}\) \(y'(0) = 1\)
24.
\(u'' + \omega_0^2 y = \cos \omega t\text{,}\) \(\omega^2 \neq \omega_0^2\text{,}\) \(u(0) = 1\text{,}\) \(u'(0) = 1\)
25.
We define two functions, \(f(t)\) and \(g(t)\text{,}\) to be linearly independent on an open interval \(I = (a, b)\) if there do not exist nonzero constants \(c_1\) and \(c_2\) such that
for all \(t \in I\text{.}\) Equivalently, two functions are linearly independent, if one function is not a multiple of the other. Otherwise, \(f(t)\) and \(f(t)\) are linearly dependent. Suppose that \(f(t)\) and \(g(t)\) are solutions to the homogeneous linear equation
Show that \(f(t)\) and \(g(t)\) are linearly dependent on an interval \(I = (a, b)\) if and only if \(W[f, g](t) \equiv 0\text{,}\) where \(W[f, g](t) = f(t) g'(t)  g(t) f'(t)\) is the Wronskian of \(f\) and \(g\text{.}\)
Suppose that that \(f(t)\) and \(g(t)\) are linearly dependent on an interval \(I = (a, b)\text{.}\) Then one function is a multiple of the other, say \(f(t) = c g(t)\text{.}\) Thus, \(f'(t) = cg'(t)\text{.}\)
Conversely, suppose that
for all \(t\) in \((a, b)\text{.}\) If \(g = 0\text{,}\) then \(0 f = g\) and the two functions are linearly dependent. Assume that \(g(t_0) \neq 0\) for some \(t_0\) in \((a, b)\text{.}\) Since \(g\) is differentiable, it must also be continuous and there is some interval \((c, d)\) contained in \((a, b)\) such that \(t_0 \in (c, d)\) and \(g\) does not vanish on this interval. Therefore,
and \(f/g\) is constant on the interval \((c, d)\text{.}\) Thus, \(f(t_0) = c g(t_0)\) and \(f'(t_0) = c g'(t_0)\text{.}\) Since \(f\) and \(cg\) are both solutions to the differential equation \(y'' + p y' + q y = 0\) and have the same initial condition, \(f(t) = cg(t)\) for all \(t \in (a, b)\) by the existence and uniqueness theorem. Consequently, \(f\) and \(g\) are linearly dependent.
26.
Abel's Theorem. If \(y_1\) and \(y_2\) are solutions of the homogeneous equation
where \(p\) and \(q\) are continuous on an open interval \(I = (a, b)\text{,}\) show that
for some constant \(c\) that depends on \(y_1\) and \(y_2\) but not on \(t\text{.}\)
Use Abel's Theorem to find the Wronskian of \(2 t^2 y'' + 3ty'  y = 0\) up to a constant multiple, where \(t \gt 0\text{.}\)
Prove Abel's Theorem.
We can rewrite \(2 t^2 y'' + 3ty'  y = 0\) as
\begin{equation*} y'' + \frac{3}{2t} y'  \frac{1}{2t^2} y = 0. \end{equation*}Since \(p(t) = 1/2t\text{,}\) Abel's Theorem tells us that\begin{equation*} W[y_1, y_2](t) = c \exp\left(  \int \frac{3}{2t} \, dt \right) = c \exp\left(  \frac{3}{2} \ln t \right) = ct^{3/2}. \end{equation*}Since \(y_1\) and \(y_2\) are solutions to our differential equation, we know that
\begin{gather*} y_1'' + p(t) y_1' + q(t) y_1 = 0\\ y_2'' + p(t) y_2' + q(t) y_2 = 0. \end{gather*}Multiplying the first equation by \(y_2\) and the second equation by \(y_1\) and subtracting, we obtain\begin{equation} (y_1 y_2''  y_1'' y_2) + p(t) (y_1 y_2'  y_1' y_2) = 0.\tag{4.2.5} \end{equation}If\begin{equation*} W(t) = W(y_1, y_2)(t) = y_1 y_2'  y_1' y_2, \end{equation*}then\begin{equation*} W' = y_1 y_2''  y_1'' y_2, \end{equation*}and equation (4.2.5) becomes\begin{equation*} W' + p(t) W = 0. \end{equation*}This equation is separable with solution\begin{equation*} W(t) = c \exp\left(  \int p(t) \, dt \right). \end{equation*}
27.
The Method of Variation of Parameters. In this problem we will describe another method of finding a particular solution to a nonhomogeneous equation,
if we know know that the general solution to the homogeneous equation \(y'' + p(t) y' + q(t) y = 0\) is
Assume that a particular solution of (4.2.6) has the form
\begin{equation*} y_p(t) = u_1(t) y_1(t) + u_2(t) y_2(t), \end{equation*}where\begin{equation*} u_1'(t) y_1(t) + u_2'(t) y_2(t)=0. \end{equation*}Substitute \(y_p\) into the lefthand side of (4.2.6) to show that\begin{equation*} u_1'(t) y_1'(t) + u_2'(t) y_2'(t) = f(t). \end{equation*}Show that
\begin{align*} u_1'(t) & = \frac{ y_2(t) f(t)}{W[y_1, y_2](t)}\\ u_2'(t) & = \frac{y_1(t) f(t)}{W[y_1, y_2](t)}, \end{align*}where \(W[y_1, y_2](t) = y_1(t) y_2'(t)  y_2(t) y_1'(t)\) is the Wronskian of \(y_1\) and \(y_2\text{.}\)If \(p\text{,}\) \(q\text{,}\) and \(f\) are continuous on an interval \(I\text{,}\) show that
\begin{align*} u_1(t) & =  \int_{t_0}^t \frac{y_2(s) f(s)}{W[y_1, y_2](s)} \, ds\\ u_2(t) & = \int_{t_0}^t \frac{ y_1(s) f(s)}{W[y_1, y_2](s)} \, ds \end{align*}for any point \(t_0\) in \(I\text{.}\) Consequently, a particular solution to (4.2.6) is\begin{equation*} y_p = y_1(t) \int_{t_0}^t \frac{ y_2(s) f(s)}{W[y_1, y_2](s)} \, ds + y_2(t) \int_{t_0}^t \frac{ y_1(s) f(s)}{W[y_1, y_2](s)} \, ds. \end{equation*}Find the general solution of the differential equation
\begin{equation*} y'' + 4y = 3 \csc t. \end{equation*}
If \(y_p = u_1y_1 + u_2 y_2\text{,}\) then
\begin{gather*} y_p' = u_1' y_1 + u_1 y_1' + u_2' y_2 + u_2 y_2' = u_1 y_1' + u_2 y_2'\\ y_p'' = u_1' y_1' + u_1 y_1'' + u_2' y_2' + u_2 y_2''. \end{gather*}Substituting these expressions into equation (4.2.6), we have\begin{align*} y_p'' + p y_p' + q y_p & = ( u_1' y_1' + u_1 y_1'' + u_2' y_2' + u_2 y_2'') + p(u_1 y_1' + u_2 y_2')\\ & + q(u_1y_1 + u_2 y_2)\\ & = u_1[y_1'' + p y_1' +q y_1] + u_2[y_2'' + p y_2' +q y_2] + u_1' y_1' + u_2' y_2'\\ & = u_1' y_1' + u_2' y_2'\\ & = f(t). \end{align*}If we solve the system
\begin{align*} u_1'(t) y_1(t) + u_2'(t) y_2(t) & = 0\\ u_1'(t) y_1' (t)+ u_2'(t) y_2'(t) & = f(t). \end{align*}for \(u_1'\) and \(u_2'\text{,}\) we obtain\begin{align*} u_1'(t) & = \frac{ y_2(t) f(t)}{W[y_1, y_2](t)}\\ u_2'(t) & = \frac{y_1(t) f(t)}{W[y_1, y_2](t)}. \end{align*}Integrate the two equations from part (2).
The general solution to the homogeneous equation \(y'' + 4y = 0\) is
\begin{equation*} y_h = c_1 \cos 2t + c_2 \sin 2t. \end{equation*}To find a particular solution, assume that the solution has the form\begin{equation*} y_p = u_1(t) \cos 2t + u_2(t) \sin 2t. \end{equation*}By part (2)\begin{align*} u_1'(t) & = 3 \cos t\\ u_2'(t) & = \frac{3}{2} \csc t  3 \sin t. \end{align*}Integrating, we obtain\begin{align*} u_1(t) & = 3 \sin t\\ u_2(t) & = \frac{3}{2} \ln \csc t  \cot t + 3 \cos t. \end{align*}Therefore,\begin{align*} y_p(t) & = u_1(t) y_1(t) + u_2(t) y_2(t)\\ & = 3 \sin t \cos 2t + \left[\frac{3}{2} \ln \csc t  \cot t + 3 \cos t\right] \sin 2t, \end{align*}and the general solution is\begin{align*} y & = y_h + y_p\\ & = c_1 \cos 2t + c_2 \sin 2t 3 \sin t \cos 2t + \left[\frac{3}{2} \ln \csc t  \cot t + 3 \cos t\right] \sin 2t. \end{align*}