Which function satisfies these constraints?

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} $$


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.


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} $$