# Is $(f-g)(x)$ concave when $f,g$ are positive valued concave functions and $f\ge g$.

Let $f$ is positive-valued concave function and $g$ is another positive-valued concave function, such that $f:\mathbb{R}_+ \mapsto \mathbb{R}_+$ and $g:\mathbb{R}_+ \mapsto \mathbb{R}_+$. Additionally, $f\ge g$ over all domain $\mathbb{R}_+$.

Do their difference $f-g$ is concave function too?

This question is different from this.

No, let $f(x) = 1-e^{-x}$ and $g(x) = 1 - e^{-x/2}$.

• I have edited a question. When it is sure that their difference is always positive too.
– kaka
Commented Dec 6, 2016 at 6:33
• @kaka Let $f(x) = \sqrt{x}$ and $g(x) = \frac{1}{2} + \frac{1}{4}\log x$. Commented Dec 6, 2016 at 6:42
• $(f-g)(x+0.5)$ is concave.
– kaka
Commented Dec 6, 2016 at 6:52
• It is not clear what you are asking for. The original question asked if the difference of two concave functions is concave, the counterexample shows this is not true in general. Commented Dec 6, 2016 at 6:55

No. Take:

$f(x)=1-2^{-x}$

$g(x)=\frac x2,\ x\in[0,1]$ and $g(x)=f(x),\ x\in(1,+\infty)$

I was trying to find out necessary conditions for it to be true. I was wondering about $$f>g$$. In fact, a slight modification of the above counter-example is sufficient to get another counter-example for the case $$f>g$$.

I came up with another counter-example. In fact the difference between two concave functions such that $$f>g$$ can be convex. Let $$f$$ be defined over $$\mathbb{R}$$, $$f(x)= \left\{ \begin{array}{l} -\vert x \vert^3 \quad\text{if}\quad x\in [-0.25,0.25] \\ -3/16\vert x\vert +1/32 \quad\text{else}, \end{array} \right.$$ and $$g(x)= -x^2$$. Then $$f$$ and $$g$$ are concave and $$f>g$$ but $$h = f-g$$ is convex. You can see an illustration below. I have also illustrated the counter-examples given by Erik M and GLay.