Asymptotic function suggestion please

44 Views Asked by At

Can someone suggest a function to fit these requirements:

  • $f(x) \to x$ as $x \to -\infty$

  • $f(x) \to 1$ from below as $x \to \infty$

  • Well-behaved at $x=0$.

  • Doesn't overshoot

  • Reasonably easy to control how "sharp" the knee is.

  • $0 < \frac{df}{dx} < 1$ for all $x$.

I'm basically looking for a smooth transition from $f(x) = x$ up to nearly 1 to $f(x) = 1$ from just over 1 onwards, with a parameter to control how big "nearly" and "just over" are.

The closest I've come up with is $f(x) = \frac{x}{1 + x/a^x} + \frac{1}{1 - x/a^{-x}}$ where $a$ is about $0.7$. But this has a noticeable overshoot and grows too fast over $0 < x < 1$.

EDIT: Should have noted that "Well-behaved at $x = 0$" includes being numerically well-behaved around that point, not just mathematically well-defined.

2

There are 2 best solutions below

1
On

How about

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

enter image description hercccccce

3
On

Piggybacking off @Saturday's example, here's one that should also meet the $f(x)\to x$ as $x\to -\infty$ condition: $$f(x)=\frac{x-1}{1-e^{x-1}}+1$$

enter image description here