$\epsilon-\delta$ argument on a polynomial of order 3 let $f(x)=x^3-2x^2+4x+2$. show $\lim_{x\rightarrow1}f(x)=5$ using $\epsilon-\delta$ argument.
my attempt: to show the limit, for all $\epsilon>0$, I need to find $\delta>0$ s.t. $|x-1|<\delta$ implies $|f(x)-5|<\epsilon$.
now by observing $f(x)-5=x^3-2x^2+4x-3=(x-1)(x^2-x+3)$, we get
$|f(x)-5|=|x-1||x^2-x+3|\leq|x-1|(|x^2-x|+|3|)$ by triangle inequality
$<\delta(|x|\delta+3)$.
and since $|x|<|x-1|+1$ by triangle inequality,
$\delta(|x|\delta+3)<\delta((\delta+1)\delta+3)=\delta(\delta^2+\delta+3).$
so, I need the condition on $\delta$ s.t. $\delta(\delta^2+\delta+3)<\epsilon$, which means I need to solve this inequality for $\delta$, and here is where I stuck. how to proceed from here? and is my attempt correct?
 A: The procedure which you have applied is wrong, but somehow most students try to use a similar procedure. This is precisely why such $\epsilon, \delta$ exercises are pointless. And it is much better to understand and appreciate proofs of limit laws provided in textbooks so that the proper mechanism of $\epsilon, \delta$ gymnastics is understood clearly. The definition of limit does not require you to solve inequalities so that you can find $\delta$ in terms of $\epsilon$. Analysis has to be treated very differently from algebraic manipulation of symbols via $+, -, \times, /$.
Let an $\epsilon>0$ be given. Once it is given, it has to be treated as a constant in what follows. Next we have $f(x) =x^{3}-2x^{2}+4x+2$ and we have to show that $\lim_{x\to 1}f(x)=5$. Our starting point is the inequality $|f(x) - 5|<\epsilon$ which has to be treated as some kind of a goal or an objective. We have to ensure that this goal is achieved by constraining the values of $x$ in a specific manner. To do so we analyze the expression $|f(x) - 5|$ which you have done correctly as $$|f(x) - 5|=|x-1||x^{2}-x+3|$$ and this whole expression needs to be smaller than $\epsilon$.
The right strategy is to choose an expression say $g(x) $ which is greater than the above expression $|f(x) - 5|$ and then just ensure that $g(x) <\epsilon$. Also note that all this game is played out with the constraint that $x\to 1$. So we just need to deal with values $x$ near $1$. We thus stipulate that $0<x<2$. This kind of constraint on $x$ is arbitrary and we could have chosen $1/2<x<3/2$ and in general we have to choose a constraint of the form $|x-1|<K$ where $K$ is not symbolic, but rather explicit like $1,2$. With $0<x<2$ we have $|x-1|<1$ and with this constraint on values of $x$ we try to find a very simple expression $g(x) $ greater than $|f(x) - 5|$. 
Note that $$x^{2}-x+3=(x-1/2)^{2}+11/4\geq 11/4>2$$ and if $0<x<2$ then $$(x-1/2)^{2}<(2-1/2)^{2}=25/4$$ so that $$x^{2}-x+3<25/4+11/4=9$$ Thus we have proved that if $0<x<2$ then $|x^{2}-x+3|<9$ and therefore $$|f(x) - 5|<9|x-1|$$ and the expression $g(x) =9|x-1|$ is very simple as desired and it is this expression which we will ensure to be less than $\epsilon$. And this is easily done by having $|x-1|<\epsilon/9$. All of this is based on an existing constraint on $x$ namely $|x-1|<1$ so in order that our goal is achieved we have to have both the constraints $|x-1|<1$ and $|x-1|<\epsilon /9$ simultaneously. This we can do by a single constraint $|x-1|<\min(1,\epsilon /9)$ and it is now clear that we can take $\delta=\min(1,\epsilon /9)$ and the definition of limit will work with this chosen $\delta$. 
A: Assume that $|x-1|<1$ then clearly:
$$ \begin{align}
- 1\,<\, x-1 \, <\, 1 &\;\Longrightarrow\; 0\,<\, x\,<\, 2 \\
&\;\Longrightarrow\; - 2\,<\, - x \, <\, 0 \;\;\text{and} \;\; 0\,<\, x^{2} \,<\, 4 \\
&\;\Longrightarrow\; 1\,<\, x^{2} - x + 3 \,<\, 7 \\ 
&\;\Longrightarrow\; 1\,<\,| x^{2} - x + 3 |\,<\, 7
\end{align}$$
Then with $|x-1|<1$, we have for any $\epsilon>0$:
$$|f(x) - 5|\,<\, 7|x-1|\,<\, \epsilon \;\Longleftrightarrow\; |x-1|\,<\,\frac{\epsilon}{7}.$$
Thus taking $\delta=\min(1,\frac{\epsilon}{5})$ we may satisfy both $|x-1|<1$ and $ |x-1|<\frac{\epsilon}{7}$, and hence
$$|x-1|\,<\,\delta \;\Longrightarrow\; |f(x) - 5|\,<\, \epsilon, $$
as required. 
A: Take $\delta = \epsilon/4$. For sufficiently small $\delta$ and $\lvert x-1 \rvert < \delta$, you'll have:
$$
\lvert x^2-x+3 \rvert < 4
$$
That should be easy to prove with standard algebra and the monotonicity of $x^2-x+3$ around $x=1$. Then:
$$
\lvert x-1 \rvert \lvert x^2-x+3 \rvert < \frac{\epsilon}{4}*4 = \epsilon
$$
