How Does One Create a Step Function?

How Does One Create a Step Function?
$\begingroup$

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: 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

$\endgroup$
5

1 Answer

$\begingroup$

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.

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 $.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Robert Thorne
Author

Robert Thorne

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.