Find the the Laplace transform $Y(s)$ of the solution of the given initial value problem
$$y''+y=\begin{cases}t & 0 < t < 1 \\ 0 & 1 < t < \infty \end{cases}$$

$$y(0)=0$$

$$y'(0)=0$$

What i tried

The laplace transform becomes
$$Y(S)+sy(0)+y'(0)=\begin{cases}\frac{1}{s^2} & 0 < \frac{1}{s^2} < 1 \\ 0 & 1 < \frac{1}{s^2} < \infty \end{cases}$$ Since $$y(0)=0$$

$$y'(0)=0$$ the equation becomes
$$Y(S)=\begin{cases}\frac{1}{s^2} & 0 < \frac{1}{s^2} < 1 \\ 0 & 1 < \frac{1}{s^2} < \infty \end{cases}$$ AM i correct. COuld anyone please explain. Thanks