User:Egm4313.s12.team8.tclamb/R6-1

=R6.6 - Verify Particular Solution to ODE=

Problem Statement
Verify the following:
 * $$6 e^{-2x} ( n \cos{3x} - m \sin{3x} )$$

As the left hand side to the following ODE:
 * $$y_p'' + 4 y_p' + 13y_p = 2 e^{-2x} \cos{3x}$$

Where:
 * $$y_p(x) = x e^{-2x} ( m \cos{3x} + n \sin{3x} )$$

Then, solve for m and n.

Solution
First, we find and simplify each term of the left hand side:
 * $$\begin{array}{rl}

y_p &= x e^{-2x} ( m \cos{3x} + n \sin{3x} ) \\ &= e^{-2x} ( m x \cos{3x} + n x \sin{3x} ) \\ 13 y_p &= e^{-2x} ( 13 m x \cos{3x} + 13 n x \sin{3x} ) \\ &\\ y_p' &= e^{-2 x} x (3 n \cos{3 x}-3 m \sin{3 x})+e^{-2 x} (m \cos{3 x}+n \sin{3 x})-2 e^{-2 x} x (m \cos{3 x}+n \sin{3 x}) \\ &= e^{-2 x} ((-2 m x+m+3 n x) \cos{3 x}+ (-3 m x-2 n x+n)\sin{3 x}) \\ 4 y_p' &= e^{-2 x} ((-8 m x+4m+12 n x) \cos{3 x}+ (-12 m x-8 n x+4n)\sin{3 x}) \\ &\\ y_p'' &= e^{-2 x} (3 n \cos{3 x}-3 m \sin{3 x}) \\ &\;\;+\left(e^{-2 x}-2 e^{-2 x} x\right) (3 n \cos  (3 x)-3 m \sin{3 x})\\ &\;\;+e^{-2 x} x (-9 m \cos{3 x}-9 n \sin{3 x})\\ &\;\;-2 e^{-2 x} (m  \cos{3 x}+n \sin{3 x})\\ &\;\;+4 e^{-2 x} x (m \cos{3 x}+n \sin{3 x})\\ &\;\;-2 e^{-2 x} (x (3 n \cos{3 x}-3 m \sin{3 x})+m \cos{3 x}+n \sin{3 x}) \\ &= e^{-2 x} ( (-5 x m - 4 m - 12 x n + 6 n) \cos{3 x} + (12 m x - 6 m - 5 x n - 4 n) \sin{3 x}) \end{array}$$

Then, we combine the three terms and simplify:
 * $$\begin{array}{rl}

y_p'' + 4 y_p' + 13 y_p &= e^{-2 x} ( (-5 x m - 4 m - 12 x n + 6 n) \cos{3 x} + (12 m x - 6 m - 5 x n - 4 n) \sin{3 x}) \\ &\;\;+e^{-2 x} ((-8 m x+4m+12 n x) \cos{3 x}+ (-12 m x-8 n x+4n)\sin{3 x}) + e^{-2x} ( 13 m x \cos{3x} + 13 n x \sin{3x} ) \\ &= 6 e^{-2x} ( n \cos{3x} - m \sin{3x} )\end{array}$$

This verifies the given left hand side. To solve for m and n, we set this equal to the right hand side of the ODE:
 * $$\begin{array}{rcl}

6 e^{-2x} ( n \cos{3x} - m \sin{3x} ) &=& 2 e^{-2x} \cos{3x} \\ 6 ( n \cos{3x} - m \sin{3x} ) &=& 2 \cos{3x} \\ n \cos{3x} - m \sin{3x} &=& \frac13 \cos{3x} \end{array}$$

Therefore:
 * $$\begin{array}{rl}

n &= \frac13 \\ m &= 0 \\ y_p(x) &= \frac13 x e^{-2x} \sin{3x} \end{array}$$