How to plot and analyze function $f(x)=x+\lfloor x \rfloor+\operatorname{Sgn}(x)+1$

33 Views Asked by At

I need some help to understand how to plot and analyze the following function: $$f(x)=x+\lfloor x \rfloor+\operatorname{Sgn}(x)+1$$

Where $\lfloor . \rfloor$ is the floor function.

and; $\operatorname{sgn}(x):=\left\{\begin{array}{ll}-1 & \text { if } x<0 \\ 0 & \text { if } x=0 \\ 1 & \text { if } x>0\end{array}\right.$

What I've tried:

I drew each function separately by hand and it worked fine as follows

for $\lfloor x \rfloor$

https://www.wolframalpha.com/input/?i=floor%28x%29

for Sign[x]

https://www.wolframalpha.com/input/?i=Sign%5Bx%5D

But I could not understand how to construct the $f(x)=x+\lfloor x \rfloor+\operatorname{Sgn}(x)+1$ function plot. Why and how to get the next plot by hand

https://www.wolframalpha.com/input/?i=x%2Bfloor%28x%29%2BSign%5Bx%5D%2B1