name this function Is there a function that has these properties?
Points:


*

*$f(1)=\tfrac{1}{2}$

*$f(-1)=-\tfrac{1}{2}$

*$f(0)=0$


Bounds: $f$ is bounded between $(-1,1)$:


*

*$\forall x\in\mathbb{R}: -1 < f(x) < 1$

*$\lim_{x\to \infty} f(x)=1$

*$\lim_{x\to -\infty} f(x)=-1$


Slopes: $f$ is strictly increasing for all $x\in\mathbb{R}$ and at $x=0$, $f'(x)=1$:
$$\frac{d}{dx}f(x)=\begin{cases}0<f'<1&:x<0\\1 &:x=0\\0<f'<1&:x>0 \end{cases}$$
Concavity:
$$\frac{d^2}{dx^2}f(x) = \begin{cases}>0 &:x<0\\ 0 &:x=0\\ <0 &:x>0 \end{cases}$$
Smoothness: $f$ is infinitely differentiable and every derivative is continuous (or perhaps uniformly continuous):
$$\forall n\in\mathbb{N} : \forall x\in\mathbb{R} : \exists y\in\mathbb{R} : f^{(n)}(x) = y$$

I've tried $\tanh(x)$, $\frac{2}{\pi}\arctan(x)$, $\text{erf}(x)$, and others, but all of them were missing at least one of the properties listed above. Is there one that satisfies ALL those properties? If so, prove it or show an example.
Below is a graph (in red) of the type of function I'm looking for. The derivative is in green and the 2nd derivative is in blue. (The function shown is $\arctan x$ so it's not exactly what I'm looking for.)

 A: $$f(x)=\begin{cases}1-\frac1{1+x}&\text{if $x\ge0$,}\\\frac1{1-x}-1&\text{if $x<0$.}\end{cases}$$

Well, the technically correct answer to the question "Is there a function that has these properties?" is simply "Yes. In fact, there are uncountably many." In principle, you can take any form of sigmoid function you like and tweak it to match all of your conditions. Here is one recipe. Say you have an odd function $s(x)$ satisfying
$$\begin{gather}
-\infty<\lim\limits_{y\to-\infty}s(y)\le s(x)\le\lim\limits_{y\to+\infty}s(y)<\infty,\\
s'(x)>0,\\
xs''(x)\le0
\end{gather}$$
for all $x$. Then $s_1(x)=s(x)/s'(0)$ has derivative $1$ at $x=0$, and so does $s_2(x)=s_1(ax)/a$ for any $a$. Pick $a$ so that $s_2(1)=s_1(a)/a=\frac12,$ which is always possible because $\lim\limits_{a\to0}s_1(a)/a=1$ and $\lim\limits_{a\to\infty}s_1(a)/a=0$. Finally, define $f(x)=s_2(x)$ for $\lvert x\rvert\le1$, and extend $f$ to approach the desired asymptotes $\pm 1$ as $x\to\pm\infty$. I'm not sure how high a degree of continuity we can guarantee at $x=\pm1$ while maintaining concavity; certainly we can get $C^1$ by letting $$f(x)=1-\frac1{2+b(x-1)}$$
over $x>1$, with $b$ chosen to match $s_2'(1)$, and similarly over $x<-1$; probably we can also get $C^2$ though I'm less sure about that.

Anyway, here's a completely different, explicit solution. We can think of my original suggestion as the odd $f$ such that $f(x)=1+a/(1+x)$ for $x\ge0$, which happens to match three of the conditions $f(0)=0$, $f(1)=\frac12$, $f'(0)=1$ for $a=1$. If we also want $f''(0)=0$ so that $f''$ is defined everywhere, then we do need four degrees of freedom, so let $f(x)=1+a/(1+x)+b/(1+x)^2+c/(1+x)^3+d/(1+x)^4$ for $x\ge0$. Then we get a solution $a=-2$, $b=4$, $c=-5$, $d=2$, which leads to
$$f(x)=\begin{cases}
\frac{x(x^3+2x^2+4x+1)}{(x+1)^4}&\text{if $x\ge0$},\\
-f(-x)&\text{if $x<0$}.
\end{cases}$$

A: Playing around with Mathematica led me to think the following might work:
$$f(x)=\left(\frac{2}{\pi }\right)^{1/3} \text{ArcTan}\left[\frac{\pi  x^3}{2 \left(1+\frac{1}{2} x^2 \text{Cot}\left[\frac{\pi }{16}\right] \left(\pi -2 \text{Tan}\left[\frac{\pi }{16}\right]\right)\right)}\right]^{1/3}.$$
A: Two additional answers occur to me (aside from a scale factor and shifting):


*

*The logistic function 
$\frac{1}{1+e^{-t}}$;
this is essentially the hyperbolic tangent
$\frac{e^t - e^{-t}}{e^t + e^{-t}}$.

*The cumulative normal distribution function
$\int_{-\infty}^x e^{-t^2} dt$
with appropriate scaling inside 
(probably with $-t^2/2$)
and outside
(something with $\sqrt{\pi}$).
Both of these look like the function you want.
