Second Order Differential Equations

3.4 Method of Undetermined Coefficients

The method of undetermined coefficients is a technique for finding particular solutions, [asciimath]y_p[/asciimath]​, to nonhomogeneous linear differential equations with constant coefficients

 [asciimath]ay'' +by' + cy = f(x)[/asciimath]

To apply this method, we first identify the form of the forcing function [asciimath]f(x)[/asciimath] and then make an educated guess of [asciimath]y_p​[/asciimath] with undetermined coefficients. This guess is substituted back into the equation to solve for these coefficients. This method is useful when the forcing function, [asciimath]f(x)[/asciimath], is a relatively simple function, such as a polynomial, exponential, sine, or cosine function, or a linear combination of these.

 

Example 3.4.1: Form of the Guess of Particular Solution

Polynomial Forcing Functions: For [asciimath]y'' +y' - 3y = 9x^2 + 7x + 5[/asciimath], we don’t know a particular solution. However, by looking at [asciimath]f(x)[/asciimath], we wonder what kind of function would leave a polynomial, guess [asciimath]Y_p = AX^2+Bx+C[/asciimath] and solve for [asciimath]A, B, C[/asciimath].

 

Exponential Forcing Functions: For [asciimath]y'' - 3y' + 2y = 5e^(4x)[/asciimath], we guess [asciimath]Y_p = Ae^(4x)[/asciimath]. If [asciimath]f(x)[/asciimath] was [asciimath]5e^(2x)[/asciimath], we would multiply our guess by [asciimath]x[/asciimath]: [asciimath]Y_p = Axe^(2x)[/asciimath].

 

Adjusting the Guess Based on Complementary Equation Solutions: If the complementary equation has a solution matching part of [asciimath]f(x)[/asciimath], adjust your guess accordingly. For example, if[asciimath]f(x)= (3x-2)e^(4x)[/asciimath], start with [asciimath]Y_p = (Ax+B)e^(4x)[/asciimath]. If [asciimath]e^(4x)[/asciimath] is a solution for the homogeneous equation, use [asciimath]Y_p=(Ax+B)xe^(4x)[/asciimath]. For a repeated root, use [asciimath]Y_p = (Ax+B)x^2e^(4x)[/asciimath].

 

Note that we use [asciimath]Y_p[/asciimath] with a capital ‘Y’ to represent our initial guess for the particular solution. In contrast, [asciimath]y_p[/asciimath] with a lowercase ‘y’ is used to denote the actual particular solution after determining the coefficients.

 

Example 3.4.2: Solve an Equation with Exponential Forcing Function

Find the general solution to the following equation.

 [asciimath](d^2y)/(dx^2) + 10(dy)/(dx) +25y = 3e^(-2 x)[/asciimath]
Show/Hide Solution

 

Finding the complementary solution:

While it’s not necessary to know the complementary solution to find the particular solution, knowing it is beneficial. Understanding the complementary solution helps us make better initial guesses for the particular solution and adjust them accordingly before we proceed with the algebra needed to determine the undetermined coefficients.

The auxiliary equation associated with the complementary equation is [asciimath]r^2+10r+25=0[/asciimath], which has a repeated root [asciimath]r=-5[/asciimath]. Thus, [asciimath]{e^(-5x),xe^(-5x)}[/asciimath] is a fundamental set of solutions of the complementary equation.

Guessing the form of the particular solution:

Since [asciimath]f(x)[/asciimath] is an exponential function and exponential functions never change exponent or disappear through differentiation, we assume that the particular solution will have a form similar to the exponential component in [asciimath]f(x)[/asciimath]. Also, the exponent in [asciimath]f(x)[/asciimath] differs from the exponent in the complementary solution, so there is no adjustment required.

 [asciimath]Y_p=Ae^(-2x)[/asciimath]

Plugging in the guess into the equation to find A:

Next, we plug in the guess and its derivatives into the differential equation to determine the undetermined coefficient A.

 [asciimath]Y_p=Ae^(-2x)[/asciimath] ,  [asciimath]Y'_p=-2Ae^(-2x)[/asciimath] ,  [asciimath]Y''_p=4Ae^(-2x)[/asciimath]

 [asciimath]4Ae^(-2x) - 20Ae^(-2x) +25Ae^(-2x) = 3e^(-2 x)[/asciimath]

[asciimath](4A-20A+25A)e^(-2x)=3e^(-2x)[/asciimath]

[asciimath]9Ae^(-2x)=3e^(-2x)[/asciimath]

[asciimath]9A=3[/asciimath]

[asciimath]A=1/3[/asciimath]

Therefore, the particular solution to the differential equation is

 [asciimath]y_p=1/3e^(-2x)[/asciimath]

Finding the general solution:

The general solution of a nonhomogenous equation is

 [asciimath]y = y_p + c_1 y_1 + c_2 y_2[/asciimath].

where [asciimath]y_1[/asciimath], and [asciimath]y_2[/asciimath]  are the solutions to the complementary equation and [asciimath]y_p[/asciimath] is the particular solution to the nonhomogeneous equation.

 [asciimath]y=1/3e^(-2x)+c_1e^(-5x)+c_2xe^(-5x)[/asciimath]

 

Try an Example

 

 

Example 3.4.3: Forcing Function Similar to the Complementary Solution with Repeated Root

Find the general solution to the following equation.

 [asciimath](d^2y)/(dx^2) + 10(dy)/(dx) +25y = e^(-5 x)[/asciimath]
Show/Hide Solution

 

Finding the complementary solution:

The complementary equation is similar to the one in Example 3.4.2. Thus, [asciimath]{e^(-5x),xe^(-5x)}[/asciimath] is a fundamental set of solutions of the complementary equation and the complementary solution is [asciimath]y_c=c_1e^(-5x)+c_2xe^(-5x)[/asciimath].

Guessing the form of the particular solution:

Our initial guess is [asciimath]Y_p=Ae^(-5x)[/asciimath]. However, since [asciimath]e^(-5x)[/asciimath] is also the complementary solution, we need to adjust our guess. Given [asciimath]r=-5[/asciimath] is a repeated root, we multiply our original guess by [asciimath]x^2[/asciimath].

 [asciimath]Y_p=Ax^2e^(-5x)[/asciimath]

Plugging in the guess into the equation to find A:

Next, we plug in the guess and its derivatives into the differential equation to determine the undetermined coefficient A.

 [asciimath]Y_p=Ax^2e^(-5x)[/asciimath],

 [asciimath]Y'_p=Ae^(-5x) (2x-5x^2)[/asciimath],

 [asciimath]Y''_p=-5Ae^(-5x)(2x-5x^2)+Ae^(-5x)(2-10x)[/asciimath]

 [asciimath]Y''_p=Ae^(-5x)(25x^2-20x+2)[/asciimath]

 [asciimath](d^2y)/(dx^2) + 10(dy)/(dx) +25y = e^(-5 x)[/asciimath]

 [asciimath]Ae^(-5x)(25x^2-20x+2)+[/asciimath] [asciimath]10Ae^(-5x) (2x-5x^2)+[/asciimath] [asciimath]25Ax^2e^(-5x)=e^(-5x)[/asciimath]

Factoring the exponential term and collecting the like terms yields

 [asciimath]Ae^(-5x)(25x^2-20x+2+20x-50x^2+25x^2)=e^(-5x)[/asciimath]

[asciimath]Ae^(-5x)(2)=e^(-5x)[/asciimath]

[asciimath]2A=1[/asciimath]

 [asciimath]A=1/2[/asciimath]

Therefore, the particular solution to the differential equation is

 [asciimath]y_p=1/2x^2e^(-5x)[/asciimath]

Finding the general solution:

The general solution is

[asciimath]y=y_p+y_c[/asciimath]

 [asciimath]y=1/2x^2e^(-5x)+c_1e^(-5x)+c_2xe^(-5x)[/asciimath]

 

Try an Example

 

 

Example 3.4.4: Solve IVP with Nonhomogeneous Equation

Solve the following initial value problem.

 [asciimath](d^2y)/(dx^2) + 10(dy)/(dx) +25y = e^(-5 x),[/asciimath]       [asciimath]y(0)=2,\ y'(0)=-3[/asciimath]
Show/Hide Solution

 

Finding the general solution:

The equation is similar to the one in Example 3.4.3. Therefore, the general solution is

 [asciimath]y=1/2x^2e^(-5x)+c_1e^(-5x)+c_2xe^(-5x)[/asciimath]

Applying the initial conditions:

Applying the initial condition to [asciimath]y[/asciimath]:

 [asciimath]y(0)=2[/asciimath]

 [asciimath]c_1e^(0)=2[/asciimath]

 [asciimath]c_1=2[/asciimath]

Applying the initial condition to [asciimath]y'[/asciimath] :

 [asciimath]y'=xe^(-5x)-5/2x^2e^(-5x)-5c_1e^(-5x)+c_2(e^(-5x)-5xe^(-5x))[/asciimath]

[asciimath]y'(0)=-3[/asciimath]

[asciimath]-5c_1e^0+c_2(e^0)=-3[/asciimath]

[asciimath]-5c_1+c_2=-3[/asciimath]

Plugging in [asciimath]c_1=2[/asciimath]  yields [asciimath]c_2=7[/asciimath].

Therefore, the solution to the initial value problem is

 [asciimath]y=1/2x^2e^(-5x)+2e^(-5x)+7xe^(-5x)[/asciimath]

Note that the initial conditions must satisfy the entire solution of the nonhomogeneous equation, not just the complementary part. Therefore, we apply the initial conditions directly to the general solution of the given nonhomogeneous equation to determine the constants.

The following section summarizes the appropriate forms of guesses for various types of forcing functions and explains how to modify these guesses if any part of the forcing function [asciimath]f(x)[/asciimath] corresponds to solutions of the complementary equation.

 

Method of Undetermined Coefficient (Guessing [asciimath]Y_p[/asciimath])

To find a particular solution to the differential equation

 [asciimath]ay''+by'+cy=f(x)[/asciimath]

 [asciimath]f(x)[/asciimath]   [asciimath]Y_p[/asciimath] Guess
 [asciimath]n^(th)[/asciimath] degree polynomial  [asciimath]A_nx^n+A_(n-1)x^(n-1)+...+A_1x+A_0[/asciimath]
 [asciimath]ae^(rx)[/asciimath]  [asciimath]Ae^(rx)[/asciimath]
 [asciimath]acos(betax)[/asciimath]  [asciimath]Acos(betax)+Bsin(betax)[/asciimath]
 [asciimath]bsin(betax)[/asciimath]  [asciimath]Acos(betax)+Bsin(betax)[/asciimath]
 [asciimath]acos(betax)+bsin(betax)[/asciimath]  [asciimath]Acos(betax)+Bsin(betax)[/asciimath]

Remarks

1. Exponential and Polynomial Products: If[asciimath]f(x)[/asciimath] contains only exponential functions or products of an exponential function and polynomials and if [asciimath]e^(rx)[/asciimath] is also the solution to the associated complementary equation, then multiply the exponential part of [asciimath]Y_p[/asciimath] by [asciimath]x[/asciimath] for a simple root or [asciimath]x^2[/asciimath] for a repeated root.

2. Complex Roots: If [asciimath]f(x)[/asciimath] relates to the complex root of the complementary equation, i.e.,  [asciimath]alpha+beta[/asciimath]  is a complex root of the associate auxiliary equation, then multiply the guess [asciimath]Y_p[/asciimath] by [asciimath]x[/asciimath].

3. Exponential and Trigonometric/Polynomial Products: If[asciimath]f(x)[/asciimath] includes products of an exponential function and a polynomial or a trigonometric function, consider only the trigonometric or polynomial part for your initial guess, then multiply by the exponential part of [asciimath]f(x)[/asciimath].

4. Polynomial and Trigonometric Products: If[asciimath]f(x)[/asciimath] contains products of polynomials and trigonometric functions, first, write down the guess for just the polynomial and multiply that by the appropriate cosine. Then add on another guessed polynomial with different coefficients and multiply that by the appropriate sine.

 

Example 3.4.5: Find the Form of the Particular Solution

Find the form of a particular solution to

 [asciimath]y''+y'-6y=f(x)[/asciimath]

where [asciimath]f(x)[/asciimath] is

a) [asciimath]5cos(4x)[/asciimath]      b) [asciimath]3x^2sin(pix)[/asciimath]       c) [asciimath]7xe^(2x) cos(8x)[/asciimath]       d) [asciimath]2e^(-3x)[/asciimath]       e) [asciimath](9x^2+3)e^(2x)[/asciimath]

Show/Hide Solution

 

The auxiliary equation associated with the equation is [asciimath]r^2-r-6=0[/asciimath], which has roots [asciimath]r_1=-3[/asciimath] and [asciimath]r_2=2[/asciimath].

a)        [asciimath]Y_p=Acos(4x)+Bsin(4x)[/asciimath]

 

b) This function contains the product of polynomials (second degree) and trig functions. Using Remark 4, first, we guess the polynomial and multiply it by the proper cosine. We then add it to the product of another guessed polynomial with different coefficients and a sine.

 [asciimath]Y_p=(A_2x^2+A_1x+A_0)cos(pix)+(B_2x^2+B_1x+B_0)sin(pix)[/asciimath]

 

c) This function contains the product of exponential, polynomial (first degree), and trig functions. Using Remarks 3 and 4, first, we guess the polynomial and multiply it by the proper cosine. We then add it to the product of another guessed polynomial with different coefficients and a sine. Finally, we multiply the exponential part.

 [asciimath]Y_p=e^(2x)((A_1x+A_0)cos(8x)+(B_1x+B_0)sin(8x))[/asciimath]

 

d) Since [asciimath]r=-3[/asciimath] is the root of the auxiliary equation and thus [asciimath]e^(-3x)[/asciimath] is a solution in the fundamental set, [asciimath]Ae^(-3x)[/asciimath] won’t be a correct guess. Noting Remark 1, we need to multiply it by [asciimath]x[/asciimath]. Thus

 [asciimath]Y_p=Axe^(-3x)[/asciimath]

 

e) This function contains the product of exponential and polynomial (second degree). Using Remark 3, first, we guess the polynomial and multiply the exponential part. The polynomial guess will be [asciimath]A_2x^2+A_1x+A_0[/asciimath]. The exponential part [asciimath]e^(2x)[/asciimath] needs to be multiplied by [asciimath]x[/asciimath] as [asciimath]e^(2x)[/asciimath] is in the fundamental solution set (Remark 1). Therefore,

[asciimath]Y_p=xe^(2x)(A_2x^2+A_1x+A_0)[/asciimath]

 

Try an Example

 

Section 3.4 Exercises

  1. Find the particular solution of the ODE
     [asciimath]y'' + 8y'+ 16y = -12e^(-4 x)[/asciimath]
    Show/Hide Answer

     [asciimath]y_p=-6x^2 e^(-4x)[/asciimath]

  2. Find the general solution to the ODE:

     [asciimath](d^2y)/(dt^2) + 2(dy)/(dt) + 17y = 5e^(-4 t)[/asciimath]

    Show/Hide Answer

    [asciimath]y(t)=c_1e^(- t)cos(4t)+c_2 e^(- t)sin(4t)+ 1/5e^(-4t)[/asciimath]

  3. Find the particular solution of the ODE
     [asciimath]y'' + 12y'+ 40y = 4cos(10 x)[/asciimath]
    Show/Hide Answer

    [asciimath]y_p=2/75sin(10x)-1/75cos(10x)[/asciimath]

  4. Solve the initial value problem

     [asciimath]y'' -3y' -10y = 7e^(-2x),\ \ y(0) = 1,\ y'(0) = -17[/asciimath]

    Show/Hide Answer

    [asciimath]y(x)=3 e^(-2x)-2 e^(5x)-xe^(-2x)[/asciimath]

  5. Solve the initial value problem

     [asciimath]y''+y'-6y = 12t-62,[/asciimath]   [asciimath]\ \ y(0) = 4,\ y'(0) = 1[/asciimath]

    Show/Hide Answer

     [asciimath]y(t)=-3e^(-3t)-3e^(2t)-2t+10[/asciimath]

License

Icon for the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

Differential Equations Copyright © 2024 by Amir Tavangar is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, except where otherwise noted.

Share This Book