I have the following question: Below, differential equations that describe dynamic systems are given together with system inputs and initial conditions. Use the Laplace transform to determine the system outputs.
$$ \begin{aligned} \frac{\mathrm{d}^{2} y}{\mathrm{~d} t^{2}}+3 \frac{\mathrm{d} y}{\mathrm{~d} t}+2 y &=\sigma(t) \\ \sigma(t) &=\left\{\begin{array}{ll} 0, & t<0 \\ 1, & t \geq 0 \end{array}\right.\\ \frac{\mathrm{d} y}{\mathrm{~d} t}(0)=y(0) &=0 \end{aligned} $$
After using the $\mathcal{L}$-transform and partial fraction decomposition, I come to :
$$ Y(s) = \frac{1}{s+1} - \frac{1}{s+2}$$ which I tranform back to $\mathcal{L}^{-1} = e^{-t} - e^{-2t}$. The correct answer is : $\frac{1}{2} -e^{-t} + \frac{1}{2} e^{-2t}$.
I am self-taught so I probably missed something very basic here, but after looking up many examples, I don't understand why this is the right answer. Thanks in advance for help!
The Laplace transform of $1$ is $\frac1s$. Probably you'd have taken it as $1$ and so obtained the wrong result.
It is actually, $$Y(s) = \frac{1}{\color{blue}{s}(s^2+3s+2)} = \frac{1}{s(s+1)(s+2)} = \frac1{2s} - \frac1{s+1} + \frac1{2(s+2)}$$
So, $$\boxed{y(t) = \frac12 - e^{-t} + \frac12e^{-2t}}$$