I'm pretty confused trying to find this Laplace transform:
$$f(t)=\begin{cases}2, & 0\leq t < 1 \\ 2+t, & 1\leq t < 2 \\ 0, & 2\leq t < \infty \end{cases}$$
I know that I can represent this function as the sum of different step functions, but I'm not able to do it
Try to use the Heaviside step function, which is defined as follows: $$\mathscr U(t-a) = \cases{1 &$0 \leq t \leq a$\\1 & $t\geq a$}.$$ Then, as the function $f$ is defined for $t \geq 0$ we can write: $$f(t) = 2 +t\mathscr U(t-1) -(t+2)\mathscr U(t-2). $$ Now apply the theorem: $$\mathcal L(f(t-a)\mathscr U(t-a))(s) = e^{-at}\mathcal L(f(t))(s),$$
which is very easy to prove. Moreover, we have an interesting result: $$\mathcal L(h(t)\mathscr U(t-a))(s) = e^{-at}\mathcal L(f(t+a))(s).$$