Method of undetermined coefficients

From Wikipedia, the free encyclopedia

In mathematics, the method of undetermined coefficients is an approach to finding a particular solution to certain inhomogeneous ordinary differential equations and recurrence relations. It is closely related to the annihilator method, but instead of using a particular kind of differential operator (the annihilator) in order to find the best possible form of the particular solution, a "guess" is made as to the appropriate form, which is then tested by differentiating the resulting equation. In this sense, the method of undetermined coefficients is less formal but more intuitive than the annihilator method.

Undetermined coefficients is not as general as variation of parameters, since it only works for differential equations that follow certain forms.

Contents

[edit] Example

Consider the following linear inhomogeneous differential equation:

\frac {dy} {dx} = y + e^{2x} \!

The analogous homogeneous problem is

\frac {dy} {dx} = y

which has the following general solution:

y = c_1 e^x \!

If we can find a particular solution to our original problem, we can add it to the above, and have the general solution to our original problem.

Based on the inhomogeneous part (e2x), we guess (correctly) that a particular solution is:

y_p = A e^{2x}\!

By substituting this function and its derivative into the differential equation, one can solve for A:

\frac{d}{dx} \left( Ae^{2x} \right) = A e^{2x} + e^{2x} \!
2 A e^{2x} = A e^{2x} + e^{2x} \!
2 A = A + 1\,\!
A = 1\,\!

(If our guess above were not of the correct form, we would not have been able to solve for A.)

So, the general solution to this differential equation is thus:

y = c_1 e^x + 1e^{2 x} \!

[edit] Typical forms of the particular solution

After solving the homogeneous case for the complementary function, a particular solution based on the right hand side of the equation needs to be found. The sum of the complementary function and the particular solution then gives the general solution for y.

In order to find the particular solution, we need to 'guess' its form, with some coefficients left as variables to be solved for. Below is a table of some typical functions and the solution to guess for them.

Function of x Form for y
keax Ceax
kxn, n = 0,1,2,... Knxn + Kn − 1xn − 1 + ... + K1x + K0
kcos(ax) or ksin(ax) Kcos(ax) + Msin(ax)
keaxcos(bx) or keaxsin(bx) eax(Kcos(bx) + Msin(bx))
(\sum_{i=1}^n k_i x^i) e^{a x} \cos(b x) or (\sum_{i=1}^n k_i x^i) e^{a x} \sin(b x) e^{a x} ((\sum_{i=1}^n Q_i x^i) \cos(b x) + (\sum_{i=1}^n R_i x^i) \sin(b x))

If a term in the above particular solution for y appears in the homogeneous solution, it is necessary to multiply by a sufficiently large power of x in order to make the two solutions linearly independent. If the function of x is a sum of terms in the above table, the particular solution can be guessed using a sum of the corresponding terms for y.

[edit] Examples

[edit] (1)

Find a particular solution of the equation

y'' + y = t \cos {t} \!

The right side t cos t has the form

 P_n e^{\alpha t} \cos{\beta t} \!

with n=1, α=0, and β=1.

Since α + iβ = i is a simple root of the characteristic equation

\lambda^2 + 1 = 0 \!

we should try a particular solution of the form

y_p = t [F_n (t) e^{\alpha t} \cos{\beta t} + G_n (t) e^{\alpha t} \sin{\beta t}] \!
      = t [F_1 (t) \cos{t} + G_1 (t) \sin{t}] \!
      = t [(A_0 t + A_1) \cos{t} + (B_0 t + B_1) \sin{t}] \!
      = (A_0 t^2 + A_1 t) \cos{t} + (B_0 t^2 + B_1 t) \sin{t} \!

Substituting yp into the differential equation, we have the identity

t \cos{t} = y_p'' + y_p \!

             = [(A_0 t^2 + A_1 t) \cos{t} + (B_0 t^2 + B_1 t) \sin{t}]'' \!
                       + [(A_0 t^2 + A_1 t) \cos{t} + (B_0 t^2 + B_1 t) \sin{t}] \!

             = [2A_0 \cos{t} + 2(2A_0 t + A_1)(- \sin{t}) + (A_0 t^2 + A_1 t)(- \cos{t})] \!
                       +[2B_0 \sin{t} + 2(2B_0 t + B_1) \cos{t} + (B_0 t^2 + B_1 t)(- \sin{t})] \!
                       +[(A_0 t^2 + A_1 t) \cos{t} + (B_0 t^2 + B_1 t) \sin{t}] \!

             = [4B_0 t + (2A_0 + 2B_1)] \cos{t} + [-4A_0 t + (-2A_1 + 2B_0)] \sin{t} \!

Comparing both sides, we have

                                 4B_0  \!               = 1 \!
    2A_0\!                             +\! 2B_1 = 0 \!
-4A_0 \!                                            = 0 \!
             -\!2A_1 + 2B_0 \!              = 0 \!

which has the solution A0 = 0, A1 = 1/4, B0 = 1/4, B1 = 0. We then have a particular solution

y_p = \frac {1} {4} t \cos{t} + \frac {1} {4} t^2 \sin{t}

[edit] (2)

Consider the following linear nonhomogeneous differential equation:

\frac{dy}{dx} = y + e^x

This is like the first example above, except that the inhomogeneous part (ex) is not linearly independent to the general solution of the homogeneous part (c1ex); as a result, we have to multiply our guess by a sufficiently large power of x to make it linearly independent.

Here our guess becomes:

yp = Axex

By substituting this function and its derivative into the differential equation, one can solve for A:

\frac{d}{dx} \left( A x e^x \right) = A x e^x + e^x
Axex + Aex = Axex + ex
A = 1

So, the general solution to this differential equation is thus:

y = c1ex + xex