Method of Undetermined Coefficients (2024)

This page is about second order differential equations of this type:

d2ydx2 + P(x)dydx + Q(x)y = f(x)

where P(x), Q(x) and f(x) are functions of x.

Please read Introduction to Second Order Differential Equations first, it shows how to solve the simpler "hom*ogeneous" case where f(x)=0

Two Methods

There are two main methods to solve these equations:

Undetermined Coefficients (that we learn here) which only works when f(x) is a polynomial, exponential, sine, cosine or a linear combination of those.

Variation of Parameters which is a little messier but works on a wider range of functions.

Undetermined Coefficients

To keep things simple, we only look at the case:

d2ydx2 + pdydx + qy = f(x)

where p and q are constants.

The complete solution to such an equation can be found by combining two types of solution:

  1. The general solution of the hom*ogeneous equation

    d2ydx2 + pdydx + qy = 0

  2. Particular solutions of the non-hom*ogeneous equation

    d2ydx2 + pdydx + qy = f(x)

Note that f(x) could be a single function or a sum of two or more functions.

Once we have found the general solution and all the particular solutions, then the final complete solution is found by adding all the solutions together.

Example 1: d2ydx2 − y = 2x2 − x − 3

(For the moment trust me regarding these solutions)

The hom*ogeneous equation d2ydx2 − y = 0 has a general solution

y = Aex + Be-x

The non-hom*ogeneous equation d2ydx2 − y = 2x2 − x − 3 has a particular solution

y = −2x2 + x − 1

So the complete solution of the differential equation is

y = Aex + Be-x − 2x2 + x − 1

Let’s check if the answer is correct:

y = Aex + Be-x − 2x2 + x − 1

dydx = Aex − Be-x − 4x + 1

d2ydx2 = Aex + Be-x − 4

Putting it together:

d2ydx2 − y = Aex + Be-x − 4 − (Aex + Be-x − 2x2 + x − 1)

= Aex + Be-x − 4 − Aex − Be-x + 2x2 − x + 1

= 2x2 − x − 3

So in this case we have shown that the answer is correct, but how do we find the particular solutions?

We can try guessing ... !

This method is only easy to apply if f(x) is one of the following:

Either:f(x) is a polynomial function.

Or:f(x) is a linear combination of sine and cosine functions.

Or:f(x) is an exponential function.

And here is a guide to help us with a guess:

f(x)y(x) guess
aebxAebx
a cos(cx) + b sin(cx)A cos(cx) + B sin(cx)
kxn (n=0, 1, 2,...)Anxn + An−1xn−1 + … + A0

But there is one important rule that must be applied:

You must first find the general solution to the hom*ogeneous equation.

You will see why as we continue on.

Example 1 (again): Solve d2ydx2 − y = 2x2 − x − 3

1. Find the general solution of

d2ydx2 − y = 0

The characteristic equation is: r2 − 1 = 0

Factor: (r − 1)(r + 1) = 0

r = 1 or −1

So the general solution of the differential equation is

y = Aex + Be-x

2. Find the particular solution of

d2ydx2 − y = 2x2 − x − 3

We make a guess:

Let y = ax2 + bx + c

dydx = 2ax + b

d2ydx2 = 2a

Substitute these values into d2ydx2 − y = 2x2 − x − 3

2a − (ax2 + bx + c) = 2x2 − x − 3

2a − ax2 − bx − c = 2x2 − x − 3

− ax2 − bx + (2a − c) = 2x2 − x − 3

Equate coefficients:

x2 coefficients:−a = 2 a = −2 ... (1)
x coefficients:−b = −1 b = 1 ... (2)
Constant coefficients:2a − c = −3 ... (3)

Substitute a = −2 from (1) into (3)

−4 − c = −3

c = −1

a = −2, b = 1 and c = −1, so the particular solution of the differential equation is

y = − 2x2 + x − 1

Finally, we combine our two answers to get the complete solution:

y = Aex + Be-x − 2x2 + x − 1

Why did we guess y = ax2 + bx + c (a quadratic function) and not include a cubic term (or higher)?

The answer is simple. The function f(x) on the right side of the differential equation has no cubic term (or higher); so, if y did have a cubic term, its coefficient would have to be zero.

Hence, for a differential equation of the type d2ydx2 + pdydx + qy = f(x) where f(x) is a polynomial of degree n, our guess for y will also be a polynomial of degree n.


Example 2: Solve

6d2ydx2 − 13dydx − 5y = 5x3 + 39x2 − 36x − 10

1. Find the general solution of 6d2ydx2 − 13dydx − 5y = 0

The characteristic equation is: 6r2 − 13r − 5 = 0

Factor: (2r − 5)(3r + 1) = 0

r = 52 or −13

So the general solution of the differential equation is

y = Ae(5/2)x + Be(−1/3)x

2. Find the particular solution of 6d2ydx2 − 13dydx − 5y = 5x3 + 39x2 − 36x − 10

Guess a cubic polynomial because 5x3 + 39x2 − 36x − 10 is cubic.

Let y = ax3 + bx2 + cx + d

dydx = 3ax2 + 2bx + c

d2ydx2 = 6ax + 2b

Substitute these values into 6d2ydx2 − 13dydx −5y = 5x3 + 39x2 −36x −10

6(6ax + 2b) − 13(3ax2 + 2bx + c) − 5(ax3 + bx2 + cx + d) = 5x3 + 39x2 − 36x − 10

36ax + 12b − 39ax2 − 26bx − 13c − 5ax3 − 5bx2 − 5cx − 5d = 5x3 + 39x2 − 36x − 10

−5ax3 + (−39a − 5b)x2 + (36a − 26b − 5c)x + (12b − 13c − 5d) = 5x3 + 39x2 − 36x − 10

Equate coefficients:

x3 coefficients:−5a = 5 a = −1
x2 coefficients:−39a −5b = 39 b = 0
x coefficients:36a −26b −5c = −36 c = 0
Constant coefficients:12b − 13c −5d = −10 d = 2

So the particular solution is:

y = −x3 + 2

Finally, we combine our two answers to get the complete solution:

y = Ae(5/2)x + Be(−1/3)x − x3 + 2

And here are some sample curves:

Method of Undetermined Coefficients (1)


Example 3: Solve d2ydx2 + 3dydx − 10y = −130cos(x) + 16e3x

In this case we need to solve three differential equations:

1. Find the general solution to d2ydx2 + 3dydx − 10y = 0

2. Find the particular solution to d2ydx2 + 3dydx − 10y = −130cos(x)

3. Find the particular solution to d2ydx2 + 3dydx − 10y = 16e3x

So, here’s how we do it:

1. Find the general solution to d2ydx2 + 3dydx − 10y = 0

The characteristic equation is: r2 + 3r − 10 = 0

Factor: (r − 2)(r + 5) = 0

r = 2 or −5

So the general solution of the differential equation is:

y = Ae2x+Be-5x

2. Find the particular solution to d2ydx2 + 3dydx − 10y = −130cos(x)

Guess. Since f(x) is a cosine function, we guess that y is a linear combination of sine and cosine functions:

Try y = acos⁡(x) + bsin(x)

dydx = − asin(x) + bcos(x)

d2ydx2 = − acos(x) − bsin(x)

Substitute these values into d2ydx2 + 3dydx − 10y = −130cos(x)

−acos⁡(x) − bsin(x) + 3[−asin⁡(x) + bcos(x)] − 10[acos⁡(x)+bsin(x)] = −130cos(x)

cos(x)[−a + 3b − 10a] + sin(x)[−b − 3a − 10b] = −130cos(x)

cos(x)[−11a + 3b] + sin(x)[−11b − 3a] = −130cos(x)

Equate coefficients:

Coefficients of cos(x):−11a + 3b = −130 ... (1)
Coefficients of sin(x):−11b − 3a = 0 ... (2)

From equation (2), a = −11b3

Substitute into equation (1)

121b3 + 3b = −130

130b3 = −130

b = −3

a = −11(−3)3 = 11

So the particular solution is:

y = 11cos⁡(x) − 3sin(x)

3. Find the particular solution to d2ydx2 + 3dydx − 10y = 16e3x

Guess.

Try y = ce3x

dydx = 3ce3x

d2ydx2 = 9ce3x

Substitute these values into d2ydx2 + 3dydx − 10y = 16e3x

9ce3x + 9ce3x − 10ce3x = 16e3x

8ce3x = 16e3x

c = 2

So the particular solution is:

y = 2e3x

Finally, we combine our three answers to get the complete solution:

y = Ae2x + Be-5x + 11cos⁡(x) − 3sin(x) + 2e3x


Example 4: Solve d2ydx2 + 3dydx − 10y = −130cos(x) + 16e2x

This is exactly the same as Example 3 except for the final term, which has been replaced by 16e2x.

So Steps 1 and 2 are exactly the same. On to step 3:

3. Find the particular solution to d2ydx2 + 3dydx − 10y = 16e2x

Guess.

Try y = ce2x

dydx = 2ce2x

d2ydx2 = 4ce2x

Substitute these values into d2ydx2 + 3dydx − 10y = 16e2x

4ce2x + 6ce2x − 10ce2x = 16e2x

0 = 16e2x

Oh dear! Something seems to have gone wrong. How can 16e2x = 0?

Well, it can’t, and there is nothing wrong here except that there is no particular solution to the differential equation d2ydx2 + 3dydx − 10y = 16e2x

...Wait a minute!
The general solution to the hom*ogeneous equation d2ydx2 + 3dydx − 10y = 0, which is y = Ae2x + Be-5x, already has a term Ae2x, so our guess y = ce2x already satisfies the differential equation d2ydx2 + 3dydx − 10y = 0 (it was just a different constant.)

So we must guess y = cxe2x

Let's see what happens:

dydx = ce2x + 2cxe2x

d2ydx2 = 2ce2x + 4cxe2x + 2ce2x = 4ce2x + 4cxe2x

Substitute these values into d2ydx2 + 3dydx − 10y = 16e2x

4ce2x + 4cxe2x + 3ce2x + 6cxe2x − 10cxe2x = 16e2x

7ce2x = 16e2x

c = 167

So in the present case our particular solution is

y = 167xe2x

Thus, our final complete solution in this case is:

y = Ae2x + Be-5x + 11cos⁡(x) − 3sin(x) + 167xe2x


Example 5: Solve d2ydx2 − 6dydx + 9y = 5e-2x

1. Find the general solution to d2ydx2 − 6dydx + 9y = 0

The characteristic equation is: r2 − 6r + 9 = 0

(r − 3)2 = 0

r = 3, which is a repeated root.

Then the general solution of the differential equation is y = Ae3x + Bxe3x

2. Find the particular solution to d2ydx2 − 6dydx + 9y = 5e-2x

Guess.

Try y = ce-2x

dydx = −2ce-2x

d2ydx2 = 4ce-2x

Substitute these values into d2ydx2 − 6dydx + 9y = 5e-2x

4ce-2x + 12ce-2x + 9ce-2x = 5e-2x

25e-2x = 5e-2x

c = 15

So the particular solution is:

y= 15e-2x

Finally, we combine our two answers to get the complete solution:

y= Ae3x + Bxe3x + 15e-2x


Example 6: Solve d2ydx2 + 6dydx + 34y = 109cos(5x)

1. Find the general solution to d2ydx2 + 6dydx + 34y = 0

The characteristic equation is: r2 + 6r + 34 = 0

Use the quadratic equation formula

r = −b ± √(b2 − 4ac)2a

with a = 1, b = 6 and c = 34

So

r = −6 ± √[62 − 4(1)(34)]2(1)

r = −6 ± √(36−136)2

r = −6 ± √(−100)2

r = −3 ± 5i

And we get:

y =e-3x(Acos⁡(5x) + iBsin(5x))

2. Find the particular solution to d2ydx2 + 6dydx + 34y = 109sin(5x)

Since f(x) is a sine function, we assume that y is a linear combination of sine and cosine functions:

Guess.

Try y = acos⁡(5x) + bsin(5x)

Note: since we do not have sin(5x) or cos(5x) in the solution to the hom*ogeneous equation (we have e-3xcos(5x) and e-3xsin(5x), which are different functions), our guess should work.

Let’s continue and see what happens:

dydx = −5asin⁡(5x) + 5bcos(5x)

d2ydx2 = −25acos⁡(5x) − 25bsin(5x)

Substitute these values into d2ydx2 + 6dydx + 34y = 109sin(5x)

−25acos⁡(5x) − 25bsin(5x) + 6[−5asin⁡(5x) + 5bcos(5x)] + 34[acos⁡(5x) + bsin(5x)] = 109sin(5x)

cos(5x)[−25a + 30b + 34a] + sin(5x)[−25b − 30a + 34b] = 109sin(5x)

cos(5x)[9a + 30b] + sin(5x)[9b − 30a] = 109sin(5x)

Equate coefficients of cos(5x) and sin(5x):

Coefficients of cos(5x):9a + 30b = 0 ... (1)
Coefficients of sin(5x):9b − 30a = 109 ... (2)

From equation (1), b = −3a10

Substitute into equation (2)

9(−3a10) − 30a = 109

−27a − 300a = 1090

−327a = 1090

a = −103

b = 1

So the particular solution is:

y = −103cos⁡(5x) + sin(5x)

Finally, we combine our answers to get the complete solution:

y = e-3x(Acos⁡(5x) + iBsin(5x)) − 103cos⁡(5x) + sin(5x)

9509, 9510, 9511, 9512, 9513, 9514, 9515, 9516, 9517, 9518

hom*ogeneous Functions Differential Equation Differential Equations Solution Guide Calculus Index

Method of Undetermined Coefficients (2024)

FAQs

What are methods based on undetermined coefficients? ›

The central idea of the method of undetermined coefficients is this: Form the most general linear combination of the functions in the family of the nonhom*ogeneous term d( x), substitute this expression into the given nonhom*ogeneous differential equation, and solve for the coefficients of the linear combination.

When can the method of undetermined coefficients not be used? ›

Here we have a situation where the method of undetermined coefficients typically fails, when the forcing function (right hand side) is linearly dependent on the fundamental set of solutions to the hom*ogeneous equation.

What is the method of undetermined coefficients for exponentials? ›

The idea is simply that if y is an exponential, then so is y', and so if both y and g are exponentials, then all terms in the equation are exponentials and we can hope to obtain a solution by setting coefficients equal to each other. y'+2y=t2. y'+2y=2at2+(2a+2b)t+b+2c=t2.

When to use method of undetermined coefficients vs. variation of parameters? ›

There are two methods for finding a particular solution: The method of undetermined coefficients is straightforward but works only for a restricted class of func- tions . The method of variation of parameters works for every function but is usually more difficult to apply in practice.

What is the difference between annihilator method and undetermined coefficients? ›

1 Answer. Undetermined coefficients usually involves plugging in a generic form and then solving for constants, whereas the annihilator method relies on re-phrasing the question in terms of differential operators. They are fairly similar as this page shows: en.wikipedia.org/wiki/Annihilator_method.

When to use the annihilator method? ›

In mathematics, the annihilator method is a procedure used to find a particular solution to certain types of non-hom*ogeneous ordinary differential equations (ODE's).

What are the limitations of undetermined coefficients? ›

Pros and Cons of the Method of Undetermined Coefficients:The method is very easy to perform. However, the limitation of the method of undetermined coefficients is that the non-hom*ogeneous term can only contain simple functions such as , , , and so the trial function can be effectively guessed.

Can you use the method of undetermined coefficients with tan? ›

You can use UC for sinh and cosh, too, but these are combinations of ex. Functions like 1/x and tanx won't work for UC because each successive derivative introduces new terms.

What is the modification rule in method of undetermined coefficients? ›

(b) Modification Rule.

If a term in your choice for happens to be a solution of the hom*ogeneous ODE corresponding to (4), multiply this term by x (or by if this solution corresponds to a double root of the characteristic equation of the hom*ogeneous ODE).

What is the method of undetermined coefficients II? ›

Solutions by the method of Undetermined Coefficients sometimes called the Superposition Approach, is where we make a “guess” as to the appropriate form for our solution set, which is then tested by differentiating the resulting equation.

Can you use undetermined coefficients for Cauchy Euler? ›

We can also solve some nonhom*ogeneous Cauchy-Euler equations using the Method of Undetermined Coefficients or the Method of Variation of Parameters.

What is the rule for square root exponential? ›

1) If the expression consists of a variable raised to an even power, the square root of the expression equals the variable raised to one-half of that power. Examples: 2) If the variable contains an odd power, express it as the product of two factors, one having an exponent 1 and the other with an even exponent.

How do you know when to use the method of undetermined coefficients? ›

This method is only easy to apply if f(x) is one of the following:
  1. Either:f(x) is a polynomial function.
  2. Or:f(x) is a linear combination of sine and cosine functions.
  3. Or:f(x) is an exponential function.

Why do we use undetermined coefficients? ›

Because all of the guesses will be linear combinations of functions in which the coefficients are “constants to be determined”, this whole approach to finding particular solutions is formally called the method of undetermined coefficients. Less formally, it is also called the method of (educated) guess.

What is the method of undetermined coefficients for constants? ›

The method of undetermined coefficients can be applied when the right-hand side of the differential equation satisfies this form. It provides us with a particular solution to the equation. The exponent s is also a constant and takes on one of three possible values: 0, 1 or 2.

What is the method of undetermined coefficients recurrence? ›

In mathematics, the method of undetermined coefficients is an approach to finding a particular solution to certain nonhom*ogeneous ordinary differential equations and recurrence relations.

What method is used to obtain the coefficients? ›

To find the coefficient of X use the formula a = n(∑xy)−(∑x)(∑y)n(∑x2)−(∑x)2 n ( ∑ x y ) − ( ∑ x ) ( ∑ y ) n ( ∑ x 2 ) − ( ∑ x ) 2 . To find the constant term the formula is b = (∑y)(∑x2)−(∑x)(∑xy)n(∑x2)−(∑x)2 ( ∑ y ) ( ∑ x 2 ) − ( ∑ x ) ( ∑ x y ) n ( ∑ x 2 ) − ( ∑ x ) 2 .

Top Articles
Latest Posts
Article information

Author: Dean Jakubowski Ret

Last Updated:

Views: 6322

Rating: 5 / 5 (50 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Dean Jakubowski Ret

Birthday: 1996-05-10

Address: Apt. 425 4346 Santiago Islands, Shariside, AK 38830-1874

Phone: +96313309894162

Job: Legacy Sales Designer

Hobby: Baseball, Wood carving, Candle making, Jigsaw puzzles, Lacemaking, Parkour, Drawing

Introduction: My name is Dean Jakubowski Ret, I am a enthusiastic, friendly, homely, handsome, zealous, brainy, elegant person who loves writing and wants to share my knowledge and understanding with you.