I have this problem: $$y''+y'+y=\sin(x),$$ with $y(0)=0$ and $y'(0)=1$.
I solve it using the Laplace Transform:
$$\mathcal L(y''+y'+y)= \mathcal L(\sin(x))$$ $$s^2\mathcal L(y)-sy(0)-y'(0)+s\mathcal L(y)-y(0)+\mathcal L(y)=\frac{ 1}{s^2 +1}$$ $$\mathcal L(y)(s^2+s+1)=\frac{ 1}{s^2 +1}+1$$
$$\mathcal L(y)=\frac{ s^2 +2}{s^2 +1}\frac{ 1}{(s^2+s+1)}$$
What is the best way to get $y(x)$?
$$\mathcal L(y)(s^2+s+1)=\frac{ 1}{s^2 +1}+1$$ $$\mathcal L(y)=\frac{ 1}{(s^2 +1)((s^2+s+1))}+\frac 1 {(s^2+s+1)}=h(s)+g(s)$$ Note that $$g(s)=\frac 1 {(s^2+s+1)}=\frac 1 {(s+\frac 12)^2+\frac 34}=\frac 2 {\sqrt 3}\frac {\frac {\sqrt 3}2} {(s+\frac 12)^2+\frac 34}$$ Use the formula $$\mathcal L{(e^{at}\sin(bt))}=\frac {b}{(s-a)^2+b^2}$$ $$\mathcal L^{-1}(g(s))=\frac 2 {\sqrt 3}e^{-t/2}\sin(\frac {\sqrt 3}2t)$$ Use fraction decomposition for the first fraction $h(s)$ $$h(s)=\frac{ 1}{(s^2 +1)((s^2+s+1))}=-\frac{ s}{(s^2 +1)}+\frac{ s+1}{(s^2+s+1)}$$ $$h(s)=-\frac{ s}{(s^2 +1)}+\frac{ s+\frac 12}{(s+\frac 12)^2+\frac 34}+\frac 12g(s)$$ First fraction is laplace transform of $-\cos t$
For the the second fraction use the following formula $$\mathcal L{(e^{at}\cos(bt))}=\frac {s-a}{(s-a)^2+b^2}$$ Third fraction is just $\frac 12 g(s)$
Finally $$\boxed{y(t)=-\cos(t)+\frac 3 {\sqrt 3}e^{-t/2}\sin(\frac {\sqrt 3}2t)+e^{-t/2}\cos(\frac {\sqrt 3}2t)}$$