Does there exist a function which is continuous everywhere but not differentiable at exactly two points?
Justify your answer.
Does there exist a function which is continuous everywhere but not differentiable at exactly two points?
Justify your answer.
Official Solution
Let the function be $f(x) = |x - 1| + |x - 2|.$
We redefine f(x) as :
$f(x) = \left\{ {\begin{array}{llllllllllllllllllll}{ - (x - 1) - (x - 2);}&{if}&{x < 1}\\{((x - 1) - (x - 2);}&{if}&{1 \le x \le 2}\\{(x - 1) + (x - 2);}&{if}&{x > 2}\end{array}} \right.$
$\Rightarrow$ $f(x) = \left\{ {\begin{array}{llllllllllllllllllll}{ - 2x + 3;}&{if}&{x < 1}\\{1;}&{if}&{1 \le x \le 2}\\{(2x - 3);}&{if}&{x > 2}\end{array}} \right.$
$f(x)$ is clearly continuous at all x except at x$=$1, 2.
At x$=$ 1:
$\mathop {\lim }\limits_{x \to {1^ - }} f(x) = \mathop {\lim }\limits_{\scriptstyle x \to 1 - h\atop\scriptstyle h \to 0} ( - 2(1 - h) + 3) = - 2 + 3 = 1$
$\mathop {\lim }\limits_{x \to {1^ + }} f(x) = \mathop {\lim }\limits_{x \to {1^ + }} (1) = 1.$
Also, $f(1) = 1$
Thus, $\mathop {\lim }\limits_{x \to {1^ - }} f(x) = \mathop {\lim }\limits_{x \to {1^ + }} f(x) = f(1)$
Hence, $f(x)$ is continuous at x$=$ 1.
At x $=$ 2 :
$\mathop {\lim }\limits_{x \to {2^ - }} f(x) = \mathop {\lim }\limits_{x \to {2^ - }} 1 = 1$
$\mathop {\lim }\limits_{x \to {2^ + }} f(x)$
$= \mathop {\lim }\limits_{x \to {2^ + }} (2x - 3) = \mathop {\lim }\limits_{\scriptstyle x \to 2 + h\atop\scriptstyle h \to 0} (2(2 + h) - 3) = 2(2) - 3 = 1$
Also, $f(2) = 1$
Thus, $\mathop {\lim }\limits_{x \to {2^ - }} f(x) = \mathop {\lim }\limits_{x \to {2^ + }} f(x) = f(2)$
Hence, f(x) is continuous at x $=$ 2.
Hence, f(x) is continuous at all $x \in R$ .
Derivability at x$=$1:
$Lf'(1) = \mathop {\lim }\limits_{h \to 0} \cfrac{{f(1 - h) - f(1)}}{{ - h}}$
$= \mathop {\lim }\limits_{h \to 0} \cfrac{{ - 2(1 - h) + 3 - 1}}{{ - h}} = \mathop {\lim }\limits_{h \to 0} \cfrac{{2h}}{{ - h}} = \mathop {\lim }\limits_{h \to 0} ( - 2) = - 2$
$Rf'(1) = \mathop {\lim }\limits_{h \to 0} \cfrac{{f(1 + h) - f(1)}}{h} = \mathop {\lim }\limits_{h \to 0} \cfrac{{1 - 1}}{h} = 0$
Thus, $Lf'(1) \ne Rf'(1)$
$\Rightarrow$ f is not derivable at x$=$1
Derivability at x$=$2 :
$Lf'(2) = \mathop {\lim }\limits_{h \to 0} \cfrac{{f(2 - h) - f(2)}}{{ - h}} = \mathop {\lim }\limits_{h \to 0} \cfrac{{(1) - (1)}}{{ - h}} = 0$
$Rf'(2) = \mathop {\lim }\limits_{h \to 0} \cfrac{{f(2 + h) - f(2)}}{h}$
$= \mathop {\lim }\limits_{h \to 0} \cfrac{{2(2 + h) - 3 - 1}}{h} = \mathop {\lim }\limits_{h \to 0} \cfrac{{2h}}{h} = \mathop {\lim }\limits_{h \to 0} 2 = 2$
Thus, $Lf'(2) \ne Rf'(2)$
$\Rightarrow$ f is not derivable at x$=$ 2
Hence $f(x) = |x - 1| + |x - 2|$ is continuous everywhere and differentiable at all x e except at 1 and 2.
No comments yet — start the discussion.