I could use a process check. In general since the solution is $$y = y_c + y_p$$ where $y_c$ is the complementary solution and $y_p$ is the particular, I can break it down.
The equation in question is this:
$$y" – 3y' = sin2x$$
Let's find the complementary solution first:
$$y_c = c_1e^{r_1x} + c_2e^{r_2x}$$
so let's solve the auxiliary equation:
$$r^2 – 3r = 0$$
$$r(r – 3) = 0$$
so the roots are $r = {0, 3}$
so the complementary equation is:
$$y = c_1 + c_2e^{3x}$$
Let's find the particular solution second:
so the form of the particular since it's a trig function on the right side is:
$$y_p = A\cos{kx} + B\sin{kx}$$
where k is the coefficient for the trig function radian measure.
$$y'p = -2A\sin{2x} + 2B\cos{2x}$$
$$y''p = -4A\cos{2x} – 4B\sin{2x}$$
so substituting:
$$(-4A\cos2x – 4B\sin2x) – 3(-2A\sin2x + 2B\cos2x) = \sin{2x}$$
$$(-4B + 6A)sin2x + (-4A – 6B)cos2x = sin2x$$
so matching coefficients
$(-4B + 6A) = 1$ and $-6B – 4A = 0$ and $-6B = 4A$ so $B = \frac{-2}{3}A$
solving further:
$\frac{8}{3}A + 6A = 1$ so $\frac{26}{3}A = 1$ so $A = \frac{3}{26}$ and so $B = \frac{-12}{216}$
so then the general solution is:
$$y = c_1 + c_2e^{3x} + \frac{3}{26}cos2x – \frac{12}{216}sin2x$$
Is my process right? Did I make an error?
Best Answer
A problem results here. When taking $k=2$, you should see
$$y_p = A \sin 2x + B \cos 2x$$
and then you get the derivatives
$$y_p' = 2A \cos 2x - 2B \sin 2x \;\;\;\;\; y_p'' = -4A \sin 2x - 4B \cos 2x$$
You seem to have forgotten to taken the derivative of the trigonometric functions themselves when getting $y_p'$.
This is mostly just an arithmetic error, though, and the overarching idea (and the complimentary solution) are correct.
Edit:
After an edit made to the OP, that error was fixed. The other error that results is finding $A,B$, the latter in particular.
$A=3/26$ is correct. However, an arithmetic error seems to have resulted in finding $B$. Using substitution into $-4A-6B=0$,
$$-4\left( \frac 3 {26} \right) - 6B = 0 \implies B = \frac{-1}{6} \cdot 4\left( \frac 3 {26} \right) = \frac{-12}{156} = \frac{-1}{13} \ne \frac{-12}{216} = \frac{-1}{18}$$