Help with plotting unit step function

986 Views Asked by At

The following function is given:

$$x(\tau)=(\tau +2)u(\tau+2)-2u(\tau+1)-\tau u(\tau)$$

I am having problem with making plot of these functions. I have to draw without any program or calculator.

I can draw every function separately but I dont know how to connect them.

My try:

enter image description here

Correct solution:

enter image description here

Can someone simply explain how to connect all functions into one, like in the correct solution.

1

There are 1 best solutions below

2
On

The Heaviside theta function is defined as follow $\theta(t)$ : $1$ if $t >0$ and $0$ if $t \leq 0$

so when $t \leq -2$ every term in every Heaviside theta function in your function $x(t)$ will be less or equal to $0$ so the whole expression will equal $0$

$t$ between $-2$ and $-1$ inclusive will be just the first expression $t+2$ because Heaviside $\theta(t+2)$ will be the only Heaviside function that result $1$, and it's multiplied by $t+2$ so the graph of $x(t)$ will act like straight line from $-2$ to $-1$

$t$ between $-1$ and $0$ inclusive will be the first two expressions $t+2$ and $-2$ because $\theta(t+2) =1 $ and $\theta(t+1)=1$ but $\theta(t)=0$ so the graph of $x(t)$ in the interval $[-2,-1]$ will be the graph of the straight line the crosses the center point $(0,0)$.

$t$ bigger than $0$ will result to all the expressions which are $t+2$ and $-2$ and $-t$ and because in this case $\theta(t+2),\theta(t+1),\theta(t)=1$ we will sum all the terms that are multiplied in the Heaviside functions resulting $0$ since $t+2 -2-t=0$

note : the second graph is the correct graph, you used the notation $u(t)$ to describe the Heaviside theta function while i used $\theta(t)$, so don't be confused, and i hope my answer simplified some things to you.