Addition and Multiplication of Step Function?

443 Views Asked by At

Let $f(x) = [x]$ and let $g(x) = [2x]$ for all real $x$. In each case, draw the graph of the function h defined over the interval $[-1,2]$ by the formula given.

1.$h(x) = f(x) + g(x)$

2.$h(x) = f(x)g(x)$

It's easy to graph $f(x)$ and $g(x)$ sperately. The only problem I am having is the graphing of $h(x)$.

So,can you please explain to me how step functions are added and multiplied? Thanks in Advance

4

There are 4 best solutions below

0
On BEST ANSWER

One way we can approach this is by using a table of values where the inputs are series of intervals.

\begin{array}{|c|c|c|c|c|} \hline \text{Interval} & f=\lfloor x\rfloor & g=\lfloor2x\rfloor & f+g & fg\\ \hline [-1,-0.5) & -1 & -2 & -3 & 2 \\ [-0.5,0) & -1 & -1 & -2 & 1 \\ [0,0.5) & 0 & 0 & 0 & 0 \\ [0.5,1) & 0 & 1 & 1 & 0 \\ [1,1.5) & 1 & 2 & 3 & 2 \\ [1.5,2) & 1 & 3 & 4 & 3 \\ \{2\} & 2 & 4 & 6 & 8 \\ \hline \end{array}

0
On

If $n \le x < n+1$ where $n\in \mathbb{Z}$,

then we have $[x]=n$.

Also, we have $$2n \le 2x < 2n+2$$

We consider when does $$2n+1 \le 2x$$ $$n+\frac12\le x$$

Hence, $$g(x) = \begin{cases} 2n,& n \le x < n+\frac12 \\ 2n+1,& n+\frac12\le x < n+1\end{cases}$$

Hence \begin{align}f(x) + g(x) &= \begin{cases} 3n,& n \le x < n+\frac12 \\ 3n+1,& n+\frac12\le x < n+1\end{cases}\\ &=3[x] + \mathbb{1}_{x\pmod{1}\ge\frac12}\end{align}

I will leave the multiplication to you.

0
On

Let's consider $\mathbb{R^+}$, so, non negative, case and divide it against functions $g(x)=\left\lfloor 2x\right\rfloor$ constancy intervals and $f(x)=\left\lfloor x\right\rfloor$ constancy intervals. taking all intervals we obtain $\left(k, \frac{2k+1}{2}\right)$ and $\left(\frac{2k+1}{2},k+1\right)$ partition. On first interval $f=k$ and $g=2k$. On second interval $f=k$ and $g=2k+1$. So you can easy calculate as $fg$, so $f+g$. $$f(x)+g(x)=\begin{cases} 3k, & x\in \left(k, \frac{2k+1}{2}\right) \\ 3k+1, & x\in \left(\frac{2k+1}{2},k+1\right) \end{cases} $$ $$f(x)\cdot g(x)=\begin{cases} 2k^2, & x\in \left(k, \frac{2k+1}{2}\right) \\ 2k^2+k, & x\in \left(\frac{2k+1}{2},k+1\right) \end{cases} $$

0
On

Just do it.

For $x \in [-1,-.05)$ $f(x) = -1, g(x)= -2$ so $f(x) + g(x) = -3$ and $f(x)g(x) = 2$.

For $x \in [-0.5,0)$ $f(x) = -1, g(x) =-1$ so $f(x)+g(x) = -2$ and $f(x)g(x)=1$

For $x\in [0,0.5)$ $f(x)=0, g(x) =0$ so $f(x) +g(x) = 0$ and $f(x)g(x) = 0$

For $x\in [0.5,1)$ $f(x) =0, g(x) =1$ so $f(x) + g(x) =1$ and $f(x)g(x) =0$.

For $x \in [1,1.5)$ $f(x) = 1, g(x)=2$ so $f(x) +g(x) = 3$ and $f(x)g(x)=2$

For $x \in [1.5,2)$ $f(x) = 1, g(x) = 3$ so $f(x) + g(x) = 4$ and $f(x)g(x) = 3$.

And for $x = 2$ then $f(x)=2; g(x)=4; f(x)+g(x)=6$ and $f(x)g(x) = 8$.

......

To generalize: For every $x$ there is a unique $n\in\mathbb Z$ so that $n\le x < n+1$. And $[x]=n$.

There is a unique $m\in \mathbb Z$ so that $m \le 2x < n+1$ and $[2x]=m$ but $\frac m2 \le x , \frac m2 + \frac 12$. If $m$ is even, we have $n = \frac m2 \le x < n +\frac 12 < n+\frac 12$ and so $[2x]=m= 2n=2[x]$ and $[x] \le x < [x]+\frac 12$. If $m$ is odd we have $\frac m2 = n+\frac 12 \le x < n+1$ and $[2x]=m = 2n+1 =2[x]+1$ and $[x]+\frac 12 \le x < [x]+1$.

That is to say if $f(x) = [x]$ always but $g(x) = 2[x]$ or $2[x]+1$ depending on whether $x < [x]+\frac 12$ or $x \ge [x] + \frac 12$.

So $f(x) + g(x) = \begin{cases}3[x]&x < [x]+\frac 12\\3[x]+1& x\ge [x] +\frac 12\end{cases}$

And $f(x)g(x) = \begin{cases}2[x]^2&x < [x]+\frac 12\\ [x](2[x]+1)=2[x]^2+[x] & x\ge [x] +\frac 12\end{cases}$