1

I was reading the Wikipedia article about Convex Functions 1. The article states that:

However, a function whose sublevel sets are convex sets may fail to be a convex function.

However, I have trouble imagining a function like this.

Can anyone provide an example of this situation?

2 Answers2

1

Take $f: \mathbb{R} \rightarrow \mathbb{R}$ given by $f(x)=1-e^{-x^2}$.

Math
  • 2,359
0

Any function who has convex level sets is quasiconvex, which is a weaker notion than convexity. As Victor Hugo pointed out, $f(x)=1-e^{x^2}$ is one such function which is quasiconvex, yet nonconvex.

This graph displays another example. The red function is the quasiconvex function $\min\{1,|\cdot|\}$, the black line shows the level, and the yellow line shows its level set. Since the level set is always an interval, the level set is convex, so our function is quasiconvex. However, this function is nonconvex due to its "kinks" appearing at $\pm 1$.

Zim
  • 4,318
  • Thank you! Especially that last example made it clear to me. – user3103241 Jun 06 '20 at 19:58
  • Just to be sure, I was asking about the sublevel set, right? If you take the sublevel set at level 1 in your second example, wouldn't that then be a non-convex sublevel set? – user3103241 Jun 06 '20 at 20:16
  • By a sublevel set at level $\xi\in\mathbb{R}$, you mean ${x\in\mathbb{R} ,|, f(x) \leq \xi}$, right? If $\xi=1$, then the sublevel set for that function would be equal to $\mathbb{R}$, which is also convex. I just had trouble coding that case in Desmos :) – Zim Jun 06 '20 at 20:22