1. Rewrite the piecewise function as a sum of Heaviside functions

We know that if f(t) is a function such that:

f(t)=\left\{\begin{aligned} f_{0}(t), \quad & 0\leq t<t_{1} \\ f_{1}(t),\quad & t_{1}\leq t< t_{2} \\ f_{2}(t), \quad & t\geq t_{2} \end{aligned}\right.

so we may write f using the unit step function as follows:

f(t)=f_{0}(t)+u(t-t_{1})(f_{1}(t)-f_{0}(t))+u(t-t_{2})(f_{2}(t)-f_{1}(t))

Note that:

f_{0}(t)=5,\quad f_{1}(t)=0 \quad f_{2}(t)=0

and t_{1}=3. Thus:

f(t)=5+u(t-3)(0-5)\Rightarrow f(t)=5-5u(t-3)

2. Apply the Laplace transform

As the Laplace transform \mathscr{L} \{ \cdot \} is linear, we get:

\begin{aligned} \mathscr{L}\{f(t)\} &=\mathscr{L} \{5-5u(t-3)\} \\ &=5\cdot \mathscr{L} \{1\}-5\cdot \mathscr{L} \{u(t-3)\} \end{aligned}

From the first line of the table of common Laplace transforms, we have:

\displaystyle \mathscr{L}\{1\}=\frac{1}{s}

and the 9th one:

\displaystyle \mathscr{L}\{u(t-a)\}=\frac{e^{-as}}{s}

Since a=3, we may conclude that:

\displaystyle \mathscr{L}\{f(t)\}=5\frac{1}{s}-5\frac{e^{-3s}}{s}

We reached the end of this post, for more exercises with detailed solutions, check this page!