Is this limit proof correct? I am currently studying the formal defenition of the limit. One of the examples given by my book is the following: Prove that:
$$
\lim_{x \to 3} x^2 = 9
$$
So, using only the defenition of the limit, I have to prove that for every $\epsilon > 0$ there is a $\delta > 0$ for which the following is true:
$$
0 < |x - 3| < \delta \to |x^2 - 9| < \epsilon
$$
So after some puzzeling I came up with:
$\delta = \frac{\epsilon}{|x + 3|}$. And I though this was correct: under the assumption that the antecedent is true, we can make the following construct:
$$
0 < |x - 3| < \delta \Rightarrow 0 < |x - 3| < \frac{\epsilon}{|x + 3|} \Rightarrow 0 < |x + 3||x - 3| < \epsilon \Rightarrow |x^2 - 9| < \epsilon
$$
Q.E.D, I thought. But the book came up with the following solution:
$$
\delta = \min{(1,\frac{\epsilon}{7})}
$$
Which is a correct solution. So, is mine wrong? Or did the book just provide a different proof?
 A: Your $\delta$ can't depend on $x$, because $x$ is varying, and so is your $\delta$, but $\delta$ was supposed to be constant. That's the mistake. Let's do a reverse engineering, supposing that $\delta < 1$ (this usually helps). 
If $|x-3|<\delta$, then $|x-3|<1 \implies |x| < 3+1 = 4$. And: $$|x^2-9|= |x+3||x-3|\leq (|x|+3)\delta < 7\delta,$$so that $\delta = \min (1, \epsilon/7)$ will work. So far, just ideas. 
Now we check: let $\epsilon > 0$, choose $\delta = \min (1,\epsilon/7)>0$ and take $x \in \Bbb R$ such that $|x-3|<\delta$. Since $\delta < 1$, we also have $|x|<4$. And in these conditions: $$|x^2-9| = |x+3||x-3| \leq (|x|+3)\delta < (4+3)\delta = 7\delta < 7 \frac
\epsilon 7 = \epsilon.$$
(You can read more about the idea of supposing that $\delta < 1$ in my answer here.)
A: First, let's choose $\delta\le1$.  Then, we have 
$$0<|x-3|<\delta\implies 2<x<4\implies |x+3|<7$$
So, for that choice of $\delta$, we have
$$|x+3|\,|x-3|<7\,|x-3|$$
Now, given $\epsilon>0$, if $|x-3|<\frac{\epsilon}{7}$, then 
$$|x^2-9|<\frac{\epsilon}{7}$$
So, whenever $0<|x-3|<\delta=\min(1, \epsilon/7)$ we have 
$$|x^2-9|<\frac{\epsilon}{7}$$

NOTE:
There was nothing special about our initial restriction on $\delta$, namely $\delta = 1$.  We could have initially chosen any number, say $\delta = 1/2$, or $\delta = 10^{-6}$.  So, let's first choose $0<\delta = \delta'$.  
Following the previous development we find that for a given $\epsilon >0$, 
$$|x^2-9|<\epsilon$$
whenever $|x-3|<\delta =\min\left(\delta',\frac{\epsilon}{6+\delta'}\right)$.

EXAMPLES:
Let's see a couple of examples.  
Example 1:  For $\delta'=1/2$ we would have for any given $\epsilon$
$$|x^2-9|<\epsilon$$
whenever $|x-a|<\delta=\min\left(\frac{1}{2},\frac{1}{6.5}\epsilon\right)$
Example 2:
For $\delta'=10^{-6}$ we would have for any given $\epsilon$
$$|x^2-9|<\epsilon$$
whenever $|x-a|<\delta=\min\left(10^{-6},\frac{1}{6.000001}\epsilon\right)$
