3

Can a continuous function on $[0,1]$ be constructed which is not differentiable exactly at two points on $[0,1]$ ?

3 Answers3

11

Consider: $$f(x)=\left|x-\frac{1}{2}\right|+\left|x-\frac{1}{3}\right|.$$

Empty
  • 13,012
1

Let me give another, potentially more common example: the upper-half circle of radius $1/2$ with center at $1/2$, i.e. $$f(x)=\sqrt{\frac{1}{4}-\left(x-\frac{1}{2}\right)^2}$$

Quickbeam2k1
  • 2,139
  • At what two points exactly is this function non-differentiable? The only ones I can think of are the extreme points of the definition domain, $;\left[0,,,\frac14\right];$ , yet the function is not continuous there but only one-sided continuos. – Timbuc Jan 20 '15 at 14:38
  • The function is defined on $[0,1]$, isn't it? The function should be not differentiable in $0$ and $1$. Maybe we need to discuss what differentiability on compact sets means? – Quickbeam2k1 Jan 20 '15 at 15:24
  • Differentiability, just like continuity, at end points of a closed interval mean both "one sided": right on $;0;$ , left on $;1;$ . I just thought the OP may have meant something else. – Timbuc Jan 20 '15 at 17:09
  • maybe you are right. However, sclaing my answer to a smaller circle and extending the function by zero will also provide an example with non-differentiability in interior points. – Quickbeam2k1 Jan 20 '15 at 17:24
0

Sure. Presuming you allow one-sided limits at interval endpoints in your limit of differentiability (otherwise any otherwise differentiable function is automatically an example because it fails to be differentiable at $0, 1$), you can take as an example the function $f$ defined by $0$ on $[0, \frac{1}{3}]$, $3x - 1$ on $[\frac{1}{3}, \frac{2}{3}]$, and $1$ on $[\frac{2}{3}, 1]$. It is nondifferentiable precisely at $\frac{1}{3}, \frac{2}{3}$.

Travis Willse
  • 99,363
  • This was my first thought and seemed so simple I assumed there was some implicit prohibition of piecewise defined functions. – Todd Wilcox Jan 20 '15 at 14:22
  • 2
    I originally misread the problem asking for a function which was differentiable only at two points in $[0, 1]$, which is perhaps more interesting. – Travis Willse Jan 20 '15 at 14:25