3.4: Method of Undetermined Coefficients
( \newcommand{\kernel}{\mathrm{null}\,}\)
Up to now, we have considered homogeneous second order differential equations. In this discussion, we will investigate nonhomogeneous second order linear differential equations.
Let
L(y)=y″+p(t)y′+q(t)y=g(t)
be a second order linear differential equation with p, q, and g continuous and let
L(y1)=L(y2)=0andL(yp)=g(t)
and let
yh=c1y1+c2y2.
Then the general solution is given by
y=yh+yp.
Since L is a linear transformation,
L(yh+yp)=C1L(y1)+C2L(y2)+L(yh)=C1(0)+C2(0)+g(t)=g(t).
This establishes that yh+yp is a solution. Next we need to show that all solutions are of this form. Suppose that y3 is a solution to the nonhomogeneous differential equation. Then we need to show that
y3=yh+yp
for some constants c1 and c2 with
yh=c1y1+c2y2.
This is equivalent to
y3−yp=yh.
We have
L(y3−yp)=L(y3)−L(yp)=g(t)−g(t)=0.
Therefore y3−yp is a solution to the homogeneous solution. We can conclude that
y3−yp=c1y1+c2y2=yh.
◻
This theorem provides us with a practical way of finding the general solution to a nonhomogeneous differential equation.
- Step 1: Find the general solution yh to the homogeneous differential equation.
- Step 2: Find a particular solution yp to the nonhomogeneous differential equation.
- Step 3: Add yh+yp.
We have already learned how to do Step 1 for constant coefficients. We will now embark on a discussion of Step 2 for some special functions g(t).
A function g(t) generates a UC-set if the vector space of functions generated by g(t) and all the derivatives of g(t) is finite dimensional.
Let g(t)=tsin(3t).
Then
g′(t)=sin(3t)+3tcos(3t)g″(t)=6cos(3t)−9tsin(3t)g(3)(t)=−27sin(3t)−27tcos(3t)g(4)(t)=81cos(3t)−108tsin(3t)g(4)(t)=405sin(3t)−243tcos(3t)g(5)(t)=1458cos(3t)−729tcos(3t)
We can see that g(t) and all of its derivative can be written in the form
g(n)(t)=Asin(3t)+Bcos(3t)+Ctsin(3t)+Dtcos(3t).
We can say that {sin(3t),cos(3t),tsin(3t),tcos(3t)} is a basis for the UC-Set.
We now state without proof the following theorem tells us how to find the particular solution of a nonhomogeneous second order linear differential equation.
Let
L(y)=ay″+by′+cy=g(t)
be a nonhomogeneous linear second order differential equation with constant coefficients such that g(t) generates a UC-Set
f1(t),f2(t),...fn(t)
Then there exists a whole number s such that
yp=ts[c1f1(t)+c2f2(t)+...+cnfn(t)]
is a particular solution of the differential equation.
Remark: The "s" will come into play when the homogeneous solution is also in the UC-Set.
Find the general solution of the differential equation
y″+y′−2y=e−tsint.
Solution
First find the solution to the homogeneous differential equation
y″+y′−2y=0.
We have
r2+r−2=(r−1)(r+2)=0
r=−2orr=1.
Thus
yh=c1e−2t+c2et.
Next notice that e−tsint and all of its derivatives are of the form
Ae−tsint+Be−tcost.
We set
yp=Ae−tsint+Be−tcost
and find
y′p=A(−e−tsint+e−tcost)+B(−e−tcost−e−tsint)=−(A+B)e−tsint+(A−B)e−tcost
and
y″p=−(A+B)(−e−tsint+e−tcost)+(A−B)(−e−tcost−e−tsint)=[(A+B)−(A−B)]e−tsint+[−(A+B)−(A−B)]e−tcost=2Be−tsint−2Ae−tcost.
Now put these into the original differential equation to get
2Be−tsint−2Ae−tcost+−(A+B)e−tsint+(A−B)e−tcost−2(Ae−tsint+Be−tcost)=e−tsint.
Combine like terms to get
(2B−A−B−2A)e−tsint+(−2A+A−B−2B)e−tcost=e−tsint
or
(−3A+B)e−tsint+(−A−3B)e−tcost=e−tsint.
Equating coefficients, we get
−3A+B=1and−A−3B=0.
This system has solution
A=−310,B=110.
The particular solution is
yp=−310e−tsint+110e−tcost.
Adding the particular solution to the homogeneous solution gives
y=yh+yp=c1e−2t+c2et+−310e−tsint+110e−tcost.
Solve
y″+y=5sint.
Solution
The characteristic equation is
r2+1=0.
Which has the complex roots
r=iorr=−i.
The homogeneous solution is
yh=c1sint+c2cost.
The UC-Set for sint is {sint,cost}. Derivatives are all sin and cos functions
Notice that both of the functions in the UC-Set are solutions to the homogeneous differential equation. We need to multiply by t to get
{tsint,tcost}.
The particular solution is
yp=Atsint+Bcosty′p=Asint+Atcost+Bcost−Btsinty″p=Acost+Acost−Atsint−Bsint−Bsint−Btcost=2Acost−Atsint−2Bsint−Btcost.
Now put these back into the original differential equation (Equation ???) to get
2Acost−Atsint−2Bsint−Btcost+Atsint+Btcost=5sint2Acost−2Bsint=5sint.
Equating coefficients gives
2A=0and−2B=5.
So
A=0andB=−25.
We have
yp=−25cost.
Adding yp to yh gives
y=c1sint+c2cost−25cost.
Contributors and Attributions
- Larry Green (Lake Tahoe Community College)
Integrated by Justin Marshall.