Prove that $f:\mathbb{R}\to\mathbb{R}$ is an affine function.

271 Views Asked by At

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

There are 1 best solutions below

0
On BEST ANSWER

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).