(Solved):
2. Given a function \( f: \mathbb{R}^{n} \rightarrow \mathbb{R} \) and \( k \in \mathbb{R} \), def ...
2. Given a function \( f: \mathbb{R}^{n} \rightarrow \mathbb{R} \) and \( k \in \mathbb{R} \), define the level set of \( f \) as the set \( H=\left\{x \in \mathbb{R}^{n}: f(x) \leq k\right\} \). Are the following examples true or not (give a proof or a counterexample) - If a function is convex, then all its level sets (that is, for any value of \( k \) ) are convex. - If all the level sets of \( f \) are convex (that is, for any value of \( k \) ), then \( f \) is a convex function.