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?