TITLE: Function with no roots
QUESTION [28 upvotes]: Given a non-constant function $f(x)$, is it possible for it to have no zeroes (neither real nor complex)?  Say for example, $f(x)=\cos x-2$, does a complex solution exist for this because for real $x$, $\cos x$ belongs to $[-1, 1]$? Or, say $f(x)=e^x$, does a complex zero exist for this because $e^x \gt0$ for real $x$?

REPLY [2 votes]: The $f(x)>0$ for real $x$ condition is mostly irrelevant. 
If a continuous function $f(x)$ with no real roots is defined on the whole real line, then it necessarily must satisfy $f(x) >0$ for all real $x$ or $f(x)<0$ for all real $x$, as otherwise it would have a real root by the intermediate value theorem. However, this doesn't imply that it had no complex roots. As an example, $x^2 +1>0$ for all real $x$, but it has the complex roots $\{i,-i\}$. But $e^x$, as commenters have pointed out, is also positive for all real $x$ and has no complex roots. 
And if a function is not continuous or not defined on the whole real line, it may not satisfy that condition and yet have no complex roots. For instance, $\frac{1}{x}$ takes on both positive and negative real values, but had no roots anywhere in the complex plane (but it has a pole at 0, so the intermediate valid theorem doesn't hold).