# Prove that the function is continuous at $x=1$

Given a function $f: \Bbb R \rightarrow \Bbb R$

$f(x) = \begin{cases} 1/x, & \text{if$x\geq1$} \\ 2-x, & \text{if$x<1$} \end{cases}$

I need to prove that this function is continuous at $x=1$ using $\varepsilon$ and $\delta$ notations

So far I did the following and then got stuck:

By definition $f(x)$ is continuous at $c$ if $\displaystyle \lim_{x\to c} f(x) = f(c)$. Hence, I will consider the following limits:

1) Claim: $\displaystyle \lim_{x\to1^-} f(x) = 1$.

For this claim to be true the following must hold: for $\varepsilon>0$ there exists $\delta>0$ such that $1-\delta<x<1$ (1) implies $|f(x) - f(1)|<\varepsilon$. Since $x$ approaches from below we take $f(x)=2-x$ and consider:

$|f(x) - f(1)| = |1-x|$

Now we set $\delta=\varepsilon$ and by subbing into (1) we get:

$1-\varepsilon<x<1$

$-\varepsilon<x-1<0<\varepsilon$

$|x-1|<\varepsilon$ which gives that $\displaystyle \lim_{x\to1^-} f(x) = 1$.

2) Claim $\displaystyle \lim_{x\to1^+} f(x) = 1$. For this claim to be true the following must hold: for $\varepsilon>0$ there exists $\delta>0$ such that $1<x<1+\delta$ (1) implies $|f(x) - f(1)|<\epsilon$. Since $x$ approaches from below we take $f(x)=\dfrac 1x$ and consider:

$|f(x) - f(1)| = \left|\dfrac 1x -1\right|= \left|\dfrac{x-1}{x}\right|$

From $1<x<1+\delta$ we can deduce that $|x-1|<\delta$ But now I am stuck and I am not sure what my $\delta$ should be for $|(x-1)/x)|<\varepsilon$

If I could prove that my second claim is true then 1) and 2) would imply $\displaystyle\lim_{x\to 1} f(x) = 1$ and so the function would be continuous.

Thank you and I hope my formatting is not that bad.

## 3 Answers

Solve the equation : \begin{align} &-\epsilon<\frac1x-1<\epsilon \\ \iff& 1-\epsilon<\frac1x<1+\epsilon \\ \iff& \frac{1}{1-\epsilon}>x>\frac{1}{1+\epsilon} \\ \iff& \frac{\epsilon}{1-\epsilon}>x-1>-\frac{\epsilon}{1+\epsilon} \end{align} As $x-1>0$, it suffices to choose $\delta=\frac{\epsilon}{1-\epsilon}$ (for $\epsilon<1$) to be able to conclude.

• Thank you! This now makes sense! – LiNXO Nov 27 '16 at 13:17

I have to say that your understanding about "x tends to c" is wrong, since you just considered one side situation. In fact, the approximating sequence can switch to different sides of 1, for example, $x_n=1\pm\frac{1}{n}$. So in fact the correct formulation should be $|x_n-1|\rightarrow 0$.

Back to your question, it should follow that $$|f(x_n)-f(1)|=|f(x_n)-1|\leq \max(|\frac{1}{x_n}-1|,|1-x_n|).$$ Let $|x_n-1|<\epsilon$. Inparticular, $x_n\neq 0$ for sufficiently small $\epsilon$. Then the first term can be estimated by $$|\frac{1}{x_n}-1|=\frac{|x_n-1|}{|x_n|}\leq\frac{\epsilon}{1+\epsilon}\leq\frac{\epsilon}{2}\leq\epsilon$$ for $\epsilon<1$; for the second term, just use the definition of $x_n$. Now you conclude that $|f(x_n)-f(1)|\leq \epsilon$ for sufficiently large $n$, and you conclude the continuity.

1) as $2-x$ is a decreasing function, you need to establish on the left

$$-\delta<x-1<0\implies f(1)-f(x)=x-1>-\epsilon,$$ which is obtained with $\delta=\epsilon$.

2) as $1/x$ is a decreasing function, you need to establish on the right

$$0<x-1<\delta\implies f(1)-f(x)=1-\frac1x<\epsilon,$$ which is obtained with $1/x>1-\epsilon$, or $x-1<\epsilon/(1-\epsilon)=\delta$.

Then

$$f(1^-)=f(1^+)=f(1).$$