General solution of $\ddot x-3\dot x+2x=e^t\sin(t)$ I want to find a general solution of $$\ddot x-3\dot x+2x=e^t\sin(t)$$ At first, I looked at the differential equation $$\ddot x-3\dot x+2x=e^{(1+i)t}$$ whose imaginary part should be my desired solution. For the complex problem I found a special solution $$\varphi(t)=\left(-\frac{1}{2}+\frac{i}{2}\right)e^{(1+i)t}$$ 
Now, the characteristic polynomial $P(D)=D^2-3D+2$ of this differential equation has roots $\lambda_1=1$ and $\lambda_2=2$ so the fundamental system of solutions should be $$\left\{e^t,e^{2t}\right\}$$ Therefore, the general solution to the complex problem is $$\Phi(t)=\left(-\frac{1}{2}+\frac{i}{2}\right)e^{(1+i)t}+C_1e^t+C_2e^{2t}$$ where $C_1,C_2\in\mathbb C$ and I obtain the general solution of my original problem by $$\Psi(t)=\Im(\Phi(t))=\frac{e^t}{2}(\cos(t)-\sin(t))$$
and I don't think this can be right since there are no constants anywhere. Is there an error in my thoughts? And if so, where is it?
 A: $$
e^{it} = \cos(t)+i\sin(t)
$$
$$
(1+i)(\ddot x-3\dot x+2x)=e^t e^{it}\Rightarrow \ddot x-3\dot x+2x = \left(\frac{1-i}{2}\right)e^{t(i+1)}
$$
The solution for the homogeneous equation or $\ddot x_h-3\dot x_h+2x_h = 0$ is
$$
x_h = C_1 e^t+C_2 e^{2t}
$$
and a particular solution is
$$
x_p = \frac{e^t}{2}\left(\cos(t)-\sin(t)\right)
$$
and then
$$
x = x_h + x_p = C_1 e^t+C_2 e^{2t}+\frac{e^t}{2}\left(\cos(t)-\sin(t)\right)
$$
A: For a particular solution, try using $y=A e^t\sin t + B e^t \cos t $ and find the real numbers $A$ and $B$. Note that you get two equations in $A$ and $B$.
Suppose you found them.
Hence, the general solution  is 
$$ x(t) = C_1 e^t + C_2 e^{2t} + A e^t\sin t + B e^t \cos t $$, where $C_1,C_2$ are arbitrary constants and $A$,B$ are known numbers.
A: $$\ddot x-3\dot x+2x=e^t\sin(t)$$
Another solution
$$\ddot x-2\dot x- \dot x+2x=e^t\sin(t)$$
$$(\ddot x-2\dot x)-( \dot x-2x)=e^t\sin(t)$$
$$z'-z=e^t\sin(t)$$
$$z'e^{-t}-ze^{-t}=\sin(t)$$
Substitute $z=x'-2x$
$$(ze^{-t})'=\sin(t)$$
$$ze^{-t}=-\cos(t)+K$$
$$(x'-2x)e^{-t}=-\cos(t)+K$$
$$(xe^{-2t})'=-\cos(t)e^{-t}+Ke^{-t}$$
$$xe^{-2t}=-\int \cos(t)e^{-t}dt+Ke^{-t}+C$$
$$x(t)=-e^{2t}\int \cos(t)e^{-t}dt+Ke^{t}+Ce^{2t}$$
Therefore
$$\boxed{x(t)=\frac 12e^{t}(\cos(t)-\sin(t))+Ke^{t}+Ce^{2t}}$$
