Limits using Epsilon Delta definition $$\lim_{x \to 3} x^{3}=27 $$
$$ 0<|x-3|<\delta$$ 
$$|x-3||x^{2}+3x+9|< \varepsilon$$
My teacher said that delta must be in the interval [0,3] but I don't think it's correct. 
What is the correct approach to solve this kind of questions?
Thanks in advance.
 A: Given $\varepsilon > 0$, choose $\delta = \frac{\varepsilon}{27}$. Then, whenever $|x-3| < \delta$, we have: $|x^3 -3^3| = |(x-3)(x^2+3x+9)| < \delta|(x^2+3x+9)| \leq \frac{\varepsilon}{27} 27 = \varepsilon$ if $|x| \leq 3$.
What if $|x| \geq 3$?
Edit: I forgot to change both $9x's$ that were wrong to $3x$, but it's fixed now.
A: The usual way you would start attempting this problem, after doing what you've already done, is to try to bound $|x^{2} + 3x + 9|$ by some number.  And sometimes you can do that if you assume that $\delta$ is smaller than a number, say, smaller than $1$.  Since, if $\delta < 1$, then $|x - 3| < \delta$ implies $|x - 3| < 1$, so $-1 < x - 3< 1$, so $-1 + 3 < x < 1 + 3$, i.e., $2 < x < 4$.
Then, since $2 < x < 4$, the $2 < x$ gives us that $x$ is positive, while $x < 4$ gives us $|x^{2} + 3x + 9| < |4^{2} + 3(4) + 9|$ (which we can only use if we knew $x$ were positive - why??).  So, we have $|x^{2} + 3x + 9| < |16 + 12 + 9| = 37$.
Then $|x - 3||x^{2} + 3x + 9| \leq 37|x - 3|$.  So, given any $\epsilon > 0$, it should be clear now what we should let $\delta$ equal.  We want $37|x - 3| < \epsilon$ if $|x - 3| < \delta$, so choose $\delta = \frac{\epsilon}{37}$.
But wait!  The above calculations only worked if we assumed $\delta < 1$, so we have to take that into account.  So we should really let $\delta = \min \{ \frac{1}{2}, \frac{\epsilon}{37} \}$.  If we assume this (so that we are assured $\delta < 1$), then we get by the above work that $|x^{3} - 3^{3}| < 37|x - 3| < 37\frac{\epsilon}{37} = \epsilon$.
A: take$ \delta = min(1,\frac{\varepsilon}{37})$
then $|x-3||x^{2}+3x+9|< 37|x-3| < \epsilon $
