[Math] show that function is not convex

convex-analysis

I've never had to do this before, so I'm not really sure how to do it. These problems also don't even really relate to what the subject of the book is as well.

Given: $f(px+(1-p)y)\le pf(x)+(1-p)f(y)$

Consider the function

$f(x)\left\{ \begin{array}{cc}
x & x\le1\\
2-x & x>1\end{array}\right\} $

Show that $f(x)$ is convex on $-\infty < x \le 1$ and convex on $1 < x < \infty$ but not convex on $-\infty < x < \infty$

Another problem using the same convex definition:

Suppose $f(x)$ is defined on the interval I. If $x_{1}<x_{2}<x_{3}$ are in I and $f(x_{1})<f(x_{2})$ and $f(x_{3})<f(x_{2})$, then show that $f(x)$ is not convex on I.

Thanks

Edit: Im not sure how to use the definition. Thats kind of where i am stuck. I'm sure it's easy, but like i said i've never seen this before, the book has nothing to do with this, it's just randomly thrown in here. There are no examples for this either.

Best Answer

If you look at the definition geometrically (on $\mathbb{R}$) it states that a function is convex if each point of the graph $(x, f(x))$ is below any line that adjoins graph points $(a, f(a))$ and $(b, f(b))$ where $a<x<b$. In other words, for any ordered triple $a<x<b$ the point $(x,f(x))$ is below the lint through $(a,f(a))$ and $(b,f(b))$.

Now think about the graph of your function - look at $x<1$... look at $x>1$... look at $x=1$...

Related Question