82
$\begingroup$

Construct a function which is continuous in $[1,5]$ but not differentiable at $2, 3, 4$.

This question is just after the definition of differentiation and the theorem that if $f$ is finitely derivable at $c$, then $f$ is also continuous at $c$. Please help, my textbook does not have the answer.

  • 4
    I will refuse to upvote you question... but instead I gladly upvoted the infamous "W" answer below.2017-09-24

3 Answers 3

30

How about $f(x) = \max(\sin(n\pi x),0)$ or perhaps $g(x) = |\sin(n\pi x)|$?

  • 0
    @SaaqibMahmuud Yes as for the W solution. However, there are more complex functions that lack derivatives everywhere like [the Weierstrass function](https://en.wikipedia.org/wiki/Weierstrass_function).2016-08-22
839

$\ \ \ \ \mathsf{W}\ \ \ \ $

  • 15
    **Avoid commenting.** There are close to hundred deleted comments in this thread about: it not being the Lambert W function, it not being W for Weiertrass, the merits of this type of answer in general, and so on. If you do not understand what it is meant please read the comment above, if you still do not understand it read please read [another explanation](https://math.stackexchange.com/a/74348/) and the comment there. If you want to voice your opinion on the merits of this contribution, please, just make an effort to avoid it. Chances are what you want to say was said already multiple times.2017-11-21
171

$|x|$ is continuous, and differentiable everywhere except at 0. Can you see why?

From this we can build up the functions you need: $|x-2| + |x-3| + |x-4|$ is continuous (why?) and differentiable everywhere except at 2, 3, and 4.

  • 24
    $\uparrow$ Change first + sign to a - sign for the infamous $\mathsf{W}$ solution...:)2014-10-22