functions with the properties: $f(x) \rightarrow x$ when $x\rightarrow 0$ and $f(x) \rightarrow \frac{1}{x}$ when $x \rightarrow \infty$ I want to find some functions which have both the following asymptotic behaviors:
$f(x) \rightarrow x$ when $x\rightarrow 0$  and $f(x) \rightarrow \frac{1}{x}$ when $x\rightarrow \infty$. I know that $f(x)=\frac{x}{x^2+1}$ has these properties. Are there other functions? Certainly, the simpler the function, the better it is.
 A: I would say the simplest (although not necessarily the one with the shortest description) is
$$f(x) = \cases{x & if $x<1$\\\frac1x & if $x\geq 1$}$$
If you don't like the explicitly piecewise nature, we could describe it as $f(x) = \min(x, 1/x)$, or use absolute values to write
$$
f(x) =  \frac12\left(\frac1{x} + x +\left(1 + x\right)\left|\frac1x-1\right|\right)
$$
A: Another pretty simple function is
$$
\frac{\tanh^2(x)}x
$$
A: I know you didn't want piecewise defined function, but oh well, let me write it anyway.
We can look at the functions that satisfy $f(\frac 1x) = f(x)$, $f(0) = 0$ and $f'(0) = 1$, and they will satisfy your conditions. Thus, find (smooth enough) function $f$ defined on $[0,1]$ such that $f'(0) = 1$ and define
$$g(x) = 
\begin{cases} 
f(x),& x\leq 1\\
f(\frac 1x),& x>1
\end{cases}$$
There will be no trouble with continuity, but there will be with smoothness. At least it is easy to get $g$ to be twice differentiable, all we have to demand is $f'(1) = 0$ (note: we will think of derivative at $1$ as appropriate one-sided derivative).
How are we going to do this? Well, as I said, let $f$ be smooth enough, that is $C^k$ for some $k$ you want. Let $h(x) = \frac 1x$.
So, we have $(f\circ h)'(x) = f'(h(x))h'(x)$, i.e. $(f\circ h)'(1) =-f'(1).$ Thus, $g'(x)$ is well-defined iff $f'(1) = 0$. Furthermore, $$(f\circ h)''(x) = f''(h(x))(h'(x))^2+f'(h(x))h''(x)$$ and $$(f\circ h)''(1) = f''(1)+2f'(1) = f''(1),$$ so $g''(x)$ is automatically well defined.
Example of such a function is when we let $f(x) = \frac 2\pi\sin(\frac\pi 2 x).$

Also, your example works as well, for $f(x) = \frac{x}{1+x^2}$ we have $f(x) = f(\frac 1x)$, $f'(0)=1$ and $f'(1) = 0$.
Now, as I said, smoothness in general is a bit harder. Let us use Faà di Bruno's formula:
$$(f\circ h)^{(n)}(x) = \sum_{k=1}^nf^{(k)}(x)B_{n,k}(h'(x),\ldots, h^{(n-k+1)}(x)).$$
If we define $a_n = f^{(n)}(1)$, and $b_{n,k} = B_{n,k}(-1,2,\ldots,(-1)^{n-k+1}(n-k+1)!)$, then if we want $g$ to be $m$ times differentiable, we need to have
$$a_n = \sum_{k=1}^na_kb_{n,k},\ \forall n\leq m.$$
For example, for $m = 4$, we would get the following:
\begin{align}
a_1 &= -a_1\\
a_2 &= 2a_1+a_2\\
a_3 &= -6a_1-6a_2-a_3\\
a_4 &= 24a_1+36a_2+12a_3+a_4
\end{align}
and if you look careful enough, you will see that there is some arbitrariness allowed, for example if we let $a_1 = 0$ and $ a_3 = -3a_2$, we can choose $a_2$ and $a_4$ to be whatever we want. Thus, any polynomial $f(x) = a_0 + \frac{a_2}{2!}(x-1)^2-\frac{3a_2}{3!}(x-1)^3+\frac{a_4}{4!}(x-1)^4$ will satisfy the above. Now, remember that we also want $f(0) = 0$ and $f'(0) = 1$, which gives us conditions: $$a_4 = -15a_2-6,\ a_0 =\frac{2-3a_2}{8}.$$ Putting these together, we get polynomials $f_a(x) = x-\frac{7a+6}4x^2+(2a+1)x^3-\frac{5a+2}{8}x^4.$ Here are corresponding graphs for few parameters:

Simpler example using the same method is $f(x)=x-\frac 12x^2.$
Returning to your function, as Mundron Schmidt suggested, it is probably the simplest of the kind I discuss here. But, if you are so inclined, you can use this to find families of polynomials of arbitrary degree and get corresponding $g$'s that are differentiable as many times as is the degree of polyomial generating it. Theoretically, you can even get as much as analytical functions of this type as you want, if you could solve given recursion. But my guess is that along the way, you would have to make choices for countably many $a_k$'s.
