Since the right-hand side is $5\exp(4x),$ we guess $ y_p(x) = A\exp(4x).$

Step 3: Plug our guess into the equation and solve for the undetermined coefficients

Plugging our guess for $ y_p(x)$ into the equation, we obtain $ 113A\exp(4x) = 5\exp(4x).$ This gives us the equation $113A=5,$ from which we get $ A=5/113.$ So we get
$$
y_p(x)=(5/113)\exp(4x).
$$
Step 4: The general solution is the particular solution plus all the homogeneous solutions.

So from the results of steps 1 and 3, we get the general solution is
$$
y(x) = (5/113)\exp(4x) + c_1\exp(-4x)\cos(7x) + c_2\exp(-4x)\sin(7x)
$$
Second, we solve for the constants

Now that we have the general solution, we plug in our initial values to find the solution to the initial value problem.
First we compute, $ y'(x) = (20/113)\exp(4x) - 4c_1\exp(-4x)\cos(7x) - 7c_1\exp(-4x)\sin(7x) - 4c_2\exp(-4x)\sin(7x) + 7c_2\exp(-4x)\cos(7x).$
Then we plug in $ x=0$ to get the following equations.
$$
\begin{align}
y(0) = 5/113 + c_1 &= 8 \\y'(0) = 20/113 - 4c_1 + 7c_2 &= -9
\end{align}
$$
We solve these equations to get $ c_1=899/113$ and $ c_2=2559/791.$
Finally, we plug our values for $ c_1$ and $ c_2$ into the general solution to find our solution to the initial value problem.
$$
y(x) = (5/113)\exp(4x) + (899/113)\exp(-4x)\cos(7x) + (2559/791)\exp(-4x)\sin(7x).
$$
You may reload this page to generate additional examples.