Prove or disprove: convex function $f:[a,b] \to \mathbb{R}$ attains a minimum value on $[a,b]$ 
Let $f:[a,b] \to \mathbb{R}$ be a convex function. Prove or disprove: $f$ attains a minimum value on $[a,b].$

Attempt. I believe the answer is yes. We know:  If $f:I\to \mathbb{R}$ is convex and interval $I$ is bounded, prove that $f$ is bounded below.
where it was proven that $$2f\left(\frac{a+b}{2}\right)-\max\{f(a),f(b)\}$$ works as a lower bound for $f$. At first sight this does not seem to be a value of $f$. Can we improve this result, in order to find a lower bound being a value of $f$ on $[a,b]$?
Thanks in advance!
 A: Even though you're trying to prove the statement, it's still profitable to start by searching for a counterexample. Think about what could go wrong, and keep trying to trap the counterexample into a corner until you've either ruled it out or found it.
We know that $f$ is continuous on the open sub-interval $(a,b)$. So if you define a smoothed function $g:[a,b]\to\mathbb R$ by $g(a)=\lim_{x\to a}f(x)$, $g(b)=\lim_{x\to b}f(x)$, and $g(x)=f(x)$ for $a<x<b$, then $g$ is a continuous function on $[a,b]$. By the extreme value theorem, $g$ does attain a minimum.
If the argmin of $g$ is in $(a,b)$, then $f$ attains a minimum as well: either at the same place, or at $a$ or $b$. So the only remaining way to find a counterexample to the claim must take this form, without loss of generality:


*

*Define a continuous $g:[0,1]\to\mathbb R$ which has a unique minimum at $0$.

*Define $f$ by starting with $g$ and screwing around with $f(0)$.


Now your goal is either to prove that that's impossible -- no matter what happens to $f(0)$, as long as it's convex, $f$ still attains a minimum -- or to provide a counterexample of that form.
A: $[0,1]$ is compact, so you know that the result holds if $f$ is continuous there. So, if there is a counterexample, then $f$ can't be continuous on $[0,1].$ Following the hint in the other answer, we need to "screw around" somewhere on $[0,1].$ The easiest starting point is one of the endpoints, say $x=0$. Now, the standard example of a convex function that has no minimum on $\mathbb R$ is $f(x)=e^x$, but if we restrict $f$ to $[0,1]$, then it does. On the other hand, the convexity of $f$ is not affected if we define a new function
$ g(x) = \begin{cases}
                e^x & 0<x\le 1,\\
                 2 & x=0.
                    \end{cases}$
so $g$ is convex but does not attain a minimum on $[0,1]$.
