# Proving that max{0,f(x)} is convex if f is convex

• Nov 5th 2009, 05:16 AM
FOLOW11
Proving that max{0,f(x)} is convex if f is convex
Hi,

I am trying to prove the above argument and have this thus far:

Assume f(ax+(1-a)y)>=0. Then

max{0,f(ax+(1-a)y)}=f(ax+(1-a)y)<=af(x)+(1-a)f(y) since f is convex

I now need f(x)>=0 and f(y)>=0 so that

af(x)+(1-a)f(y)=amax{0,f(x)}+(1-a)max(0,f(y)}

but I don't know how to show that f(x)>=0 and f(y)>=0.

• Nov 5th 2009, 06:16 AM
Enrique2
Quote:

Originally Posted by FOLOW11
Hi,

I am trying to prove the above argument and have this thus far:

Assume f(ax+(1-a)y)>=0. Then

max{0,f(ax+(1-a)y)}=f(ax+(1-a)y)<=af(x)+(1-a)f(y) since f is convex

I now need f(x)>=0 and f(y)>=0 so that

af(x)+(1-a)f(y)=amax{0,f(x)}+(1-a)max(0,f(y)}

but I don't know how to show that f(x)>=0 and f(y)>=0.

You only need to use $f(x)\leq max\{0,f(x)\}$ for all $x$, and apply this to the inequality that you have already got. If $f(ax+(1-a)y) <0$ then clearly 0=max{0,f(ax+(1-a)y)} is smaller or equal than the convex combination of two positive or 0 numbers.