Answer
See below
Work Step by Step
Given:
$y''-3y'+2y=3\cos t+\sin t$
and $y(0)=1\\
y'(0)=2$
We take the Laplace transform of both sides of the differential
equation to obtain:
$[s^2Y(x)-sy(0)-y'(0)]-3[sY(s)-y(0)]+2Y(s)=\frac{3s+1}{s^2+1}$
Substituting in the given initial values and rearranging terms yields
$Y(s)(s^2-3s+2)-s+2=\frac{3s+1}{s^2+1}$
That is,
$Y(s)(s^2-3s+2)=\frac{3s+1}{s^2+1}+s-2=\frac{s^3-2s^2+4s-1}{s^2+1}$
Thus, we have solved for the Laplace transform of y(t). To find y itself, we must take the inverse Laplace transform. We first decompose the right-hand side into partial fractions to obtain:
$Y(s)=\frac{s^3-2s^3+4s-1}{(s^2+1)(s-1)(s-2)}=-\frac{1}{s-1}+\frac{7}{5(s-2)}-\frac{15}{5(s^2+1)}-\frac{4}{5(s^2+1)}$
We recognize the terms on the right-hand side as being the Laplace transform of appropriate exponential functions. Taking the inverse Laplace transform yields:
$y(t)=-e^{t}+\frac{7}{5}e^{2t}+\frac{3}{5}\cos t-\frac{4}{5}\cos t$