The following function is convex or concave?

44 Views Asked by At

I have a function $f(x)=max(0,g(x))$ where $g(x)$ is a concave function. I want to know whether $f(x)$ is concave function or not?

2

There are 2 best solutions below

0
On

This function is convex iff $g(x)<0\quad \forall x \in (-\infty, \infty)$. In which case it is $f(x)=0$. Which is just on the edge of convex and concave.

0
On

Typically neither concave nor convex. For example

enter image description here

but there are special cases

  • if $g(x)$ is never positive (as Piyush Divyanakar said) or if $g(x)$ is constant (as ajotatxe commented) then it can be weakly both
  • if $g(x)$ is of the form $ax+b$ then it can be weakly convex