Skip to main content

Section 4.2 Forcing

Harmonic oscillators such as a spring-mass system (Subsection 1.1.3) or an RLC circuit (Section 4.1) can be modeled with second-order linear differential equations. Indeed, we can model a spring-mass system with the equation
mx(t)+bx(t)+kx(t)=g(t),
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, is (measured in henrys), then the derivative of the impressed voltage (measured in volts), E(t), is the forcing term
LI+RI+1CI=E(t).
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), are not zero. Such a term is called a forcing term.

Subsection 4.2.1 Nonhomogeneous Equations

A nonhomogeneous second-order linear differential equation is an equation of the form
x+p(t)x+q(t)x=g(t).
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). Before we attempt to find solutions for some of the more common functions that might occur for g(t), let us derive some fundamental facts about second-order linear differential equations.

Proof.

Since x1 and x2 are solutions of (4.2.1), we know that
x1+p(t)x1+q(t)x1=g(t)x2+p(t)x2+q(t)x2=g(t).
Thus,
d2dt2(x1x2)+p(t)ddt(x1x2)+q(t)(x1x2)=(d2x1dt2+p(t)dx1dt+q(t)x1)(d2x2dt2+p(t)dx2dt+q(t)x2)=g(t)g(t)=0.
We can use Theorem 4.2.1 to derive the fact that the general solution to
(4.2.2)x+p(t)x+q(t)x=g(t).
can be written in the form
x=xh+xp,
where xh is the general solution of the homogeneous equation
x+p(t)x+q(t)x=0,
and xp is any solution of (4.2.2). Indeed, suppose that xq is another solution to (4.2.2). Then xqxp is a solution to the homogeneous equation
x+p(t)x+q(t)x=0.
Therefore,
xqxp=xh
xq=xh+xp.
We state this fact in the following theorem.

Subsection 4.2.2 Forcing Terms

The equation
mx+bx+kx=g(t)
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); however, certain forcing functions often occur in practice. Some of the more important forcing functions are g(t)=eat, where the external force decreases exponentially over time; g(t)=k, where a constant force is applied; and g(t)=cosωt or g(t)=sinωt, where a force is applied periodically.
In the case of the unforced damped harmonic oscillator,
mx+bx+kx=0,
we know that m>0, b>0, and k>0. Thus, we can rewrite this equation as
x+px+qx=0,
where p=b/m and q=k/m are both positive. As a first-order linear system, the harmonic oscillator is
x=yy=qxpy.
The matrix corresponding to this system,
A=(01qp),
has trace of p and determinant q. Since tr(A)<0 and det(A)>0, we know that any solution of the unforced equation tends toward the origin as t. That is, the solution is a sink. This leads us to the following conclusion.
In other words, all solutions of a damped harmonic oscillator with nonzero damping are essentially the same for large values of t.

Subsection 4.2.3 The Method of Undetermined Coefficients

Example 4.2.4.

Let us solve the differential equation
(4.2.3)x+5x+4x=1,
a harmonic oscillator with a constant forcing function. It is easy to check that the general solution to the homogeneous equation
x+5x+4x=0
is
xh=c1et+c2e4t.
A particular solution to (4.2.3) is given by xp=1/4. Thus, the general solution is
x(t)=c1et+c2e4t+14.
As t, all solutions approach the constant solution x=1/4 (Figure 4.2.5).
Figure 4.2.5. Solutions to x+5x+4x=1

Example 4.2.6.

Now let us consider a more complicated example. Suppose that we wish to solve
(4.2.4)x+5x+4x=e2t.
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
xp=Ae2t.
Substituting this expression into (4.2.4), we find that
e2t=xp+5xp+4xp=4Ae2t10Ae2t+4Ae2t=2Ae2t.
Hence, A=1/2. Therefore, the solution that we seek is
x=c1et+c2e4t12e2t.
Again, all solutions approach zero as t (Figure 4.2.7).
Figure 4.2.7. Solutions to x+5x+4x=e2t

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
x+5x+4x=2cost.
takes the form
xp=Acost+Bsint.
Then
xp=Asint+Bcostxp=AcostBsint.
Substituting these expressions into the differential equation, we see that
2cost=xp+5xp+4xp=(AcostBsint)+5(Asint+Bcost)+4(Acost+Bsint)=(3A+5B)cost+(5A+3B)sint.
We must solve the following system of equations to find a particular solution:
3A+5B=25A+3B=0.
The solution of this system is A=3/17 and B=5/17. Consequently,
xp=317cost+517sint
is a particular solution to x+5x+4x=2cost. The general solution to our equation is
x=c1et+c2e4t+317cost+517sint.
The solutions to this equation are given in Figure 4.2.9.
Figure 4.2.9. Solutions to x+5x+4x=2cost

Example 4.2.10.

As a final example, consider the equation
x+5x+4x=et.
Recall that the solution to the homogeneous equation x+5x+4x=0 is
xh=c1et+c2e4t.
Our guess of xp(t)=Aet for a particular solution will no longer work since et 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 et when differentiated. The simplest such function is of the form
xp=Atet.
Using this guess,
et=d2dt2Atet+5ddtAtet+4Atet=A(etet+tet)+5A(ettet)+4Atet=3Aet.
Thus, A=1/3 and our general solution is
x=c1et+c2e4t+13tet.
Solutions to the differential equation x+5x+4x=et are given in Figure 4.2.11.
Figure 4.2.11. Solutions to x+5x+4x=et

Activity 4.2.1. Solving Forced Second-Order Linear Differential Equations.

Find (1) a particular solution and (2) a general solution for each of the following differential equations.

Subsection 4.2.4 A Strategy

We outline a general strategy for choosing xp 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 xp is a solution of the corresponding homogeneous equation.
Table 4.2.12. Particular solutions of x+px+qx=g(t).
g(t) xp
Pn(t)=antn++a1t+a0 ts(Antn++A1t+A0)
Pn(t)eαt ts(Antn++A1t+A0)eαt
Pn(t)eαt{sinβtcosβt tseαt[(Antn++A1t+A0)cosβt
+(Bntn++B1t+B0)sinβt]

Subsection 4.2.5 Important Lessons

  • A nonhomogeneous second-order linear differential equation is an equation of the form
    x+p(t)x+q(t)x=g(t).
    Forced harmonic oscillators and RLC circuits provide good examples of nonhomogeneous second-order linear differential equations.
  • Suppose that
    x+p(t)x+q(t)x=g(t)
    has solutions x1=x1(t) and x2=x2(t). Then x1(t)x2(t) is a solution of the homogeneous linear differential equation
    x+p(t)x+q(t)x=0.
  • Let xp be a particular solution of the equation
    x+p(t)x+q(t)x=g(t),
    and xh be the general solution of the corresponding homogeneous equation
    x+p(t)x+q(t)x=0.
    Then the general solution to x+p(t)x+q(t)x=g(t) is x=xh+xp. 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 xp(t) as t.
  • The Method of Undetermined Coefficients is useful for solving the equation x+p(t)x+q(t)x=g(t), when g is of the form
    g(t)=Pn(t)eαt{sinβtcosβt

Reading Questions 4.2.6 Reading Questions

1.

Suppose that xp(t) and xq(t) are two solutions for ax+bx+cx=g(t). 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.
8.
u+ω02y=cosωt, ω2ω02

Finding General Solutions.

Find the general solution for each equation in Exercise Group 4.2.7.9–16.
16.
u+ω02y=cosωt, ω2ω02

Solving Initial Value Problems.

Solve the initial problems in Exercise Group 4.2.7.17–24.
17.
y2y3y=3e2t, y(0)=1, y(0)=0
18.
yy2y=4x2, y(0)=1, y(0)=1
19.
d2xdx26dxdt+25x=64et, x(0)=1, x(0)=2
20.
y+16y=2sin2t, y(0)=1, y(0)=0
21.
y+16y=2sin4t, y(0)=1, y(0)=0
22.
y+2y+y=2et, y(0)=1, y(0)=3
23.
y+6y+8y=cos3t, y(0)=2, y(0)=1
24.
u+ω02y=cosωt, ω2ω02, u(0)=1, u(0)=1

25.

We define two functions, f(t) and g(t), to be linearly independent on an open interval I=(a,b) if there do not exist nonzero constants c1 and c2 such that
c1f(t)+c2g(t)=0
for all tI. 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
y+py+qy=0.
Show that f(t) and g(t) are linearly dependent on an interval I=(a,b) if and only if W[f,g](t)0, where W[f,g](t)=f(t)g(t)g(t)f(t) is the Wronskian of f and g.
Hint.
Suppose that that f(t) and g(t) are linearly dependent on an interval I=(a,b). Then one function is a multiple of the other, say f(t)=cg(t). Thus, f(t)=cg(t).
W(f,g)(t)=det(f(t)g(t)f(t)g(t))=f(t)g(t)f(t)g(t)=cg(t)g(t)cg(t)g(t)=0.
Conversely, suppose that
W(f,g)(t)=det(f(t)g(t)f(t)g(t))=0,
for all t in (a,b). If g=0, then 0f=g and the two functions are linearly dependent. Assume that g(t0)0 for some t0 in (a,b). Since g is differentiable, it must also be continuous and there is some interval (c,d) contained in (a,b) such that t0(c,d) and g does not vanish on this interval. Therefore,
ddt(fg)=fgfgg2=W(f,g)g2=0,
and f/g is constant on the interval (c,d). Thus, f(t0)=cg(t0) and f(t0)=cg(t0). Since f and cg are both solutions to the differential equation y+py+qy=0 and have the same initial condition, f(t)=cg(t) for all t(a,b) by the existence and uniqueness theorem. Consequently, f and g are linearly dependent.

26.

Abel’s Theorem. If y1 and y2 are solutions of the homogeneous equation
y+p(t)y+q(t)y=0,
where p and q are continuous on an open interval I=(a,b), show that
W[y1,y2](t)=cexp(p(t)dt),
for some constant c that depends on y1 and y2 but not on t.
  1. Use Abel’s Theorem to find the Wronskian of 2t2y+3tyy=0 up to a constant multiple, where t>0.
  2. Prove Abel’s Theorem.
Hint.
  1. We can rewrite 2t2y+3tyy=0 as
    y+32ty12t2y=0.
    Since p(t)=1/2t, Abel’s Theorem tells us that
    W[y1,y2](t)=cexp(32tdt)=cexp(32lnt)=ct3/2.
  2. Since y1 and y2 are solutions to our differential equation, we know that
    y1+p(t)y1+q(t)y1=0y2+p(t)y2+q(t)y2=0.
    Multiplying the first equation by y2 and the second equation by y1 and subtracting, we obtain
    (4.2.5)(y1y2y1y2)+p(t)(y1y2y1y2)=0.
    If
    W(t)=W(y1,y2)(t)=y1y2y1y2,
    then
    W=y1y2y1y2,
    and equation (4.2.5) becomes
    W+p(t)W=0.
    This equation is separable with solution
    W(t)=cexp(p(t)dt).

27.

The Method of Variation of Parameters. In this problem we will describe another method of finding a particular solution to a nonhomogeneous equation,
(4.2.6)y+p(t)y+q(t)y=f(t),
if we know know that the general solution to the homogeneous equation y+p(t)y+q(t)y=0 is
yh=c1y1+c2y2.
  1. Assume that a particular solution of (4.2.6) has the form
    yp(t)=u1(t)y1(t)+u2(t)y2(t),
    where
    u1(t)y1(t)+u2(t)y2(t)=0.
    Substitute yp into the left-hand side of (4.2.6) to show that
    u1(t)y1(t)+u2(t)y2(t)=f(t).
  2. Show that
    u1(t)=y2(t)f(t)W[y1,y2](t)u2(t)=y1(t)f(t)W[y1,y2](t),
    where W[y1,y2](t)=y1(t)y2(t)y2(t)y1(t) is the Wronskian of y1 and y2.
  3. If p, q, and f are continuous on an interval I, show that
    u1(t)=t0ty2(s)f(s)W[y1,y2](s)dsu2(t)=t0ty1(s)f(s)W[y1,y2](s)ds
    for any point t0 in I. Consequently, a particular solution to (4.2.6) is
    yp=y1(t)t0ty2(s)f(s)W[y1,y2](s)ds+y2(t)t0ty1(s)f(s)W[y1,y2](s)ds.
  4. Find the general solution of the differential equation
    y+4y=3csct.
Hint.
  1. If yp=u1y1+u2y2, then
    yp=u1y1+u1y1+u2y2+u2y2=u1y1+u2y2yp=u1y1+u1y1+u2y2+u2y2.
    Substituting these expressions into equation (4.2.6), we have
    yp+pyp+qyp=(u1y1+u1y1+u2y2+u2y2)+p(u1y1+u2y2)+q(u1y1+u2y2)=u1[y1+py1+qy1]+u2[y2+py2+qy2]+u1y1+u2y2=u1y1+u2y2=f(t).
  2. If we solve the system
    u1(t)y1(t)+u2(t)y2(t)=0u1(t)y1(t)+u2(t)y2(t)=f(t).
    for u1 and u2, we obtain
    u1(t)=y2(t)f(t)W[y1,y2](t)u2(t)=y1(t)f(t)W[y1,y2](t).
  3. Integrate the two equations from part (2).
  4. The general solution to the homogeneous equation y+4y=0 is
    yh=c1cos2t+c2sin2t.
    To find a particular solution, assume that the solution has the form
    yp=u1(t)cos2t+u2(t)sin2t.
    By part (2)
    u1(t)=3costu2(t)=32csct3sint.
    Integrating, we obtain
    u1(t)=3sintu2(t)=32ln|csctcott|+3cost.
    Therefore,
    yp(t)=u1(t)y1(t)+u2(t)y2(t)=3sintcos2t+[32ln|csctcott|+3cost]sin2t,
    and the general solution is
    y=yh+yp=c1cos2t+c2sin2t3sintcos2t+[32ln|csctcott|+3cost]sin2t.
You have attempted 1 of 3 activities on this page.