# Product vs Sum of two Heaviside step functions

Let $$\theta(x)$$ be the Heaviside step function defined as

$$\theta(x) := \begin{cases} 1 & x \geq 0\\ 0 & x \lt 0 \end{cases}$$

Then is $$\theta(x)\theta(1-x)$$ the same as $$\theta(x)-\theta(x-1)$$, because when plotted, both of them looks like the Rectangular function in the range [0,1]?

• Can't you show that they're equal without plotting? Jun 16, 2023 at 20:57
• Both are constant on the intervals $(-\infty,0), (0,1), (1,\infty)$ so you need only evaluate 5 values to show that they are equal. Jun 16, 2023 at 21:00
• Note that, for example, $\theta(1-x)=1$ if $1-x\ge0$, i.e. when $x\le 1$. If $x>1$ then $\theta(1-x)=0$. Can you work out when $\theta(x-1)$ equals $1$ and when it equals $0$?
– Joe
Jun 16, 2023 at 21:05
• You could also use indicator functions, noting that $1_A \cdot 1_B = 1_{A \cap B}$ and show that $1_{[0,\infty)} \cdot 1_{(-\infty,1]} = 1_{[0,1]}$ and similarly for $1_{[0,\infty)} - 1_{[1,\infty)} = 1_{[0,1)}$. In particular, they differ at $x=1$. Jun 16, 2023 at 21:28

\begin{align}\theta(x)\theta(1-x)&=\begin{cases}\theta(1-x)&\text{if }x\ge 0\\ 0&\text{if }x<0\end{cases}=\begin{cases}1&\text{if }x\ge 0\land 1-x\ge 0\\ 0&\text{if }x\ge 0\land 1-x<0\\ 0&\text{if }x<0\end{cases}=\\&=\begin{cases}1&\text{if }0\le x\le 1\\ 0&\text{if }x>1\lor x<0\end{cases}\\ \theta(x)-\theta(x-1)&=\begin{cases}1-\theta(x-1)&\text{if }x\ge 0\\ -\theta(x-1)&\text{if }x<0\end{cases}=\begin{cases}0&\text{if }x\ge 0\land x-1\ge 0\\ 1&\text{if }x\ge 0\land x-1<0\\ -1&\text{if }x<0\land x-1\ge 0\\ 0&\text{if }x<0\land x-1<0\end{cases}\\&=\begin{cases}0&\text{if }x\ge 1\lor x<0\\ 1&\text{if }0\le x<1\end{cases}\end{align}
• This is incorrect, the second functions should be $\theta(x)-\theta(x-1)$.