give an example of a function which is continuous everywhere but differentiable at exactly two points.
Answers
Answer:
Yes, there are some function which are continuous everywhere but not differentiable at exactly two points.
Let us take an example.
Let f(x) = |x-1| + |x-2|
Since we know that modulus functions are continuous at every point,
So there sum is also continuous at every point. But it is not differentiable at every point.
Let x = 1, 2
Now at x = 1
LHD = limx->1- [{f(x) - f(1)}/(x-1)]
= limh->0 [{f(1-h) - f(1)}/-h]
= limh->0 [{|1-h-1| + |1-h-2| - |1-1|-|1-2|}/-h]
= limh->0 [{|1-h-1| + |1-h-2| - |0|-|-1|}/-h]
= limh->0 [{|-h| + |-h-1| - 1}/-h]
= limh->0 [{h - (-h-1) - 1}/-h]
= limh->0 [{h + h + 1 - 1}/-h]
= limh->0 [{2h}/-h]
= -2
RHD = limx->1+ [{f(x) - f(1)}/(x-1)]
RHD = limh->0 [{f(1+h) - f(1)}/h]
= limh->0 [{|1+h-1| + |1+h-2| - |1-1|-|1-2|}/h]
= limh->0 [{|1+h-1| + |1+h-2| - |0|-|-1|}/h]
= limh->0 [{|h| + |h-1| - 1}/h]
= limh->0 [{h - (h-1) - 1}/h]
= limh->0 [{h - h + 1 - 1}/h]
= limh->0 [0/h]
= 0
Since LHD ≠ RHD
So given function is not diffenetiable at x = 1.
Similarly, we can show that the given function is not differentiable at x = 2.
Hope it helps you:)