# Which function satisfies these constraints?

What is the simplest monotone increasing, continuous function that satisfies these constraints?

\begin{align} \frac{f(x)}{f(-x)} &= e^x \\ \lim_{x\to\infty} \frac{f(x)}{x} &= 1 \end{align}

I guess this implies that \begin{align} \lim_{x\to-\infty} \frac{f(x)}{-xe^{x}} &= 1? \end{align}

• Hm, define "simplest" please. Sep 2, 2016 at 23:15
• @SimpleArt I only added that adjective because I realize that there are infinitely many such functions, and I don't actually need all of them. I just want a "simple function" in the sense that I can evaluate it efficiently in a computer program. Sep 2, 2016 at 23:16
• Repeated applications of L'Hospital's rule yields $$\lim_{x\to-\infty}\frac{f^{(n)}(x)}{-(x+n)e^x}=1$$which may be of use. Sep 2, 2016 at 23:18
• $$\frac{f(x)}{f(-x)}=e^x$$ $$\implies\left(\frac{f(x)}{f(-x)}\right)^a=\left(e^x\right)^a=e^{ax}=\frac{f(ax)}{f(-ax)}$$ $$\left(\frac{f(x)}{f(-x)}\right)^a=\frac{f(ax)}{f(-ax)}$$ Sep 2, 2016 at 23:22
• $x + 1$ for $x > 0$, $(1 - x) / e^{-x}$ for $x < 0$ is pretty simple.
– user296602
Sep 2, 2016 at 23:23

Differentiating $f(-x) = f(x) \exp(-x)$, we have $-f'(-x) = (f'(x) - f(x)) \exp(-x)$. If $f$ is to be monotone increasing we'll need this to be nonpositive, so $f'(x) - f(x) \le 0$. You could take

$$f(x) = \cases{1 + x & for x \ge 0\cr (1-x) \exp(x) & for x < 0\cr}$$

EDIT: But there is an analytic solution, namely

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

• Another question would be to prove that no such function can be analytic. Sep 2, 2016 at 23:29
• @MarkFischler ... but not a correct question. Sep 3, 2016 at 0:01
– robjohn
Sep 3, 2016 at 1:57

Lots of functions work, e.g.

$$f(x) = \left\{\begin{array}{cc} x + 1 & x \ge 0 \\ e^x ({1 - x}) & x < 0\end{array}\right.$$

I came up with this in two steps:

• Hoped that $f(x) = x$ for positive $x$ works. It doesn't, because it's zero at zero.

• Fix this by adding $1$, or any positive number to it.

• (Promoting my comment to an answer at the request of the asker)
– user296602
Sep 2, 2016 at 23:26
• I like these two steps. +1 Sep 2, 2016 at 23:34

The odd part of $\log(f(x))$ is \begin{align} \frac12\left(\vphantom{\frac12}\log(f(x))-\log(f(-x))\right) &=\frac12\log\left(\frac{f(x)}{f(-x)}\right)\\ &=\frac x2 \end{align} Therefore, $f(x)=e^{\frac x2+g(x)}$ where $g(x)$ is an even function.

We also want $\lim\limits_{x\to\infty}\left(\frac x2+g(x)-\log(x)\right)=0$. Thus, let $g(x)=\log\left(\frac{x/2}{\sinh(x/2)}\right)$ and get \begin{align} f(x) &=\frac{x/2\,e^{x/2}}{\sinh(x/2)}\\[6pt] &=\frac x2\left(1+\coth\left(\frac x2\right)\right) \end{align}

• Unfortunately, this is not monotone increasing? Sep 3, 2016 at 0:13
• I fixed $g(x)$. It should now be monotonic.
– robjohn
Sep 3, 2016 at 1:10
• this is very interesting Sep 3, 2016 at 2:23
• @NeilG: as I commented on Robert Israel's answer, this turns out to be the same as his analytic answer.
– robjohn
Sep 3, 2016 at 2:26
• @NeilG: $\frac{x\,e^x}{\operatorname{expm1}(x)}$ may work better.
– robjohn
Sep 3, 2016 at 4:04

$f(x)=e^{x}(-x+1)$ when $x<0$ and $f(x)=x+1$ when $x\geq 0$.