# Method of undetermined coefficients

## Main Question or Discussion Point

Hi all,

I have a quick question. I was taught this, but wasn't explained to at all why it is the case.

So let's say I have a differential equation with constant coefficients

i.e. y'' - 4y' + 4y = e^2x

And the general solution to its associated homogeneous equation is

Ae^2x + Bxe^2x [A & B are constants]

I was told that when deciding on the particular solution to solve for the general solution of the D.E.,

I should multiply it by 'x' twice, i.e. instead of choosing Ce^2x , I should choose C (x^2) (e^2x)

Now, I have tried solving the D.E. with either particular solution, and found out that what I was told is correct, but I have no idea why I should be doing it.

Is there a reason for doing it (raising the solution by x^2) or is it just something that is tested and proven and I should just remember it like any other facts?

DEvens
Gold Member
Have you studied Laplace transforms yet?

SteamKing
Staff Emeritus
Homework Helper
Hi all,

I have a quick question. I was taught this, but wasn't explained to at all why it is the case.

So let's say I have a differential equation with constant coefficients

i.e. y'' - 4y' + 4y = e^2x

And the general solution to its associated homogeneous equation is

Ae^2x + Bxe^2x [A & B are constants]

I was told that when deciding on the particular solution to solve for the general solution of the D.E.,
For linear ODEs with constant coefficients, like you have, the general solution is the sum of the homogeneous solution and the particular solution.

The homogeneous solution is of course, the solution to y" - 4y' + 4y = 0, and is called yh

The particular solution is the solution when the RHS of the equation = e2x in this case, and this solution is called yp

The general solution to the ODE is then y = yh + yp

For linear ODEs with constant coefficients, the homogenous solution is assumed to be yh = erx

After substituting yh = erx into the ODE and dividing out ex, we are left with a polynomial in r which is called the characteristic equation, in this case:
r2 - 4r + 4 = 0

The correct solution for the homogeneous ODE is obtained by solving the characteristic equation for r.

In this case, factoring gives us r2 - 4r + 4 = (r - 2)(r - 2); thus r = 2 and 2, so both roots are real and identical.

I should multiply it by 'x' twice, i.e. instead of choosing Ce^2x , I should choose C (x^2) (e^2x)

Now, I have tried solving the D.E. with either particular solution, and found out that what I was told is correct, but I have no idea why I should be doing it.

Is there a reason for doing it (raising the solution by x^2) or is it just something that is tested and proven and I should just remember it like any other facts?
Since the roots of the characteristic equation are real and identical, then yh = C1 * er x + C2 * x * er x

If the solutions were real and distinct, say r1 and r2, then yh = C1 * er1x + C2 * er2x

The choice of the particular solution yp depends on the RHS of the ODE.

For more details about these solutions, look at:

http://tutorial.math.lamar.edu/Classes/DE/IntroSecondOrder.aspx

There is a more complete discussion along with worked examples.

LCKurtz
Homework Helper
Gold Member
Hi all,

I have a quick question. I was taught this, but wasn't explained to at all why it is the case.

So let's say I have a differential equation with constant coefficients

i.e. y'' - 4y' + 4y = e^2x

And the general solution to its associated homogeneous equation is

Ae^2x + Bxe^2x [A & B are constants]

I was told that when deciding on the particular solution to solve for the general solution of the D.E.,

I should multiply it by 'x' twice, i.e. instead of choosing Ce^2x , I should choose C (x^2) (e^2x)

Now, I have tried solving the D.E. with either particular solution, and found out that what I was told is correct, but I have no idea why I should be doing it.

Is there a reason for doing it (raising the solution by x^2) or is it just something that is tested and proven and I should just remember it like any other facts?
Yes, there is a reason. It comes from the method of annihilators:
http://www.math.uiuc.edu/~laugesen/286/annihilators.pdf

Have you studied Laplace transforms yet?
Hi. Thanks for replying. I don't think I have.

For linear ODEs with constant coefficients, like you have, the general solution is the sum of the homogeneous solution and the particular solution.

The homogeneous solution is of course, the solution to y" - 4y' + 4y = 0, and is called yh

The particular solution is the solution when the RHS of the equation = e2x in this case, and this solution is called yp

The general solution to the ODE is then y = yh + yp

For linear ODEs with constant coefficients, the homogenous solution is assumed to be yh = erx

After substituting yh = erx into the ODE and dividing out ex, we are left with a polynomial in r which is called the characteristic equation, in this case:
r2 - 4r + 4 = 0

The correct solution for the homogeneous ODE is obtained by solving the characteristic equation for r.

In this case, factoring gives us r2 - 4r + 4 = (r - 2)(r - 2); thus r = 2 and 2, so both roots are real and identical.

Since the roots of the characteristic equation are real and identical, then yh = C1 * er x + C2 * x * er x

If the solutions were real and distinct, say r1 and r2, then yh = C1 * er1x + C2 * er2x

The choice of the particular solution yp depends on the RHS of the ODE.

For more details about these solutions, look at:

http://tutorial.math.lamar.edu/Classes/DE/IntroSecondOrder.aspx

There is a more complete discussion along with worked examples.
Hi. Thanks for replying. I understand the derivation of homogeneous equations, and how I should choose particular solutions when trying to solve, but I don't understand the rationale behind the need to adding the extra 'x' term when the term appears in the homogeneous solution, though I did try both ways and find out that I do need it.

Yes, there is a reason. It comes from the method of annihilators:
http://www.math.uiuc.edu/~laugesen/286/annihilators.pdf
Hi. Thanks for replying. I don't think I've come across this yet... And I'm not a mathematically- (or academically-) inclined kind of guy so I don't exactly understand what's going on in there. I probably would learn this some day I hope. Thank you anyway.

------------------------------

I have another question that I would like to clarify too, if you guys have time for that.

I came across the equation where the 'y' is missing. e.g. y'' + 2y' = x^2 + 3

Something like that, can't remember the exact numbers.

In this case my particular solution choice (a polynomial) has to be raised by 'x' for every term i.e. Ax + Bx^2 + Cx^3 instead of A + Bx + Cx^2.

Does doing this have the same reason as that in my original question? (i.e. Yp = A(x^2)(e^2x) when e^2x appeared twice in Yh)

Or is the reason something completely different?

[Sorry if this could be answered if I could have understood Kurtz's post]

SteamKing
Staff Emeritus
Homework Helper
I have another question that I would like to clarify too, if you guys have time for that.

I came across the equation where the 'y' is missing. e.g. y'' + 2y' = x^2 + 3

Something like that, can't remember the exact numbers.

In this case my particular solution choice (a polynomial) has to be raised by 'x' for every term i.e. Ax + Bx^2 + Cx^3 instead of A + Bx + Cx^2.

Does doing this have the same reason as that in my original question? (i.e. Yp = A(x^2)(e^2x) when e^2x appeared twice in Yh)

Or is the reason something completely different?

[Sorry if this could be answered if I could have understood Kurtz's post]
As discussed before briefly, the type of particular solution for the non-homogeneous equation depends on the RHS of the equation.

This article discusses several different types of RHS and how to derive the particular solution for each, using the method of undetermined coefficients:

http://tutorial.math.lamar.edu/Classes/DE/NonhomogeneousDE.aspx

LCKurtz