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

1. ## 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.

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