In my notebook I have 2 consecutive exercises where the second one uses the result from the first one. The first one is the following:
(Ex1) Suppose that $f\in C^2(a,b)$ and $f\in C^1([a,b])$. Show that if $f{''}(x)\geq 0$ on $[a,b]$ then $f$ is convex on $[a,b]$.
And the second exercise is the following:
(Ex2) Using the result from the previous exercise, show that $t\to |t|^p$ is convex on $\mathbb{R}$ for all $p\in [1,\infty)$.
The following is the answer to the second exercise (assume without the proof that Ex1 is correct):
For $t\geq 0$ we have $f(t):=|t|^q=t^q$. This is twice differentiable, with $f^{''}(t)=q(q-1)t^{q-2}\geq 0$ on $[,\infty)$, so $f$ is convex on $[0,\infty)$. A similar argument shows that $f$ is convex on $(-\infty,0]$
This is what I did, and I thought that this was enough to prove that $f$ is convex. But the answer continues with the following:
So it only remains to check the required convexity inequality if $x<0$ and $y>0$, and then using convexity on $[0,\infty)$,
$$|tx+(1-t)y|q\leq |t|x|+(q-t)|y||^q\leq t|x|^q+(1-t)|y|^q$$
I'm not sure first of all, why is this needed. I am aware of the definition of a convex function, which is if $f(tx+(1-t)y)\leq tf(x)+(1-t)f(y)$ for all $t\in (0,1)$. Why would we show this if from exercise 1 we proved that if the function has the above stated properties, then it is convex?
