We can express the forcing function (the piecewise expression on the right side) in terms of the step function as
where

Let F(s) be the Laplace transform of a function f(t). Now recall the transform pair

This means


I assume you're familiar with the transform rule for derivatives of y(t). Now we're ready to take the transform of both sides of the ODE:


Plug in the initial values and solve for Y(s) :




Consider the partial fraction expansion

Solve for the coefficients:




Hence we can expand Y(s) as

The last transform pair we need is

Now, taking inverse transforms of everything yields





and putting everything together gives the same solution as the one provided.