User:Jim.belk/Draft: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. In the method, a "guess" is made as to the appropriate form of the solution, and then the values of the coefficients of determined by solving a system of linear equations. The method of undetermined coefficients is closely related to the annihilator method, and can be viewed as a simple case of the method of variation of parameters. A similar method is sometimes used to find solutions to recurrence relations.

Contents

[edit] Examples

[edit] Example with one coefficient

Suppose we wish to find a solution to the following linear inhomogeneous differential equation:

y' - y = e^{3x}\text{.}\,\!

Because the inhomogeneous part is e3x, we guess (correctly) that the equation has a solution of the form

y = A e^{3x}\,\!

for some constant A. Substituting this guess into the original equation yields:

\begin{alignat}{2}
3A e^{3x} - Ae^{3x} &&&= e^{3x} \\
          2A e^{3x} &&&= e^{3x} \\
                 2A &&&= 1      \\
                  A &&&= \frac{1}{2}\text{.}
\end{alignat}\,\!

Therefore, one solution to the differential equation above is given by

y = \frac{1}{2} e^{3x}\text{.}\,\!

The general solution is a sum of this particular solution with a general solution to the associated homogeneous equation (see the article on linear differential equations).

[edit] Example with three coefficients

Suppose we wish to find a solution to the equation

y'' + 3y' + 2y = 2x^2 + 3x\text{.}\,\!

Because the inhomogeneous part is a quadratic polynomial, we guess (correctly) that the equation has a solution of the form

y = Ax^2 + Bx + C\,\!

for some constants A, B, and C. Substituting this guess into the original equation yields

(2A) + 3(2Ax + B) + 2(Ax^2 + Bx + C) = 2x^2 + 3x\,\!

or

(2A)x^2 + (6A + 2B)x + (2A + 3B + 2C) = 2x^2 + 3x\text{.}\,\!

Setting the coefficients of x2, the coefficients of x, and the constant terms equal gives the following system of linear equations:

\begin{alignat}{7}
2A &&       &&    &&       &&    &&\; = \;&& 2  & \\
6A &&\; + \;&& 2B &&       &&    &&\; = \;&& 3 & \\
2A &&\; + \;&& 3B &&\; + \;&& 2C &&\; = \;&& 0  &\text{.} \\
\end{alignat}

Solving yields A = 1, B = –3/2, and C = 5/4. Therefore, one solution to the differential equation above is given by

y = x^2 - \frac{3}{2}x + \frac{5}{4}\text{.}\,\!

[edit] Guessing the form

The first step in the method of undetermined coefficients is to guess the form of the particular solution. This guess is usually based on the inhomogeneous part of the equation:

\begin{array}{cc}
\text{Inhomogeneous part} & \text{Guess} \\[6pt]
e^{rx}  &  Ae^{rx} \\
\cos kx\text{ or }\sin kx  &  A\cos kx + B\sin kx \\[3pt]
e^{rx} \cos kx\text{ or }e^{rx} \sin kx  &  Ae^{rx} \cos kx + B e^{rx} \sin kx \\[3pt]
x^n  &  A_n x^n + A_{n-1} x^{n-1} + \cdots + A_1 x + A_0 \\[3pt]
x^n e^{rx}  &  A_n x^n e^{rx} + A_{n-1} x^{n-1} e^{rx} + \cdots + A_0 e^{rx} \\[3pt]
x^n \cos kx   &   A_n x^n \cos kx + \cdots + A_0 \cos kx + B_n x^n \sin kx + \cdots + B_0 \sin kx
\end{array}

Sometimes the guess listed above does not work, in which case it is necessary to multiply by a power of x. For example, one might guess that the equation

y'' - 4y = e^{2x}\,\!

has a solution of the form

y = A e^{2x}\text{.}\,\!

However, this is not correct, as can be seen by substituting this guess into the equation:

4Ae^{2x} - 4Ae^{2x} = e^{2x}\text{.}\,\!

The correct guess is

y = A x e^{2x}\text{,}\,\!

which yields the solution

y = \frac{1}{4} x e^{2x}\text{.}\,\!

The annihilator method explains this phenomenon, and can be used to determine the correct guess in a wide variety of situations.

[edit] Relation to vector spaces

In linear algebra, the method of undetermined coefficients can be viewed as a simple application of function spaces and differential operators. Given an equation such as

y'' + 3y' - 5y = x^3 e^x + 2xe^x \text{,}\,\!

let V be a vector space that contains the inhomogeneous part and which is closed under differentiation:

V = \text{Span}\left\{ x^3e^x, x^2e^x, xe^x, e^x \right\}\text{.}\,\!

This allows us to write a matrix for the differentiation operator:

\begin{alignat}{2}
\frac{d}{dx} \left[ x^3e^x \right] &&&= x^3 e^x + 3x^2 e^x \\
\frac{d}{dx} \left[ x^2e^x \right] &&&= x^2 e^x + 2x e^x \\
\frac{d}{dx} \left[ x e^x \right] &&&= x e^x + e^x \\
\frac{d}{dx} \left[ e^x \right] &&&= e^x
\end{alignat}\;\;\;\;\text{so}\;\;\;\;D = \begin{bmatrix}
1 & 3 & 0 & 0 \\
0 & 1 & 2 & 0 \\
0 & 0 & 1 & 1 \\
0 & 0 & 0 & 1
\end{bmatrix}

We can now rewrite the differential equation as a matrix equation:

\left(D^2 + 3D - 5\right)\textbf{y} = \begin{bmatrix} 1 \\ 0 \\ 2 \\ 0 \end{bmatrix}
spanned by the functions x3ex, x2ex, xex, and ex.

[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) \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 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