# Prove that $f(x)=|x-3|$ is continuous at $x=3$

First we must prove $\lim_{x \to 3 } |x-3|=0$

Suppose we are give $\delta >0$ we must find $\delta$

such that $0<|x-3|<\delta \rightarrow |x-3|<\epsilon$

Choose $\delta = \epsilon$

For $x$ is real number

$$0<|x-3|<\delta \rightarrow |f(3)-3|=|3-3|=0<\delta =\epsilon$$

Then limit equal $0$

Second we prove $f(3)=0$ $$|x-3|\rightarrow |3-3|=0$$

Therefore it continuous at $x= 3$

• In your line $0<|x-3|<\delta \rightarrow |f(3)-3|=|3-3|=0<\delta =\epsilon$, there's something funny going on. It's supposed to be "$0<|x-3|<\delta \implies |f(x)-f(3)|<\epsilon$", and then you need to prove that this is in fact true. It's not difficult, but it needs to be done correctly. Also, we usually use $0\leq|x-3|<\delta$, or just $|x-3|<\delta$ instead, but you check $f(3)$ specifically afterwards, so that's not wrong. Just a bit unusual to me. Commented Dec 27, 2016 at 8:51
• $|f(3) -3| = 3$ since $f(3) = 0$, how did you get $|f(3) -3| = 0$? Commented Dec 27, 2016 at 8:52
• opp I miscalculated -*- Commented Dec 27, 2016 at 8:54
• @I post a solution for your additional references. :D Commented Dec 27, 2016 at 9:08
• @juniven Thank ^ ^ Commented Dec 27, 2016 at 9:10

We have

• $$\forall x>3\;\; f(x)=x-3 \implies$$

$$\lim_{x\to 3^+} f(x)=0$$

• $$\forall x<3 \;\;f(x)=-x+3 \implies$$

$$\lim_{x\to 3^-} f(x)=0$$

• $$f(3)=0$$

So, $f$ is continuous at $x=3$.

We need to recall the following result.

Result. $\lim_{x\to a}f(x)$ exists if and only if both the limits $\lim_{x\to a^+}f(x)$ and $\lim_{x\to a^-}f(x)$ exist and are equal. In this case, $$\lim_{x\to a}f(x)=\lim_{x\to a^+}f(x)=\lim_{x\to a^-}f(x).$$

In your problem, we have $f(x)=|x-3|$. Now, $$\lim_{x\to 3^+}f(x)=\lim_{x\to 3^+}|x-3|=\lim_{x\to 3^+}(x-3)=0$$ and $$\lim_{x\to 3^-}f(x)=\lim_{x\to 3^-}|x-3|=\lim_{x\to 3^-}(3-x)=0.$$ Applying the result, we get $$\lim_{x\to 3}f(x)=0=f(0)$$ which shows that $f$ is continuous at $x=3$.