Consider $ u(t-a) = \begin{cases} 0, & \text{if }t
How can we rewrite a function like $ f(t) = \begin{cases} \cos2t, & \text{if }0\leq t \lt 2\pi \\ 0, & \text{if }t\geq 2\pi \end{cases} $ in terms of the unit step function? My textbook writes this particular example as $f(t) = [1-u(t-2\pi)]\cos2t$, but I don't understand how this was formulated nor how I can formulate other piecewise functions in terms of the unit step similarly.