Function with an asymptote at y=-1 and y=1

6.8k Views Asked by At

I'm looking for a function that has two asymptotes parallel to the x-axis. Preferably it should also only cross the x-axis at (0,0) and be built without using any trigonometric functions. Mind you, if that's not possible then so be it. However, that is my preference.

The purpose of this is that when the function is placed into the floor function and (manipulated a little) it will generate a function that is 0 at 0, 1 whenever the input is positive and -1 when the input is negative. Such a curve is the best bet I can come up with towards guessing a means to build such a construct.

I think I have seen the function somewhere at some point or a variation. I just cannot remember what it was.

Thank you

-The Great Duck

(Also, while I suppose it is probably obvious (can't place it in floor), no piece wise please)

2

There are 2 best solutions below

3
On BEST ANSWER

You can be creative with this and make up your own funtions. For example consider,

$$ f(x) = \left\{ \begin{array}{ll} x & \quad -1\leq x \leq 1 \\ 1 & \quad x \geq 1\\ -1 & \quad x \leq 1 \end{array} \right. $$

1
On

$$f(x)=\frac{x}{\sqrt{x^2+1}}$$

It should be apparent that this works because leading coefficient test provides asymptotes for $y=\pm 1$, and plugging in $0$ for $x$ yields $0$.


Edit: I found another one if you prefer it:

$$f(x)=\frac{1-e^{-x}}{1+e^{-x}}$$