Answer
$y(x)=c_1e^{-x}+c_2e^{x}+e^{2x}-\frac{1}{2}\sin x$
Work Step by Step
Given: $y''-y=3e^{2x}+\sin x$
Solve the auxiliary equation for the differential equation.
$r^2-1=0$
Factor and solve for the roots.
$(r-1)(r+1)=0$
Roots are: $r_1=-1$, as a multiplicity of 1 and $r_2=1$ as a multiplicity of 1
The general solution is
$y(x)=c_1e^{-x}+c_2e^{x} $
We have $F(x)=3e^{2x}+\sin x$
Obtain:
$(D-2)(D^2+1)(D^2-1)y_p(x)=3e^{2x}+\sin x$
Therefore, the general solution for $(D-2)(D^2+1)(D^2-1)y_p(x)=0$ is:
$y(x)=c_1e^{-x}+c_2e^{x}+A_0e^{2x}+A_2\cos x+A_3\sin x$
The trial solution can be computed as by plugging back into the given differential equation.
$y_p(x)=A_0e^{2x}+A_2\cos x+A_3\sin x$
So, we have:
$(D-2)(D^2+1)(D^2-1)y_p(x)=3e^{2x}+\sin x\\
(D-2)(D^2+1)(D^2-1)(A_0e^{2x}+A_2\cos x+A_3\sin x)=3e^{2x}+\sin x$
On comparing coefficients, we get:
$A_0=1\\
A_1=0\\
A_2=-\frac{1}{2}$
Therefore, the general solution for the given differential equation is:
$y(x)=c_1e^{-x}+c_2e^{x}+e^{2x}-\frac{1}{2}\sin x$