Proving $f$ is not surjective Given the function $f: \mathbb R \mapsto \mathbb R, f(x) = 2e^x + 3x^2 - 2x + 5,$ I am asked to show that it is not surjective. My book goes about it like this:

$f(x) = 2e^x + x^2 - 2x + 1 + 2x^2 + 4 = f(x) = 2e^x + (x-1)^2  + 2x^2 + 4$
  $f(x) > 0 \implies$ not surjective

Prior to seeing how the book authors solved this, I tried my own solution by using limits:

$\lim_{x\to\infty}f(x) = \infty$ and $\lim_{x\to-\infty}f(x) = \infty \implies f$ not surjective

Is my solution also correct? 
 A: Your proof works for continuous functions though.
Since the limit for x to plus or minus infinity are both infinity there must be some N such that f(x) and f(-x) are positive for all x>N. Now notice that since f is continuous, the compact interval [-N,N] gets mapped to some compact subset of R. So concludingly the image of f must be a subset of the positive reals union some compact set, which can not be all of R. So f is not surjective.
A: HINT $\ \log\: |x|\: \to\: \infty\ $ as $\ x \:\to\: \pm\infty\ $ but it is surjective.  

A: Your proof is incorrect/incomplete.
Consider 
$f(x) = \begin{cases} 
\tan x, \ \ x \in (-\pi/2, \pi/2) \\
x^2, \ \  x \in \mathbb{R} - (-\pi/2,\pi/2) \end{cases}$
Note: As user11751 points out, if we assume $f$ is continuous (which is true for your function), then it is indeed true that the fact that the limits are both $\infty$ implies that $f$ is not surjective.
A: The function $f(x) = 2e^x + 3x^2 - 2x + 5$ is naturally thought of as a sum of two functions $f_1(x) = 2 e^x$ and $f_2(x) = 3x^2 - 2x + 5$. If we look at $f_1$ and $f_2$ separately, we see that they fail to be surjective "for the same reason": there exist real numbers $M_1$ and $M_2$ such that $f_1(x) \geq M_1$ for all $x$ and $f_2(x) \geq M_2$ for all $x$.  
In the case of $f_1$, it is clear that we may take $M_1 = 0$.  In the case of $f_2$, this is a well-known property of quadratic functions with positive leading coefficient, which we could prove by completing the square.  But we could also prove it in other ways: e.g. $f_2$ is a differentiable function with a unique critical point, which is a minimum: $f_2'(x) = 6x - 2$, so the critical point is at $x_0 = \frac{1}{3}$ and it has $f_2'(x) < 0$ for $x < x_0$ and $f_2'(x) > 0$ for $x > x_0$.  Therefore it has a global minimum at $x_0$.  Or, following the idea of the OP (which is a good idea), $f_2$ is a continuous function approaching $\infty$ as $x \rightarrow \pm \infty$, so it must have a global minimum.  
Finally, of course, if $f(x) = f_1(x)$ is such that $f_1(x) \geq M_1$ for all $x$ and $f_2(x) \geq M_2$ for all $x$, then $f(x) \geq M_1 + M_2$ for all $x$, so $f$ is not surjective.  
The preceding considerations are clearly applicable to other functions as well.  The text solution, which consists of pure algebraic manipulation, lacks a clear moral and as such seems in danger of being quickly forgotten.
