Understand how delta was chosen in this application of epsilon-delta definition of a limit The following example is from the OpenStax book Calculus 1.

Prove that $\lim_{x \to -1} (x^2-2x+3) = 6$

*

*Let $\epsilon > 0$.


*Choose $\delta = \min \{1, \epsilon/5 \}$. This choice of $\delta$ [...] was obtained by taking a look at our ultimate desired inequality: $|(x^2-2x+3)-6| < \epsilon$. This inequality is equivalent to $|x+1||x-3| < \epsilon$. At this point, the temptation simply to choose $\delta = \frac{\epsilon}{x-3}$ is very strong. Unfortunately, our choice of $\delta$ must only depend on $\epsilon$ alone. If we can replace $|x-3|$ by a numerical value, our problem can be resolved. This is the place where assuming $\delta \le 1$ comes into play. The choice of $\delta \le 1$ here is arbitrary. [...] Now since $\delta \le 1$, and $|x+1| < \delta \le 1$, we are able to show that $|x-3| < 5$. Consequently, $|x+1||x-3| < |x+1|5$. At this point we realize that we also need $\delta \le \epsilon/5$. Thus, we choose $\delta = \min\{1, \epsilon/5\}$.


*[...]


*

*I follow until the bold part. I get that $\delta$ can only depend on $\epsilon$, not on some additional variable like $x$. I also get that if we could have a numerical value in the denominator instead of $x-3$, then we could be good to go.

*Everything after that part mystifies me. Why we end up with $\delta = \min \{1, \epsilon/5 \}$ is not clear to me, neither how we came up with the $1$ nor where the $5$ is coming from.

Could someone provide more background to this approach of finding $\delta$ here?
 A: This is a bit too long for a comment:  Start by assuming you are given some $\varepsilon > 0$.  Then, if you have found a suitable $\delta$, for any $x$ satisfying $|x+1|<\delta$ we would have,
$$|x^2-2x+3-6| = |(x-3)(x+1)| < \delta |x-3|
$$
But if $|x+1| < \delta$ then $|x-3|$ cannot be too big either:  in fact you have $$|x-3| = |x+1 - 4| < |x+1| + 4 < \delta + 4,$$ and taking the two inequalities together gives,
$$ 
|x^2-2x+3-6| < \delta(\delta +4).$$
Now you just have to find some $\delta$ so the right hand side is less than $\varepsilon$.  You could try playing with some numbers here, but it is not difficult to see that if $\delta$ is less than both $\frac{1}{5} \varepsilon$ and less than $1$ (which is the same as saying it is less than the minimum) you get what you need.
A: $\newcommand{\eps}{\varepsilon}$When I teach analysis or introduction to proofs, students and I often have the following conversation in office hours:
Me: What's your favorite real number?
Student: $6$ (or $42\sqrt{\pi}$, or whatever).
Me: Wrong! [Laughter] It's

 $0$.

What's your second favorite real number?
Student: $1$...?
Me: Yes! Then probably $-1$. $6$ (or $42\sqrt{\pi}$) can be your fourth-favorite real number.
The pedagogical point is, if you need to pick a real number without constraint, $0$ is often your best choice. If you need a positive real, pick $1$.
And that brings us to your question:
Here, with $\eps > 0$ given arbitrarily, we're trying to pick $\delta > 0$ so that $0 < |x + 1| < \delta$ implies $|x^2 - 2x + 3 - 6| = |x + 1|\, |x - 3| < \eps$.
It suffices to obtain, for some positive $M$, an upper bound of the form $|x - 3| < M$ if we're given a bound $|x + 1| < \delta$: Then we can take $\delta = \eps/M$.
Let's start by assuming $\delta = 1$, our favorite positive real. There are multiple ways to see what happens next. One is to draw a number line, with the points $x$ satisfying $|x + 1| < 1$ highlighted, and to ask how large $|x - 3|$ can be. Another is to wield the mighty triangle inequality:
$$
|x - 3| = |(x + 1) - 4| \leq |x + 1| + 4 \leq 5.
$$
This shows that if $\delta \leq 1$ and $|x + 1| < \delta$, then $|x - 3| < 5$. Substituting this knowledge back into our earlier estimate,
$$
|x^2 - 2x + 3 - 6| = |x + 1|\, |x - 3| \leq 5\delta.
$$
To finish, it suffices to ensure $\delta \leq \eps/5$. That dictates the choice $\delta = \min(1, \eps/5)$.
