1
$\begingroup$

I'm trying to find a formula which creates the following graph:

enter image description here

Assuming the vertical line is y and horizontal is x, I'd like an asymptote at y = 1, at x = 0 the graph should also be '0'.

Any ideas?

  • 0
    Try [Lagrange interpolation](http://mathworld.wolfram.com/LagrangeInterpolatingPolynomial.html).2012-11-17

2 Answers 2

3

This looks very much like the $arctan(x)$ function.

So basically, we want a function that looks like

$ f(x) = A \cdot arctan(B(x-C))-D$, where $A, B, C, D$ are all constants.

Intuitively, $A$ will make the limit at infinity whatever we want. $B$ changes how steep the slope is. $C$ moves the slope around. $D$ changes the "$y$-position" of the graph (which matters if we want $f(0)=0$).

So we have two conditions to work with, one is that $f(0)=0$, the other being $\lim_{x\rightarrow \infty}f(x)=1$

This helps us to eliminate a couple of constants. I also infer from your picture you want the rising part to be "around $.5$", allowing me to remove one more constant. So you get the following:

$f(x) = \frac{2}{\pi-2\cdot arctan(\frac{-B}{2})} \cdot (arctan(B(x-\frac{1}{2}))-arctan(\frac{-B}{2})) $

So, for example, here is a plot of the function with $B = 20$:

Looks a lot like your graph

2

Whenever you see something that rises from a flatline, as your graph does around $x=0$, you should summon $y=e^{-1/x^2}$ (defined to have $y=0$ when $x=0$). It is the ubiquitous example of a smooth, non-analytic function that manages to morph from all-derivatives-are-0 state to monotonically increasing.

In your case, luckily, the function as is indeed has $y=1$ as an asymptote so it's precisely what you're looking for. If you care about the values to the left of $x=0$ you can modify the function by decreeing it to be 0 when $x<0$. Miraculously, it is still perfectly smooth.

This image is of the full, unmodified function:

Graph of <span class=e^{-1/x^2} via Google Search.">