<s>[INST] I got a negative delta when computing deltas algebraically I am trying to find $\delta$ of $f(x)=4-x^2$ for $c=-1, L=3, \epsilon=\frac{1}{4}$. Here is what I did:
$$|f(x)-L|<\epsilon$$
$$|4-x^2-3|<\frac{1}{4}$$
$$-\frac{1}{4}<1-x^2<\frac{1}{4}$$
$$-\frac{5}{4}<-x^2<-\frac{3}{4}$$
$$\frac{5}{4}>x^2>\frac{3}{4}$$
$$\frac{\sqrt{5}}{2}>x>\frac{\sqrt{3}}{2}$$
$$\frac{\sqrt{3}}{2}<x<\frac{\sqrt{5}}{2}$$
Then the second step:
$$|x-c|<\delta$$
$$|x+1|<\delta$$
$$-\delta<x+1<\delta$$
$$-\delta-1<x<\delta-1$$
Left substitution:
$$-\delta-1=\frac{\sqrt{3}}{2}$$
$$\delta+1=-\frac{\sqrt{3}}{2}$$
$$\delta=-1-\frac{\sqrt{3}}{2}$$
Right substitution:
$$\delta-1=\frac{\sqrt{5}}{2}$$
$$\delta=\frac{\sqrt{5}}{2}+1$$
As you can see, I got a negative delta when doing the left substitution of the inequality ($\delta=-1-\frac{\sqrt{3}}{2}$). I heard it said somewhere that if you get a negative delta, you have an error in your algebra. Is this true? If so, what did I do wrong?
 [/INST] The problem in your proof is the step where you square root the inequality. While the steps in deducing an interval for $x$ are correct, it's not the only interval. The interval you seek is a punctured interval around $x = -1$, so that should hint that you take the negative roots. Picking from there,
$$\frac{3}{4} < x^2 < \frac{5}{4}$$
$$- \frac{\sqrt 5}{2} < x < -\frac{\sqrt 3}{2}.$$
This means that so long as $x$ is between these numbers, $|f(x) - L| < \varepsilon$. Now we need to find a $\delta$ so that the interval $(-1 - \delta, -1 + \delta)$ is contained entirely within the inequality required for $x$. Unfortunately we have to cheat a bit -- numerically, $-\frac{\sqrt 5}{2} \approx -1.118$, and $-\frac{\sqrt 3}{2} \approx -0.866$. This hints that as $\delta$ grows, we will "hit" $-\frac{\sqrt 5}{2}$ first, so we only have to worry about the left side. That is, we should choose $\delta = -1 + \frac{\sqrt 5}{2}$.

Tackling the more general case, let $\varepsilon > 0$ be given. We seek $\delta$ so that whenever $0 < |x - c| < \delta$, we have
$$|f(x) - L| = |f(x) - f(-1)| = |4 - x^2 - (4 - c^2)| = |x^2 - c^2| = |x+c||x - c| < \varepsilon.$$
The $|x - c|$ in the last expression can be made as small as we want (since $|x - c| < \delta$), so we have to control $|x + c|$. Arbitrarily, choose $\delta < 1$. Then by the triangle inequality,
$$|x + c| = |x - c + 2c| \leq |x - c| + |2c| < 1 + |2c|.$$
In words, as long as $\delta < 1$, the $|x + c|$ term can only get so large. With this,
$$|x + c||x - c| < (1 + |2c|)\delta < \varepsilon,$$
suggesting we also choose $\delta < \frac{\varepsilon}{1 + |2c|}$. But how can we have two expressions for $\delta$? Simple, just pick the smaller of the two. Now letting $\delta = \min\left(1,\frac{\varepsilon}{1 + |2c|}\right)$, we are guaranteed that
$$|f(x) - L| = |x + c||x - c| < (1 + |2c|)\frac{\varepsilon}{1 + |2c|} = \varepsilon,$$
as desired.
</s>