I have some question about this example:
Use the definition of limit to prove that:
$$\lim_{x\to-1} (x^2-2x-1) = 2$$
Proof: $\vert(x^2-2x-1) - 2\vert$ = $\vert x^2-2x-3 \vert$ = $\vert x-3 \vert$$\vert x+1 \vert$ $\lt$ $3\vert x+1 \vert$ whenever $\vert x-(-1) \vert \lt$ $1$ note that $\vert x-(-1) \vert = \vert x+1 \vert \lt 1$ then $0 \lt x \lt 2 $ and $ -3 \lt x-3 \lt -1$ then $\vert x-3 \vert \lt 3$ let $\epsilon \gt 0 $ be arbitrary and $\delta = \min(1,\epsilon/3)$. Then $\vert (x^2 - 2x -1) - 2 \vert \lt 3 \vert x+1 \vert \lt 3 * (\epsilon/3) = \epsilon$ whenever $0 \lt \vert x - (-1) \vert \lt \delta $
My question is that where do he get $3 \vert x+1 \vert$ and where he get $\delta = \min (1,\epsilon/3) $.
He chooses $\delta = \min(1,\frac{\epsilon}{3})$, because he can arbitrarily choose $0 < |x - (-1)| < \delta$ as $x$ gets closer to $-1$.
The reason behind this is that we want to show that for any $\epsilon$, if the distance of $x$ from $-1$ is set to some small number, then the distance of the function from the limit is smaller than that $\epsilon$.
He shows the work above that $|x - 3| < 3$, so then $|x - 3||x + 1| < 3|x + 1|$. From there he chooses the minimum for $\delta$ so that the expression $3|x + 1|$ reduces to just $\epsilon$. You can do that because you can choose numbers as close to $-1$ as you want for $x$, so there's nothing wrong with setting $\delta$ to $\frac{\epsilon}{3}$ where $0 < |x - (-1)| < \delta$.