# Method of undetermined coefficients.

I know how to apply this method but I want to why it works.

We have 4 primary UC functions, $x^n, e^{ax}, \sin(ax + b), \cos(ax + b)$ and we can apply this method if inhomogeneous term is some product of these four. I want to know why only these four ? Some derivative of others except $x^n$ give that function back, so I feel it might have to do something with this cyclic property.

Next we make a list of all the linearly independent functions involved in all the derivatives of the inhomogeneous term.

For eg, say $f(x) = x^2e^x$ so our set would be $\{x^2 e^x, xe^x, e^x\}$ (sorry I have no idea why the set brackets does not appear in the preview.).

If the set does have a solution to homogeneous ODE then we multiply by $x$. Why $x$, why not $\tan x$ ?

If it is not a solution to ODE then we form a linear combination of the elements of our set. Again, I shamelessly ask why we do this ?

Lastly I want to know who came up with this ingenious method ?

• To get brackets you need to add backslash ... \{ and \} in TeX give you $\{$ and $\}$. Jun 24 '17 at 13:11

Why only these four? When you write down your form for the particular solution, it's a liner combination of terms that appear in all derivatives of $f(x)$. If $f(x)$ has infinitely many different terms amongst its derivatives, then you can't write them all down. So necessarily $f(x)$ has to have the property that there are only finitely many terms (up to multiplied constant) amongst all its derivatives. Sums and products of the these four functions cover the gamut of such functions. You can use UC for $\sinh$ and $\cosh$, too, but these are combinations of $e^x$. Functions like $1/x$ and $\tan x$ won't work for UC because each successive derivative introduces new terms.

Why do we multiply by $x$? The functions mentioned above have "annihilators", which are differential operators that wipe them out. For instance, the annihilator for $e^{3x}$ is $D-3I$, where $D$ is the derivative operator and $I$ is the identity operator. Then $(D-3I)(e^{3x}) = 3e^{3x}-3(e^{3x}) = 0.$ Similarly, $D^2+I$ is the annihilator for $\sin x$, (because $D^2$ means take the 2nd derivative.)

So if you have the DE $y''-3y'+2y = e^x$, we can write is as

$$(D^2-3D+2I)(y) = e^x.$$

Now hit both sides with the annihilator for $e^x$:

$$(D-I)(D^2-3D+2I)(y) = (D-I)(e^x) = 0.$$

These linear operators act like polynomials, so

$$(D^3-4D^2+5D-2I)(y)=0$$

which is equivalent to

$$y'''-4y''+5y'-2y =0$$.

We've transformed the non-homogeneous equation into a homogeneous one. Attack it in the usual way and the characteristic equation is:

$$r^3-4r^2+5r-2 =0$$

or

$$(r-1)^2(r-2) = 0$$ with roots

$$r=1, 1, 2.$$

This gives us the solutions $e^x$ and $e^{2x}$, but this is a 3rd-order equation and we need a 3rd, linearly independent solution. To get this, we use the method of reduction of order. Assume $y_3 = v(x)e^x$ and it turns out that $v(x) = x.$

And that's the story of where the $x$ comes from.

Who thought of this? I dunno. I usually blame Euler for such things.

• One should emphasize that the annihilators are linear with constant coefficients, reflecting that the whole method only works for linear ODE with constant coefficients. Jun 24 '17 at 12:27
• Oh that annihilator thing is amazing. Are $D$ and $I$ matrices ? Jun 24 '17 at 18:34
• $D$ is exactly the same as $d/dx$, And $I$ just means "don't take the derivative, leave the function alone." Jun 24 '17 at 18:36
• @B.Goddard Thanks for the answer. Jun 24 '17 at 18:42