# Give me a function that is piecewise continuous but not piecewise smooth

AlonsoMcLaren
Give me a function that is piecewise continuous but not piecewise smooth

Homework Helper
Gold Member
Dearly Missed
The Weierstrass function should fit the bill, in being everywhere continuous, but nowhere differentiable.

jmm
|x| is defined piecewise as abs(x)={-x,x<0; x,x>0} which is continuous but not smooth at x=0. And is perhaps a little bit easier to visualize than a fractal :D

Staff Emeritus
Homework Helper
|x| is defined piecewise as abs(x)={-x,x<0; x,x>0} which is continuous but not smooth at x=0. And is perhaps a little bit easier to visualize than a fractal :D

Yeah, but this IS piecewise smooth.

Further as micromass has noted, even if you define abs(0) = 0, the function will still be piecewise smooth. This is because you can split the domain into $(-\infty,0) \cup [0,\infty)$, and so abs has one sided derivatives of all orders at x = 0.