`f(t) = u(t) + (1 − t) · u(t − 1) ` `+ (t − 2) · u(t − 2)`

Expanding where possible:

`= u(t) + u(t − 1) − t · u(t − 1)` `+ t · u(t − 2)` ` − 2 · u(t − 2)`

`= [u(t) − u(t − 1)]` ` + 2 · u(t − 1)` ` − t · [u(t − 1) − u(t − 2)] ` ` − 2 · u(t − 2)`

[We wrote `u(t − 1)` as ` − u(t − 1) + 2 · u(t − 1)`, to get the expression in the form we need.]

`= [u(t) − u(t − 1)] ` `+ 2 · [ u(t − 1) − u(t − 2)] ` ` − t · [u(t − 1) − u(t − 2)] `

[We simply moved the last term.]

`= 1 · [u(t) − u(t − 1)]` ` + (2 − t) · [ u(t − 1) − u(t − 2)]`

[Collecting like terms.]

From this expression, we can graph the function. It has value:

`1` between `0 < t < 1`

`2 − t` between `1 < t < 2`

`0` thereafter

1234-10.511.52-0.5-1-1.5-2tf(t)Open image in a new page

Graph of `f(t)`.

NOTE: We could have obtained the graph of

`f(t) =` ` u(t) + (1 − t) · u(t − 1)` ` + (t − 2) · u(t − 2)`

by adding ordinates (`y`-values) of the 3 parts as follows:

`u(t)` → red

`(1 − t) · u(t − 1)` → blue

`(t − 2) · u(t − 2)` → magenta

The green part is the answer.

1234-10.511.52-0.5-1-1.5-2tf(t)Open image in a new page

Graph of `f(t)`.