Method of Undetermined Coefficients

Exercise 2.4
1. Solve the following differential equations using the method of undermined coefficient.

(a) $\ y^{\prime\prime} - 4y^{\prime} + 4y = e^{x}$
(b) $\ y^{\prime\prime} - 4y^{\prime} + 4y = e^{2x}$
(c) $\ y^{\prime\prime} + 4y = \sin{2x}$
(d) $\ y^{\prime\prime} - 3y^{\prime} + 2y = e^{x} + e^{2x} +e^{-x}$
(e) $\ y^{\prime\prime\prime} - 3y^{\prime} - 2y = e^{2x}\sin{2x}$
(f) $\ y^{(4)} + 2y^{\prime\prime} + y = x^{2}e^{x}$

Answer
1. (a) Given auxiliary equation $L(y) = y^{\prime\prime} - 4y^{\prime} + 4y = 0$, we have the characterisitc equation $m^2 - 4m + 4 = 0$. Then characteristic roots are $m = 2$ double roots. Then the complementary solution $y_{c}$ is

$\displaystyle y_{c} = c_{1}e^{2x} + c_{2}xe^{2x} $

Then we find the particular solution $y_{p}$ using the method of undetermined coefficients. Let $D = d/dx, H(D) = D - 1$. Then

$\displaystyle H(D)e^{x} = (D - 1)e^{x} = De^{x} - e^{x} = e^{x} - e^{x} = 0 $

Thus, $y_{p}$ is a solution of

$\displaystyle (H(D)L(D))y = (D - 1)(D^2 - 4D + 4)y = ((D - 1)(D - 2)^2 )y = 0 $

The characteristic equation is $(m -1)(m - 2)^2 = 0$. Then the characteristic roots are $e^{x}, \ e^{2x}, \ xe^{2x}$. But $e^{2x}, xe^{2x}$ are solutions of the complementary function. So, we can not use them. So, we write

$\displaystyle y_{p} = Ae^{x} $

Substitute this into $L(D)y = e^{x}$. Then

$\displaystyle L(D)Ae^{x} = Ae^{x} - 4Ae^{x} + 4Ae^{x} = e^{x} $

From this, we have $A = 1$. Thus, the particular solution is

$\displaystyle y_{p} = e^{x} $

Thus, the general solutoin is

$\displaystyle y = y_{c} + y_{p} = c_{1}e^{2x} + c_{2}xe^{2x} + e^{x} \ \ $

(b) Given the auxiliary equation $L(y) = y^{\prime\prime} - 4y^{\prime} + 4y = 0$, we have the characteristic equation $m^2 - 4m + 4 = 0$. Then the characteristic roots are $m = 2$   double roots. Thus the complementary function $y_{c}$ is

$\displaystyle y_{c} = c_{1}e^{2x} + c_{2}xe^{2x} $

Next we find the particular solution $y_{p}$ using the method of undetermined coefficients. Let $D = d/dx, H(D) = D - 2$. Then

$\displaystyle H(D)e^{x} = (D - 2)e^{2x} = De^{2x} - 2e^{2x} = 2e^{2x} - 2e^{2x} = 0 $

Thus the particular solution $y_{p}$ is a solution of the following

$\displaystyle (H(D)L(D))y = (D - 2)(D^2 - 4D + 4)y = ((D - 2)^3 )y = 0 $

The characteristic equation of this equation is $(m - 2)^3 = 0$. Then the fundamental solutions are $e^{2x}, \ xe^{2x}, \ x^2 e^{2x}$. But $e^{2x}, xe^{2x}$ are the solutions of the complementary function. Thus we omit those solutions. Then we have

$\displaystyle y_{p} = Ax^{2}e^{x} $

Now substitute $y_p$ to the equation $L(D)y = e^{2x}$. Then

\begin{displaymath}\begin{array}{ll}
4(y_{p} &= Ax^2 e^{2x}) \\
-4(Dy_{p} &= 2A...
...x} + 8Ax e^{2x} + 2Ae^{2x}} \\
e^{2x} & = 2Ae^{2x}
\end{array}\end{displaymath}

Thus, $A = 1/2$. Therefore the particular solution is

$\displaystyle y_{p} = \frac{1}{2}x^2 e^{2x} $

Then the general solution is

$\displaystyle y = y_{c} + y_{p} = c_{1}e^{2x} + c_{2}xe^{2x} + \frac{1}{2}x^2 e^{2x} \ \ $

(c) Given the auxiliary equation $L(y) = y^{\prime\prime} + 4y = 0$. We have the characteristic equation $m^2 + 4 = 0$. Then the characteristic roots are $m = \pm 2i $. Thus the complementary function $y_{c}$ is

$\displaystyle y_{c} = c_{1}\cos{2x} + c_{2}\sin{2x} $

Next we find the particular solution $y_{p}$ using the method of undetermined coefficients. Let $D = d/dx, H(D) = D^2 + 4$. Then

$\displaystyle H(D)\sin{2x} = (D^2 + 4)\sin{2x} = D^2 \sin{2x} + 4 \sin{2x} = -4 \sin{2x} + 4\sin{2x} = 0 $

Thus the particular solution $y_{p}$ is a solution of the following

$\displaystyle (H(D)L(D))y = ( (D^2 + 4)^2 )y = 0 $

The characteristic equation of this equation is $(m^2 + 4)^2 = 0$. Then the fundamental solutions are

$\displaystyle \{ \cos{2x}, \sin{2x}, x\cos{2x}, x\sin{2x}\} $

But $\cos{2x}, \sin{2x}$ are solutions of the complementary function. Thus we omit those solutions. Then we have

$\displaystyle y_{p} = Ax \cos{2x} + Bx\sin{2x} $

Now substitute $y_p$ to $L(D)y = \sin{2x}$. Then

\begin{displaymath}\begin{array}{ll}
4(y_{p} &= Ax \cos{2x} + Bx\sin{2x}) \\
D...
...\sin{2x}} \\
\sin{2x} & = -4A\sin{2x} + 4B\cos{2x}
\end{array}\end{displaymath}

Thus $A = -1/4, \ B = 0$. Then

$\displaystyle y_{p} = -\frac{1}{4}x\cos{2x} $

Therefore, the general solution is

$\displaystyle y = y_{c} + y_{p} = c_{1}\cos{2x} + c_{2}\sin{2x} - \frac{1}{4}x\cos{2x} \ \ $

(d) Given the auxiliary equation $L(y) = y^{\prime\prime} - 3y^{\prime} + 2y = 0$. We have the characteristic equation $m^2 - 3m + 2 = (m -1)(m-2) = 0$. Then the characteristic roots are $m = 1, \ 2 $. Thus the complementary function $y_{c}$ is

$\displaystyle y_{c} = c_{1}e^{x} + c_{2}e^{2x} $

Next we find the particular solution $y_{p}$ using the method of undetermined coefficients. By superposition principal, if we find the particular solution $y_{p_{1}}$ of $L(D)y = e^{x}$$y_{p_{2}}$ of $L(D)y = e^{2x}$, $y_{p_{3}}$ of $L(D)y = e^{-x}$, then $y_{p} = y_{p_{1}} + y_{p_{2}} + y_{p_{3}}$.

$\displaystyle H(D)e^{x} = (D- 1)e^{x} = e^{x} - e^{x} = 0 $

implies that $y_{p_{1}}$ is a solution of the following

$\displaystyle (H(D)L(D))y = (D-1)^{2}(D-2)y = 0 $

The characteristic equation of this equation is $(m-1)^{2} (m-2)= 0$. Then the fundamental solutions are $e^{x}, xe^{x}, e^{2x}$. But $e^{x}, e^{2x}$ are solutions of the complementary function. So we omit those solutions. Then

$\displaystyle y_{p_{1}} = Ax e^{x} $

Next

$\displaystyle H(D)e^{2x} = (D- 2)e^{2x} = 2e^{2x} - 2e^{2x} = 0 $

implies that $y_{p_{2}}$ is a solution of the following

$\displaystyle (H(D)L(D))y = ((D-1)(D-2)^2)y = 0 $

The characteristic equation of this equation is $(m-1) (m-2)^{2}= 0$. Then the fundamental solutions are $e^{x}, \ e^{2x}, \ xe^{2x}$. but $e^{x}, e^{2x}$ are solutions of the complementary function. So we omit those solutions. Then

$\displaystyle y_{p_{2}} = Bx e^{2x} $

Lastly,

$\displaystyle H(D)e^{-x} = (D+ 1)e^{-x} = -e^{-x} + e^{-x} = 0 $

implies that $y_{p}$ is a solution of the following

$\displaystyle (H(D)L(D))y = ((D+1)(D-1)(D-2))y = 0 $

The characteristic equation of this equation is $(m+1)(m-1)(m-2)= 0$. Then the fundamental solutions are $e^{-x}, e^{x}, e^{2x}$. But $e^{x}, e^{2x}$are solutions of the complementary function. So we omit those solutions. Then

$\displaystyle y_{p_{1}} = C e^{-x} $

Now substitute $y_{p} = y_{p_{1}} + y_{p_{2}} + y_{p_{3}}$ to $L(D)y = e^{x} + e^{2x} + e^{-x}$. Then

\begin{displaymath}\begin{array}{ll}
2(y_{p} &= Ax e^{x} + Bxe^{2x} + Ce^{-x}) ...
... + e^{2x} + e^{-x} & = -Ae^{x} + Be^{2x} + 6Ce^{-x}
\end{array}\end{displaymath}

Thus, $A = -1, \ B =1, \ C = 1/6$. Thus, the particular solution is

$\displaystyle y_{p} = - xe^{x} + xe^{2x} + \frac{1}{6}e^{-x} $

Therefore,

$\displaystyle y = y_{c} + y_{p} = c_{1}e^{x} + c_{2}e^{2x} - xe^{x} + xe^{2x} + \frac{1}{6}e^{-x} \ \ $

(e) Given the auxiliary equation $L(y) = y^{\prime\prime\prime} - 3y^{\prime} - 2y = 0$. We have the characteristic equation $m^3 - 3m - 2 = (m+1)(m^2 - m - 2) = ( m+1)(m+1)(m-2)= 0$. Then the characteristic roots are $m = -1, -1, 2$. Thus the complementary function $y_{c}$ is

$\displaystyle y_{c} = c_{1}e^{-x} + c_{2}xe^{-x} + c_{3}e^{2x} $

Now we find the particular solution $y_{p}$ using the method of undermined coefficient. Let $D = d/dx, H(D) = D^2 - 4D + 8 $. Then

$\displaystyle H(D)e^{2x}\sin{2x} = (D^2 - 4D + 8 )e^{2x}\sin{2x} = 0 $

implies that $y_{p}$ is a soluton of the following equation.

$\displaystyle (H(D)L(D))y = (D^3 - 3D - 2)(D^2 - 4D + 8 )y = 0 $

The characteristic equation is $(m+1)^{2}(m - 2)(m^2 - 4m + 8) = 0$. Then the fundamental solutions are $e^{-x}, xe^{-x}, e^{2x}, e^{2x}\cos{2x}, e^{2x}\sin{2x}$. But $e^{-x}, xe^{-x}, e^{2x}$ are solutions of the complementary function. Thus we omit those solutions. Then

$\displaystyle y_{p} = Ae^{2x}\cos{2x} + Be^{2x}\sin{2x} $

Substitute $y_p$ into $L(D)y = e^{2x}\sin{2x}$. Then

\begin{displaymath}\begin{array}{ll}
-2(y_{p} &= Ae^{2x}\cos{2x} + Be^{2x}\sin{...
...2x}\cos{2x} + 10Be^{2x}\cos{2x} - 24Be^{2x}\sin{2x}
\end{array}\end{displaymath}

Thus the system of linear equations is

$\displaystyle \left\{\begin{array}{ll}
-10A - 24B &= 1\\
-24A + 10B &= 0
\end{array}\right. $

Solve this system, we have $A = 5/338, \ B = -12/338$. Thus, the particular solution is

$\displaystyle y_{p} = \frac{5}{338}e^{2x}\sin{2x} - \frac{12}{338}e^{2x}\cos{2x} $

Therefore, the general solution is
$\displaystyle y = y_{c} + y_{p}$ $\displaystyle =$ $\displaystyle (c_{1} + c_{2}x)e^{-x} + c_{3}e^{2x}$  
  $\displaystyle +$ $\displaystyle \frac{1}{338}(5e^{2x}\sin{2x} - 12e^{2x}\cos{2x}) \ \ $  

(f) Given auxiliary equation $L(y) = y^{(iv)} + 2y^{\prime\prime} + y = 0$. Then the characteristic equation is $m^4 + 2m^2 + 1 = (m^2 + 1)^{2} = 0$. Thus, the characteristic roots are $m = \pm 1, \pm 1$. Thus the complementary function $y_{c}$ is

$\displaystyle y_{c} = (c_{1} + c_{2}x)\cos{x} + (c_{3} + c_{4}x)\sin{x} $

Next we find the particular solution $y_{p}$ using the method of undetermined coefficient. Let $H(D)=(D-1)^{3}$. Then

$\displaystyle H(D)x^{2}e^{x} = ((D-1)^{3} )x^2 e^{x} = (D^3 - 3D^2 + 3D - 1)x^2 e^{x} = 0 $

Thus, the particular solution $y_{p}$ is a solution of the following equation.

$\displaystyle (H(D)L(D))y = (D^4 + 2D^2 + 1)((D - 1)^{3} )y = 0 $

The characteristic equation is $(m^2 +1)^{2}(m-1)^3 = 0$. Thus the fundamental solutions are

$\displaystyle \{\cos{x}, x\cos{x}, \sin{x}, x\sin{x}, e^{x}, xe^{x}, x^2 e^{x} \}$

But $\cos{x}, x\cos{x}, \sin{x}, x\sin{x}$ are solutions of the complementary function. Thus we omit those solutions. Then we have

$\displaystyle y_{p} = Ax^2 e^{x} + Bx e^{x} + Ce^{x} $

Substitute $L(D)y = x^2 e^{x}$. Then

\begin{displaymath}\begin{array}{ll}
+ (y_{p} &= Ax^2 e^{x} + Bx e^{x} + Ce^{x}...
...2 e^{x} + (16A + 4B)xe^{x} + (16A + 8B + 4C)e^{x}
\end{array}\end{displaymath}

From this, we have the system of linear equations.

$\displaystyle \left\{\begin{array}{ll}
4A & = 1\\
16A + 4B &= 0\\
16A + 8B + 4C &= 0
\end{array}\right. $

Solve this, we have $A = 1/4, \ B = -1, \ C = 1$. Thus, the particular solution is

$\displaystyle y_{p} = \frac{-1}{4}x^2 e^{x} - xe^{x} + e^{x} $

Therefore, the general solution is
$\displaystyle y = y_{c} + y_{p}$ $\displaystyle =$ $\displaystyle (c_{1} + c_{2}x)\cos{x} + (c_{3} + c_{4})\sin{x}$  
  $\displaystyle +$ $\displaystyle \frac{1}{4}e^{x}(x^2 - 4x + 4) \ \ $