Theorem:
If $f(x)$, which is continuous and non-constant on $(a,b)$, does not have a global minimum in $(a,b)$ then if the limits exist we have :
$\lim_{x\to a} f(x) < f(y)$ for every $a<y<b$, or
$\lim_{x\to b} f(x) < f(y)$ for every $a<y<b$.
The theorem seems easy to understand but extremely difficult to prove.
What you can do is take a minimizing sequence, that is to say a sequence $x_n\in (a, b)$ such that \begin{equation} \lim_{n\to \infty} f(x_n) = \inf_{x\in (a,b)} f(x) \end{equation} The condition on $f$ not having a global minimum implies that $x_n$ cannot have a limit point in $(a,b)$. Hence the only possible limit points of $x_n$ are $a$ and $b$. Upon extracting a subsequence you can conclude that there exists a minimizing sequence converging either to $a$ or $b$.
You can also summarize this in the following equality \begin{equation} \inf_{x\in(a,b)}f(x) = \min(\liminf_{x\to a^+} f(x), \liminf_{x\to b^-}f(x)) \end{equation}