Differential Equations Day 16 -- Undetermined Coefficients: Solving Non Homogeneous Second Order Constant Coefficient Differential Equations
Overview
Prior to now, we've only encountered homogeneous constant coefficient second order differential equations.
You might wonder if we can use an algebraic method to solve a non homogeneous constant coefficient second order non-homogenous differential equation, such as
The answer is: in special cases, yes! It all depends on what's on the right hand side of the second order differential equation, and how that informs some adjustments to our method for solving homogeneous equations.
This method is called undetermined coefficients. Today we'll learn about this method for solving equations by following the principles outlined in these notes.
But First: Visualization Via Systemification
Before we look at the algebraic methods that are available to use, let's look at the geometry of the systemification of a non homogeneous constant coefficient differential equation such as
and its complementary homogeneous equation
The complementary equation's general solution is a key part of the general solution of the non-homogeneous original equation. We'll need to solve it later when we get to the method of undetermined coefficients.
First though, let's work out the systemifications of both equations. I've omitted the details, and only present the results:
Systemification of Non-Homogeneous equation with and :
Systemification of Complementary Homogeneous equation, again with and :
The code to plot the slope field of the systemification of the non-homogeneous equation is:
slopefield((12x+4y+3*e^(5*T))/(y))
Be sure to agree to create a slider for the third variable T
.
The code to plot the slope field of the systemification of the homogeneous complementary equation is:
slopefield((12x+4y)/(y))
Note that this code does not utilize the third variable T
.
I've plotted both of these slope fields below. Be sure to adjust the slider for the third variable T
in the applet visualizing the slope field of the systemification of the non-homogeneous equation.Slope Field of Systemification of Non-Homogeneous Equation
Slope Field of Systemification of Homogeneous Complementary Equation
The Algebraic Method of Undetermined Coefficients
The method for solving second order non-homogeneous constant coefficient differential equations is called undetermined coefficients. You can read more about it, and see more examples here.
The method boils down to these steps:
- Find the general solution of the complementary homogeneous differential equation obtained by wiping out the function of x (or t) that is causing the differential equation to be non homogeneous. It's customary to refer to this general solution as .
- Make a guess about the so-called undetermined particular solution of the non-homogeneous equation. See the above link for tips on making the guess for .
- Determine the coefficient of by plugging the guess into the non-homogeneous equation and solving.
- Construct the general solution of the non-homogeneous equation:
- If initial conditions are present, use them to obtain a particular solution of the equation that agrees with the conditions.
Example 1
We'll solve the following second order non-homogeneous constant coefficient differential equation:
- The complementary second order homogeneous constant coefficient differential equation is . The characteristic equation of this is . The roots of this are and . These roots mean the general solution of the complementary equation is .
- The appropriate guess for is to match the right hand side of the homogeneous equation. The coefficient A is the eponymous undetermined coefficient.
- Plugging , and into the non-homogeneous equation results in . This simplifies to . Thus it must be that . Solving this for shows us that the undetermined coefficient is actually . In other words, we've now determined the coefficient! Plugging this back into produces .
- The general solution is therefore (check it is in fact a solution either by hand or in GeoGebra!)
- No initial conditions were present, so we need not do this step.
f(x)
in the applet instead of y(t)
since y
is a reserved letter in GeoGebra. Unfortunately for non-homogeneous equations, we can no longer use curve()
since the slope field changes as t changes. We "hack" a fix for this matter by simply plotting (f(T),f'(T))
and make use of the third variable T
we introduced earlier. We can then trace the curve by moving T
. The resulting trace will match the changing slope field as you adjust T
. Check out the interesting specific solution when c_1=-0.5
and c_2=1
, and other specific solutions. Indeed, many interesting solutions occur for selections of c_1
and c_2
that result in near the line when T
is close to 0. Note that the trace of A won’t match the slope field as you adjust the c_i
. The trace only matches the slope field during motion in T
.Example 2
Find the general solution of
Hint:
Scroll down for the solution (not worked out).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
General solution: