Modeling a greatest integer function

162 Views Asked by At

I'm trying to model a function that resembles a greatest integer function. The domain is from [0, $\infty$). The inputs from 0 to 1.5 (non-inclusive) need to be mapped to an output of 0, and 1.5 to $\infty$ mapped to 1. But, I'm trying to not use a piecewise function. Is it possible to accomplish this?

Here's what I've tried:

$$f(x)=\left\lfloor \frac{x}{1.5} \right\rfloor$$

2

There are 2 best solutions below

5
On BEST ANSWER

Try this function,

$$\frac{|x-1.5|}{2x-3}+\frac12$$

Although this is very artificial, it works.

1
On

Your input mapping is currently ambiguous: do you mean to send 1.5 to 0, or 1?

Using a characteristic function: $$1-\chi_{[0,1.5)}$$ where $\chi_A(x)$ takes the the value $1$ if $x\in A$ and $0$ otherwise.