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