# How to prove that a function is continuous at a point using Cauchy and Heine definitions.

Let's say I have a function $$x^2$$ and $$x_o=2$$, Then by Cauchy definition: $$f:Df \rightarrow R$$ is continuous at a point $$x_o=2 \iff \forall \epsilon>0 \ \ \exists \delta>0: x\in(Df \cap V_{\delta}(x_o)\setminus(x_0)) \Rightarrow |f(x)-f(x_0)|$$

Given $$\epsilon$$ does there exist $$\delta>0: x\in(Df\cap 0<|x-2|<\delta) \Rightarrow |x^2-4|<\epsilon$$

Does there exists $$\delta>0: x\in (Df \cap 0<|x-2|<\delta) \Rightarrow |x-2||x+2|<\epsilon?$$ If we choose $$\delta\le1$$ Then it follows that if $$x\in(Df \cap 0<|x-2|\delta \Rightarrow |x-2|\cdot5<\epsilon \iff |x-2|<\frac{\epsilon}{5}$$ Then if we choose $$\delta=min(1,\frac{\epsilon}{5})$$ we get that If $$x\in (Df \cap 0 <|x-2|\le \delta \Rightarrow |x^2-4|\le\epsilon$$

So, I basically did it the way a limit is proved for a function at a certain point, I don't know whether that is correct and if you can prove that f is continuous at a point choosing just one particular $$\delta$$ if it must be true for all possible $$\epsilon$$?

Also how it can be proved using Heine's definition of continuity?

Given $$\epsilon >0$$ there is $$\delta>0: x\in(Df\cap |x-2|<\delta) \Rightarrow |x^2-4|<\epsilon$$.
We have that $$2-\delta or $$x+2<4+\delta$$. Thus, $$|x^2-4|=|(x-2)(x+2)|<\delta(4+\delta)$$. So we need to pick $$\delta$$ to satisfy $$\delta (4+\delta) < \epsilon$$.
Solving the last inequality we get $$0< \delta <\sqrt{4+\epsilon}-2$$. Thus, such $$\delta$$ exist and the function is continuous at $$x=2$$.