`f(0) = 4` means we start at value `4`.

If the whole wave has period `2`, and it is a square wave, then it means for half of the time, the value is (positive) `4` and the other half it is `-4`.

So for the first second, it has value `4`, for the second second, the function value is `-4`.

We write this, using the "rectangular pulse" formula from before:

`f(t) = 4·{u(t) − u(t − 1)}` `-4·{u(t-1) − u(t − 2)}`

`=4·u(t)-8·u(t-1)+4·u(t-2)`

The graph of this first cycle is:

Graph of `f(t)=4·u(t)-8·u(t-1)+4·u(t-2)`, a square wave.

Get the Daily Math Tweet!

IntMath on Twitter