← Back to Math 055

4.4 Undetermined Coefficients–Superposition Approach: Class Notes

4.4a

The techniques in this lesson apply to nonhomogeneous DEs of the form any(n)+an−1y(n−1)+⋯+a1y′+a0y=g(x) whose input functions (that is, g(x)) are constants, polynomials, exponentials, sines and cosines, and sums and products of these.

From 4.1: Consider y″−6y′+5y=−9e2x+5x2+3x−16.

Here g(x)=g1(x)+g2(x). The complete (general) solution is

y=c1ex+c2e5x+3e2x+x2+3x,

where yc=c1ex+c2e5x is the complementary function and yp=yp1+yp2 is the particular solution. yc is a solution to the associated homogeneous DE y″−6y′+5y=0.

How do we find yp from scratch? Notice that g(x) comprises an exponential function and a polynomial function.

Complementary function. Auxiliary equation:

m2−6m+5=0 ⇒ (m−1)(m−5)=0 ⇒ m=1, 5,yc=c1ex+c2e5x.

First piece. Consider y″−6y′+5y=−9e2x. Since g1(x) is exponential with exponent 2x, guess

yp1=Ae2x,yp1′=2Ae2x,yp1″=4Ae2x.

Substitute:

4Ae2x−12Ae2x+5Ae2x=−9e2x4A−12A+5A=−3A=−9 ⇒ A=3

yp1=3e2x

Second piece. Consider y″−6y′+5y=5x2+3x−16. Since g2(x) is a 2nd-degree polynomial, guess a general 2nd-degree polynomial:

yp2=Ax2+Bx+C,yp2′=2Ax+B,yp2″=2A.

This goes into the equation:

2A−6(2Ax+B)+5(Ax2+Bx+C)=5x2+3x−16(5A)x2+(−12A+5B)x+(2A−6B+5C)=5x2+3x−16

Match coefficients, solving from the top down:

x2 terms:5A=5⇒ A=1x terms:−12A+5B=3⇒ B=3constants:2A−6B+5C=−16⇒ C=0

yp2=x2+3x

By superposition, yp=yp1+yp2=3e2x+x2+3x, and the general solution to the nonhomogeneous DE is y=yc+yp:

Answer: y=c1ex+c2e5x+3e2x+x2+3x

Tip: We could have found both pieces at once with yp=Ae2x+Bx2+Cx+D.

4.4b

Example

Solve the given differential equation by undetermined coefficients.

y″−8y′+20y=100x2−26xex

Solution

Step 1: complementary function. Complete the square in the auxiliary equation:

m2−8m+20=0m2−8m+16=−20+16(m−4)2=−4 ⇒ m=4±2i

yc=e4x(c1cos⁡2x+c2sin⁡2x)

Step 2: the polynomial piece 100x2.

yp1=Ax2+Bx+C,yp1′=2Ax+B,yp1″=2A

2A−8(2Ax+B)+20(Ax2+Bx+C)=100x220Ax2+(−16A+20B)x+(2A−8B+20C)=100x2

Matching coefficients: 20A=100, −16A+20B=0, and 2A−8B+20C=0, so

A=5,B=4,C=1110,yp1=5x2+4x+1110.

Step 3: the piece −26xex. It is a product of a linear function and an exponential, so

yp2=(Ax+B)ex.

By the product rule (factoring out ex),

yp2′=Aex+(Ax+B)ex=(A+Ax+B)exyp2″=(A+A+Ax+B)ex=(2A+B+Ax)ex.

Substitute into y″−8y′+20y=−26xex and cancel ex:

(2A+B+Ax)−8(A+B+Ax)+20(Ax+B)=−26x

x terms:A−8A+20A=−26⇒ A=−2constants:2A+B−8A−8B+20B=0⇒ B=−1213

So yp2=(−2x−1213)ex, and y=yc+yp1+yp2:

Answer: y=e4x(c1cos⁡2x+c2sin⁡2x)+5x2+4x+1110+(−2x−1213)ex

4.4c

Example

y″−16y=2e4x

Solution

Setting ourselves up for potential failure: since g(x)=2e4x, try

yp=Ae4x,yp′=4Ae4x,yp″=16Ae4x.

16Ae4x−16Ae4x=2e4x ⇒ 0=2e4x(impossible)

We must always first find yc:

m2−16=0 ⇒ m=±4,yc=c1e4x+c2e−4x.

The guess yp=Ae4x is redundant with yc: it is a solution of the homogeneous equation, so it produces 0 on the left side. To find a form of yp that is independent with yc, we insert factor(s) of x. Here

yp=Axe4x,

where this factor of x avoids redundancy with yc. Then

yp′=(A+4Ax)e4xyp″=(4A+4A+16Ax)e4x=(8A+16Ax)e4x.

Substitute into y″−16y=2e4x and cancel e4x:

8A+16Ax−16Ax=2 ⇒ A=14.

Recall y=yc+yp:

Answer: y=c1e4x+c2e−4x+14xe4x

Example

4y″−4y′−3y=cos⁡2x

Solution

4m2−4m−3=0 ⇒ (2m+1)(2m−3)=0 ⇒ m=−12, 32

yc=c1e−x/2+c2e3x/2

For g(x)=cos⁡2x, the guess needs both cosine and sine:

yp=Acos⁡2x+Bsin⁡2xyp′=−2Asin⁡2x+2Bcos⁡2xyp″=−4Acos⁡2x−4Bsin⁡2x

Multiply by the coefficients 4, −4, −3 and substitute:

−16Acos⁡2x−16Bsin⁡2x+8Asin⁡2x−8Bcos⁡2x−3Acos⁡2x−3Bsin⁡2x=cos⁡2x

Cosine terms:−16A−8B−3A=1 ⇒ −19A−8B=1Sine terms:−16B+8A−3B=0 ⇒ 8A−19B=0

Solve by elimination. Multiply the first equation by −19 and the second by 8, then add:

361A+8(19)B=−1964A−8(19)B=0425A=−1 ⇒ A=−19425

Multiply the first equation by 8 and the second by 19, then add:

−8(19)A−64B=88(19)A−361B=0−425B=8 ⇒ B=−8425

Answer: y=c1e−x/2+c2e3x/2−19425cos⁡2x−8425sin⁡2x

yp forms, assuming no redundancy

Forms of the particular solution
g(x)yp
3x2+2Ax2+Bx+C
7e4xAe4x
8x2e2x(Ax2+Bx+C)e2x
3sin⁡2xAsin⁡2x+Bcos⁡2x
xcos⁡3x(Ax+B)cos⁡3x+(Cx+D)sin⁡3x

Aside: when there is redundancy

Suppose y1=e2x is part of yc. Then the form (Ax2+Bx+C)e2x for g(x)=8x2e2x is redundant (its Ce2x term solves the homogeneous equation), so multiply by x:

yp=(Ax2+Bx+C)xe2x.

If xe2x is also part of yc, this form is still redundant (its Cxe2x term), so insert another factor of x.