Lesson 10 - Method of Undetermined Coefficients

The method of undetermined coefficients is used for linear, non-homogeneous equations with constant coefficients.

anyn+an1yn1++a1y+a0y=f(x)

where a0,a1,a2, are constants and for specific kinds of functions, f(x).

We can solve the above equation when f(x) is an exponential function, a polynomial, sine/cosine functions or combinations of any of these.

Superposition Principle for Linear Non-Homogeneous Equations

If yp is a solution of the non-homogeneous equation above, and yc is the complementary solution of the corresponding homogeneous equation anyn+an1yn1++a1y+a0y=0 then the general solution of the non-homogeneous equation is given by y=yc+yp.

What does this mean?

Essentially, we solve for the left side of the equation, acting as if it is a homogeneous equation. Once we've done so, we use a set of known solutions to solve for f(x) on the right side. The two solutions that we determine will make up our general solution to the differential equation. Let's see this in action.

Example

y+3y+4y=3x+2

We recall solutions to homogeneous equations from Lesson 9 - Homogeneous Second Order Linear Equations. We first find the homogeneous solution.

m2+3m+4=0m=3±324(1)(4)2(1)=3±7i2=32±7i2yh=e32x(C1cos(72x)+C2sin(72x))

Now that we have the homogeneous solution, we seek the complementary solution by analyzing f(x). Since f(x)=3x+2, our complementary solution will contain a linear combination of the constants Ax and B. That is, yp=Ax+B.

Combining these two solutions, we get our general solution:

y(x)=e32x(C1cos(72x)+C2sin(72x))+Ax+B

We can solve for Ax+B by taking the first and second derivatives of yc and substituting them back into the original equation.

yc=Ax+Byc=Ayc=0

Recall our original equation: y+3y+4y=3x+2. So:

0+3(A)+4(Ax+B)=3x+23A+4Ax+4B=3x+2

We can now solve by equating coefficients. For example, we will pair up the coefficients that contain the variable x on the left side with the coefficients that contain a variable x on the right side, and so on.

Coefficients of x

4Ax=3x

Notice the x variables can cancel out here and we're left with:

4A=3
A=34

Coefficients of Constants (x0)

3A+4B=2
3(34)+4B=2
94+4B=2
4B=294
B=116

Our general solution is now:

y(x)=e32x(C1cos(72x)+C2sin(72x))+34x116

We can utilize this table for the solving for yc(t).

f(x)yp(x)ConstantALinearAx+BQuadraticAx2+Bx+CCubicAx3+Bx2+Cx+Esin(αx)Acos(αx)+Bsin(αx)cos(βx)Acos(βx)+Bsin(βx)eωtAeωt

Try it For Yourself:

  1. y4y=2e3x
  2. yy+y=2sin(3x)

In cases of duplication, we follow the same process as solving for repeated roots in the homogeneous solution process. Here, we compare the homogeneous solution to the complementary solution. If any of the solutions match another, we must multiply by a factor of the dependent variable. This is to keep the linear independency of our solutions.

For example, if the homogeneous solution contains a term C1et and the complementary solution contains a term Aet, then we must fix the complementary solution by a factor of t. It would look something like this: Atet. This ensures linear independency of each of the solutions.

Try it For Yourself:

  1. y+y=xsinx
  2. y+9y=sin(3x)+x2e2x

Next Lesson: Lesson 11 - Variations of Parameters

Table of Contents: Table of Contents