2

The following is a well known assertion in the convex function topic:

If $f:\mathbb{R}\to\mathbb{R}$ is a real function then it is convex and concave function simultaneously if and only if it is an affine function.

I did a proof for it as follows and I think something went wrong. (e.g., in case (2)). Any idea that can help me? Thanks.

Assume that $f$ is both a convex and concave function then we have‎

$f(‎\lambda ‎x+(1-‎\lambda ‎y‎)‎)=‎\lambda ‎f(x)+(1-‎\lambda‎)f(y)\;;\;\;x,y\in‎\mathbb{R},\; 0\leq‎\lambda‎\leq1.‎$‎‎

So ‎we ‎have ‎:‎‎case (1) ‎$‎0\leq x‎\leq1‎‎‎‎$‎‎

$f(x)=f(x‎‎\times1+(1-x)‎\times0)=xf(1)+(1-x)(f(0))=x(f(1)-f(0))+f(0)‎$‎‎‎‎

Also case (2) ‎$‎‎x>1$‎‎

‎ ‎$f(‎\frac{1}{x}‎)=f(‎\frac{1}{x}‎‎\times1+(1-‎\frac{1}{x})‎\times0)=‎\frac{1}{x}f(1)+(1-‎\frac{1}{x})(f(0))=‎\frac{1}{x}(f(1)-f(0))+f(0)‎$‎‎‎‎‎

Now to achieve the goal it suffices to put $‎‎A=(f(1)-f(0))$ ‎and ‎‎$‎‎B=f(0)$‎. Then ‎$‎‎f(x)=Ax+B$ ‎.‎

  • 1
    I do not see why you need to consider two cases for $x$. – GReyes Mar 18 '19 at 06:11
  • @ GReyes, when we have case (1), we can use $x$ same as $\lambda$, but in other case we can not do this – soodehMehboodi Mar 18 '19 at 06:18
  • @ GReyes, Even I think that I should consider also the third case (when $x$ is negative.) – soodehMehboodi Mar 18 '19 at 06:22
  • I see. I am pretty convinced there has to be a simpler way. – GReyes Mar 18 '19 at 06:25
  • 2
    I agree with your proof. As for the case $x<0$, I had this idea: Take $\lambda=1/2$ and $y=-x$ with $x>0$. Then you get $f(x)+f(-x)=2f(0)$ which implies $f(-x)=-f(x)+2f(0)$. Now you can use your formula for $x>0$ and convince yourself that it is the same affine function. – GReyes Mar 18 '19 at 06:30
  • @ GReyes, In case (2) we have $f(\frac{1}{x})$ but we need to show that $f(x)$ is affine and this is my doubt. – soodehMehboodi Mar 18 '19 at 06:38
  • 2
    For any $y\ge 1$, you can write $y=1/x$ for some $x\in(0,1]$ and use it as your $\lambda$, just as you did. You conclude that $f(y)=y(f(1)-f(0))+f(0)$ so your function is the same affine function you found for $0\le x\le 1$. In this way, you have proved that your function is a unique affine function for any value $\ge 0$. – GReyes Mar 18 '19 at 06:42
  • @ GReyes, For example if $y=5=\frac{1}{\frac{1}{5}}$ then we have $f(5)=f(\frac{1}{\frac{1}{5}})$ but $ \frac{1}{\frac{1}{5}}$ dos not hold in case (1) – soodehMehboodi Mar 18 '19 at 11:59
  • @ GReyes, In fact, we have computed $f(\frac{1}{x})$ not $f(x)$ and proof for $x>1$ is still remained. – soodehMehboodi Mar 18 '19 at 12:06
  • @ GReyes, please see https://math.stackexchange.com/questions/104810/how-to-prove-convexconcave-affine?r=SearchResults – soodehMehboodi Mar 18 '19 at 12:32
  • Call $y=1/x$. When $x\in(0,1]$, $y$ takes all values in $[1,\infty)$ and you have proved that $f(y)=y(f(1)-f(0))+f(0)$ which is an affine function of $y$. I do not see the problem here. – GReyes Mar 18 '19 at 16:50
  • I understand now.. I had in mind supinf proof. Did not realize you had something different. To get the formula for $x\ge 1$ you use your condition with $\lambda=1/x$. – GReyes Mar 18 '19 at 19:05

1 Answers1

1

Case (1) looks good and you have already found what the affine function will look like.

But your proof for case (2) is not sufficient in my opinion.

In case (2) you want to prove a statement about $f(x)$ for $x>1$. Yet nowhere in your equation in case (2) does such a term appear.

The general idea (similar to what you tried) is to use $y=0, \lambda = 1/x$. Then you have $$ f(1) = f( \lambda x + (1-\lambda)0) = \lambda f(x) + (1-\lambda) f(0) = \frac1x f(x) + (1-\frac1x) f(0). $$ If you then multiply by $x$ then you can get to the desired form $f(x)=Ax+B$.

You also need a case (3), which considers the case $x<0$. As pointed out in the comments, this can be done with taking $\lambda= 1/2$ and $y=-x$ and then using the formula from case (1) and case (2).

supinf
  • 13,593