How to show $f(x) = \sqrt{x}$ is not convex using the definition of convexity?

520 Views Asked by At

Using the definition of convexity

$$f(\lambda x + (1−\lambda)y) \leq \lambda f(x) + (1−\lambda) f(y)$$

I would try to cause this inequality to fail.

$$\sqrt{(\lambda x + (1-\lambda)y)} \leq \lambda \sqrt{x} + (1-\lambda) \sqrt{y}$$

And from here I have tried many different values of $x$, $y$ and $\lambda$ but cannot get the inequality to fail. I tried $x=2$ and $y=2$, $x=1$ and $y=4$, $\lambda=1/2$ and plugged different values in to see if anything worked.

4

There are 4 best solutions below

1
On

You can use the inequality $(a-b)^2\ge 0\iff a^2+b^2\ge 2ab$

For $0\le x<y$, this gives you $x+y > 2\sqrt{xy}$

Now add $x+y$ each side to get $2x+2y > x+2\sqrt{xy}+y\iff 4\left(\dfrac{x+y}2\right) > (\sqrt{x}+\sqrt{y})^2$

Take the square root to get the result $\sqrt{\dfrac{x+y}2} > \dfrac{\sqrt{x}+\sqrt{y}}2$ which contradicts convexity relation for $\lambda=\frac 12$.

0
On

f(0)=0.

f(1)=1.

On the line connecting them, line(1/4) = 1/4. However, f(1/4)=1/2.

Let x= 0, y=1, and $\lambda$=3/4. See that the inequality is not satisfied.

0
On

You want to show that $f(cx+(1−c)y)≤cf(x)+(1−c)f(y) $ is false for $f(x) = \sqrt{x} $.

The simplest case is $c = \frac12$ where this becomes $f((x+y)/2)≤(f(x)+f(y))/2 $.

Putting $f(x) = \sqrt{x}$, this is $\sqrt{(x+y)/2}≤(\sqrt{x}+\sqrt{y})/2 $.

Squaring both sides, this is $(x+y)/2 \le \frac14(x+y+2\sqrt{xy}) $ or $(x+y)/4 \le \frac12\sqrt{xy} $ or $(x-2\sqrt{xy}+y)/4 \le 0 $ or $(\sqrt{x}-\sqrt{y})^2/4 \le 0 $ and this is true only when $x = y$.

Therefore, the inequality is false for $x \ne y$.

0
On

So long as $x \ne y$ all your examples should have worked.

Your example of $x=1,y=4$ and $\lambda = \frac 12$ should have resulted in

$\sqrt {\lambda x + (1-\lambda)y}=\sqrt{\frac 12 *1 + \frac 12*4}=\sqrt{\frac 52}$.

While $\lambda \sqrt x + (1-\lambda)\sqrt y = \frac 12 \sqrt 1 + \frac 12\sqrt 4 = \frac 32$.

And as $\frac 32 =\sqrt{\frac 94} <\sqrt{\frac{10}4}= \sqrt{\frac 52}$.

This equation fails.

....

In general $\sqrt{\lambda x + (1-\lambda)y}^2 =\lambda x+ (1-\lambda) y$

whereas $(\lambda \sqrt x+ (1-\lambda)\sqrt y)^2=\lambda^2 x + (1-\lambda)^2y + \lambda(1-\lambda)\sqrt {xy}$

And by AM-GM

$\lambda^2 x + (1-\lambda)^2y + \lambda(1-\lambda)\sqrt {xy}<\lambda^2 x + (1-\lambda)^2y + \lambda(1-\lambda)\frac {x+y}2=$

$(\lambda^2+\frac {\lambda(1-\lambda)}2)x + ((1-\lambda)^2+\frac {\lambda(1-\lambda)}2)y=$

$\frac {\lambda^2+ \lambda}2x+\frac {(1-\lambda)^2+ (1-\lambda)}2y$

And if $0 < \lambda < 1$ then $0 < 1-\lambda < 1$ and so $\lambda^2 < \lambda$ and $(1-\lambda)^2 < 1-\lambda$ and so

$\frac {\lambda^2+ \lambda}2x+\frac {(1-\lambda)^2+ (1-\lambda)}2y< \frac {\lambda+ \lambda}2x+\frac {(1-\lambda)+ (1-\lambda)}2y= \lambda x + (1-\lambda)y$

So the convex inequality always fails if $x \ne y$ and $0 < \lambda < 1$.