$f(t) = \begin{cases} 4, & \text{if 0 $\le$ t $\le$ 2} \\ t, & \text{if $t \ge 2$} \end{cases}$
I need to express $f(t)$ in terms of the unit step function, $u(t)$.
By purely visualizing, my attempt is as follows:
$f(t) = 4[u(t-0)-u(t-2)] + t[u(t-2)-u(t-\infty)]$
$f(t) = 4[(u(t)-u(t-2)] +t[u(t-2)]$
The answer to this from the book is:
$f(t) = 4 + u(t-2)[t-4] = 4+(t-2)u(t-2)-2u(t-2)$
I am completely unable to follow this solution. Could someone please help explain this as simply as possible? Thanks!