# Prove limit of cubic function by definition of limit

I'm a little bit confused by showing the following limit directly from the definition:

$$\lim_{x\to 4} x^3 = 64$$

$$|x^3-64|=|x-4| |x^2+4x+16|$$

Since I know that $$|x-4|< \sigma$$, I'm trying to do something like

$$|x-4+x^2+3x+20|<\sigma +x^2+3x+20$$

Than I multiply two inequalities:

$$|x-4||x^2+4x+16|<\sigma^2 +x^2\sigma+3x\sigma+20\sigma$$

Here's the point of my confusion. Since we know that x < 4 will always holds, can we multiply right side of inequality to get the following?

$$|x-4||x^2+4x+16|<\sigma +16\sigma+12\sigma+20\sigma = 49\sigma$$

So then we can take $$\sigma = min\{1/2, \sigma/49\}$$

Almost: We know that $$4-\sigma. So we have that $$|x-4||x^2+4x+16|<\sigma |x^2+4x+16|.$$ Since $$x^2+4x+16$$ has all positive coefficients, $$x^2+4x+16$$ is increasing when $$x>0$$. Since $$x<4+\sigma$$ (and $$x>4-\sigma>0$$, assume $$\sigma < 4$$) we have $$\sigma|x^2+4x+16|<\sigma((4+\sigma)^2+4(4+\sigma)+16)$$ and thus $$|x-4|<\sigma\Rightarrow |x^3-64|<\sigma((4+\sigma)^2+4(4+\sigma)+16).$$ Now you can reverse engineer this to make $$\sigma((4+\sigma)^2+4(4+\sigma)+16)<\epsilon$$.
In a limit, only the behavior of the function in the neighborhood of the point is important. You can't require that $$x < 4$$ (that would be taking a side limit!), but you can fix $$r$$ and work as if the whole dominion was $$(4 - r, 4 + r)$$, since only the behavior very close to 4 is important (much closer than $$r$$).
$$|x - 4||x^2 + 4x + 16| < |x - 4||25 + 20 + 16| = 61|x - 4| < 61\delta$$
for every $$x \in (4 - \delta, 4 + \delta)$$, with $$\delta$$ small enough (in fact, $$\delta < 1$$, such that $$x < 5$$).