How does one create a step function?

9k Views Asked by At

Is there a general form for the equation of a step function? For example, if I wanted to find the equation of this particular step function: Step function How would I go about doing so? At first I was thinking of a piecewise function, but what if the function goes on forever? I don't think a piecewise function will do. I would appreciate some help

1

There are 1 best solutions below

0
On BEST ANSWER

For this particular step function (staying away from $\sup$), you need the floor function $f(x) = \lfloor x \rfloor$. $\lfloor x \rfloor$ is defined as "the largest integer less than or equal to $x$." In other words, if $x$ is not a whole number, you round down to the nearest whole number. If $x$ is a whole number, then $\lfloor x \rfloor$ is just $x$ itself. For instance, $\lfloor 1.2 \rfloor = 1$, $\lfloor 8.9 \rfloor = 8$, $\lfloor -2.2 \rfloor = -3$, and $\lfloor 5 \rfloor = 5$. If you were to graph $f(x) = \lfloor x \rfloor$, it would look something like this.

floor function

Your function looks like a shift of $f(x) = \lfloor x \rfloor$, $0.5$ units to the left. To move a function $c$-units to the left, you write it as $f(x+c)$. Using this idea with the function $f(x) = \lfloor x \rfloor$, you would write your function as $\lfloor x + 0.5 \rfloor $.