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

• AlonsoMcLaren
In summary, the Weierstrass function, defined as |x|={-x,x<0; x,x>0}, is a piecewise continuous function that is everywhere continuous, but nowhere differentiable. Another example is continuous Brownian motion, which is a continuous random walk and also nowhere differentiable. Additionally, there exists a continuous map of the sphere into the plane that is everywhere distance preserving and not differentiable anywhere.

#### AlonsoMcLaren

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

The Weierstrass function should fit the bill, in being everywhere continuous, but nowhere differentiable.

|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

jmm said:
|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.

jmm said:
|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

jmm, the domain of of the function you wrote down is the reals minus 0. So it is irrelevant what the function is doing at the origin.

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.

The path of a particle following continuous Brownian motion is nowhere differentiable. You can think of this as a continuous random walk Many stochastic models for practical problems use continuous Brownian motion.

For a weird example, I was told that there is a continuous map of the sphere into the plane that is everywhere distance preserving. Such a map can not be differentiable anywhere.

## 1. What does it mean for a function to be piecewise continuous but not piecewise smooth?

Piecewise continuity means that a function is continuous over intervals, but may have discontinuities at certain points where the intervals meet. On the other hand, piecewise smoothness means that a function has continuous derivatives over each interval. Therefore, a function that is piecewise continuous but not piecewise smooth will have discontinuities at certain points, but its derivatives will still be defined and continuous over each interval.

## 2. Can you give an example of a function that is piecewise continuous but not piecewise smooth?

One example is the absolute value function, f(x) = |x|, which is continuous over the intervals [-∞, 0) and (0, ∞), but has a sharp point at x=0 where the intervals meet. The derivative of this function is not defined at x=0, making it piecewise continuous but not piecewise smooth.

## 3. How can we mathematically prove that a function is piecewise continuous but not piecewise smooth?

To prove that a function is piecewise continuous but not piecewise smooth, we can use the definition of continuity and piecewise functions. We need to show that the function is continuous over each interval, but has a discontinuity at the points where the intervals meet. We also need to show that the derivatives of the function are not continuous at these points.

## 4. Are there any real-world applications of functions that are piecewise continuous but not piecewise smooth?

Yes, there are many real-world applications of such functions. One example is the velocity of a moving object, which can be modeled by a piecewise continuous function. The object may experience sudden changes in velocity at certain points, making it piecewise continuous but not piecewise smooth. This can be observed in situations such as a car accelerating and suddenly braking or a rollercoaster going up and down.

## 5. How can we make a piecewise continuous function also piecewise smooth?

To make a piecewise continuous function also piecewise smooth, we need to ensure that the derivatives of the function are continuous at the points where the intervals meet. This can be achieved by carefully choosing the function and its intervals, and making sure that the derivatives match at the points where the intervals meet. In some cases, we may need to use a different piecewise function that better fits the given data to make it piecewise smooth.