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.

Given the ODE P(D)y = f(x), find another differential operator A(D) such that A(D)f(x) = 0. This operator is called the annihilator, and thus the method of undetermined coefficients is also known as the annihilator method. Applying A(D) to both sides of the ODE gives a homogeneous ODE \big(A(D)P(D)\big)y = 0 for which we find a solution basis \{y_1,\ldots,y_n\} as before. Then the original nonhomogeneous ODE is used to construct a system of equations restricting the coefficients of the linear combinations to satisfy the ODE.

Undetermined coefficients is not as general as variation of parameters in the sense that an annihilator does not always exist.

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 easy-to-find 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_1 (t) e^{\alpha t} \cos{\beta t} + G_1 (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) (t) \sin{t}] \!
      = (A_0 t^2 + A_1 t) \cos{t} + (B_0 t^2 + B_1 t) (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) (t) \sin{t}]'' \!
                       + [(A_0 t^2 + A_1 t) \cos{t} + (B_0 t^2 + B_1 t) (t) \sin{t}] \!

             = [2A_0 \cos{t} + 2(A_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 + B_1)] \cos{t} + [-2A_0 t + (-2A_1 + 2B_0)] \sin{t} \!

Comparing both sides, we have

                                 4B_0  \!               = 1 \!
    2A_0\!                             +\!2B_1 = 0 \!
-2A_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 inhomogeneous 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

[edit] (3)

Given y'' − 4y' + 5y = sin(kx), P(D) = D2 − 4D + 5. The simplest annihilator of sin(kx) is A(D) = D2 + k2. The zeros of A(z)P(z) are {2 + i,2 − i,ik, − ik}, so the solution basis of A(D)P(D) is {y1,y2,y3,y4} = {e(2 + i)x,e(2 − i)x,eikx,e ikx}.

Setting y = c1y1 + c2y2 + c3y3 + c4y4 we find

sin(kx) = P(D)y
= P(D)(c1y1 + c2y + c3y3 + c4y4)
= c1P(D)y1 + c2P(D)y2 + c3P(D)y3 + c4P(D)y4
= 0 + 0 + c3( − k2 − 4ik + 5)y3 + c4( − k2 + 4ik + 5)y4
= c3( − k2 − 4ik + 5)(cos(kx) + isin(kx)) + c4( − k2 + 4ik + 5)(cos(kx) − isin(kx))

giving the system

i = (k2 + 4ik − 5)c3 + ( − k2 + 4ik + 5)c4
0 = (k2 + 4ik − 5)c3 + (k2 − 4ik − 5)c4

which has solutions

c_3=\frac i{2(k^2+4ik-5)}, c_4=\frac i{2(-k^2+4ik+5)}

giving the solution set

y\, =c_1y_1+c_2y_2+\frac i{2(k^2+4ik-5)}y_3+\frac i{2(-k^2+4ik+5)}y_4
=c_1y_1+c_2y_2+\frac{4k\cos(kx)-(k^2-5)\sin(kx)} {(k^2+4ik-5)(k^2-4ik-5)}
=c_1y_1+c_2y_2 +\frac{4k\cos(kx)+(5-k^2)\sin(kx)}{k^4+6k^2+25}.
In other languages