# Solve Non-homogeneous Linear Differential Equation by Undetermined Coefficients

I just need help solving for the particular solution. My solution is on the right track but I just cannot get my solution to match the answer in my textbook.

$$y'' + y' - 6y = 52\cos(2x)$$

$$yp = K\cos(2x) + M\sin(2x)$$

$$yp' = -2K\sin(2x) + 2M\cos(2x)$$

$$yp" = -4\cos(2x) - 4M\sin(2x)$$

After substituting $yp$ and its differentials into the original differential equation.

I get the following for $52\cos(2x)$:

$-4K - 6K + 2M = 52$ which simplifies to: $-10K + 2M = 52$

I also get the following for $0 x \sin(2x)$

$-4M - 2K - 6M = 0$ which simplifies to: $-10M - 2K = 0$

These two equations results in a system of two linear equations in two unknowns which when I solve them gives me:

$M = \frac{1}{5}$ and $K = \frac{-258}{50}$

I know this cannot be the right answer. My book has the answer for the particular solution as $yp = -5\cos(2x) + \sin(2x)$

This means that we have $K = -5$ and $M = 1$ which works perfectly but I just cannot seem to derive it. I think there might be something wrong with my setup. Please advise!

The linear system you are trying to solve is $$\left\{\begin{array}{ccccc} -10 K & + & 2M & = & 52 \\ -2 K & - & 10M & = & 0\end{array}\right.$$ If you multiply the second equation by $-5$ you get $$\left\{\begin{array}{ccccc} -10 K & + & 2M & = & 52 \\ 10 K & + & 50M & = & 0\end{array}\right.$$ Then you add both equations and get $52M=52,$ that is, $M=1.$ If you substitute in the any of the equations you get $K=-5$