# Any smoother version of the exponential function?

Often one needs to express some quantity of interest in a scale other than its original one.

One can use the exponential function to map $(-\infty,0)\to(0,1)$ and $(0,+\infty)\to(1,+\infty)$, but the first mapping is way more "brutal" than the second, with which I mean that $\exp$ compresses much more strongly $(-\infty,0)$ into $(0,1)$ than compresses $(0,+\infty)$ into $(1,+\infty)$. In that sense, $\exp$ is very unbalanced above and below 0.

Do any of you know a function that, likewise $\exp$, maps $(-\infty,+\infty)\to(0,+\infty)$ but a more balancedly for values above and below 0? I mean, that compresses negative values in the domain between 0 and some value less strongly and that expands positive values in the domain also less strongly?

It may be a dumb guess, but all I can think of is a sub-exponential function $$h(x)=\exp\left(sign(x)\cdot|x|^p\right)$$ for some $p\in(0,1)$, but it still compresses too strongly for $x\in(-\infty,0)$.

Can any of you think of something more effective or at least a little less clumsy?

Sorry by the informal approach to the question, but I still cannot formulate it in a proper way, and many thanks in advance.

• Well, you have not defined "compresses too strongly". Without a clear definition of what you mean, how can we tell if a given function 'compresses too strongly' or not? For example, why does the sub-exponential function 'compress too strongly'? Without a definition, there is nothing to say. – guest May 10 '16 at 22:39
• In a sense, if $(-\infty, 0)$ maps to a finite-length interval $(0, a)$ and $(0, +\infty)$ maps to the infinite-length interval $(a, +\infty)$, then the compression of negative values is always 'way more brutal'. In particular, any injective function (which will necessarily be monotone) will exhibit this kind of behavior, I'm not sure there's a satisfactory answer to this (loosely posed) question. – Fimpellizieri May 10 '16 at 22:49
• I forgot to mention that the $h$ I defined has an annoyingly unpleasant rough behavior for near 0. – Marcelo Ventura May 10 '16 at 22:50
• Do you want it to be unbounded above? It seems like that would be undesirable, as @Fimpellizieri pointed out. If not, then you can use something like $\arctan(x)$. – Ian May 10 '16 at 22:53
• Or simply $\frac{e^x}{1+e^x}$, the logistic transformation. That function ends up compressing equally above and below 0, which is nice. – Marcelo Ventura May 10 '16 at 22:55

$f(x) = \begin{cases} Ae^x &&x <-N \\ mx+C && -N\le x \le N\\Be^x && x>N \end{cases}$

There is uniform compression for the arbitrarily large interval $-N\le x \le N$.

Make appropriate choices of $A, B, C$ and $m$ so that the function is piecewise continuous.

• Thanks! It was simple and elegant. – Marcelo Ventura May 11 '16 at 1:43

If you are seeking a continuous bijective map $f: \mathbb R \to (0,\infty),$ then $f$ has to be strictly monotonic. Suppose WLOG $f$ is strictly increasing. Then $f$ "compresses" $(-\infty,0)$ to $(0,f(0)).$ So there's no hope of escaping the brutality of the situation.

You could try the modulus function $y=|x|$

This maps everything very uniformly with no "compression" anywhere.

It has the disadvantage of not being one-to-one, which is a property that I expect you would like to have...

• Also, the range is $[0,\infty),$ not $(0,\infty).$ – zhw. May 10 '16 at 23:15
• @zhw. Thanks. I hadn't spotted that. Can I downvote myself? – tomi May 10 '16 at 23:52
• Lol, I did that once on an answer of mine. No, I don't think you should. – zhw. May 11 '16 at 0:03