Piecewise smooth and piecewise continuous

In summary, a function is considered piecewise smooth if it is continuous and has a finite number of smooth pieces, but may have points where the derivative is not continuous. This can be seen in the example of f(x) = |sin(x)|, which is both continuous and piecewise smooth, but has a discontinuity in its derivative at x=0.
  • #1
Niles
1,866
0

Homework Statement


When a function is piecewise smooth, then f and f' (the derivative of f) are piecewise continuous.

In my book they mention "a function f, which is continuous and piecewise smooth". How can f be both continuous and piecewise continuous?
 
Physics news on Phys.org
  • #2
If it is continuous, it is piecewise continuous (in one big piece).
If it is piecewise smooth, then it needn't be piecewise continuous.
 
  • #3
For example, f(x)= |x| is "continuous and piecewise differentiable": it is continuous for all x and differentiable every where except at x= 0 so differentiable on the "pieces" [itex](-\infty, 0)[/itex] and [itex](0, \infty)[/itex].
 
  • #4
Great, thanks to both of you.
 
  • #5
Hmm wait, I'm still having some difficulties with this definition of a function being piecewise smooth. I understand your examples - but still I can't see how a function can be both piecewise continuous and continuous at the same time.

If f is continuous, then f is piecewise continuous in one big piece, then there really isn't a difference between the two terms? I mean, in your example HallsOfIvy, f(x) = |x| is not piecewise continuous, but continuous. So if I use the definition from my book, then it cannot be piecewise smooth? (Although I can see why it is piecewise smooth, but I don't like the definition in my book).
 
Last edited:
  • #6
perhaps what is confusing you is that in this definition they are thinking of "piecewise continuous" as including "continuous". That is, every continuous function is "piecewise" continuous.
 
  • #7
From Wolfram MathWorld (http://mathworld.wolfram.com/PiecewiseContinuous.html): "A function or curve is piecewise continuous if it is continuous on all but a finite number of points at which certain matching conditions are sometimes required."

Is it proper to say that in this case, this "finite number" is just zero?
 
Last edited by a moderator:
  • #8
Exactly.

Another way to look at it:
The intuitive idea of that definition is, that there exist points [itex]a = x_0, x_1, x_2, \cdots, x_n = b[/itex] and functions [itex]f_1, f_2, \cdots, f_n[/itex] such that:
  • [itex]f_i[/itex] is defined on [itex]{[x_{i-1}, x_i[}[/itex]
  • All [itex]f_i[/itex] are continuous
  • The original function f on [a, b[ is given by: [tex]f(x) = f_i(x)[/tex] if [itex]x \in {[x_{i-1}, x_i[}[/itex].
For example, f(x) = |x| can also be written as
[tex]f(x) = \begin{cases} f_1(x) \equiv -x & \text{ if } x < 0 \\ f_2(x) \equiv x & \text{ if } x \ge 0 \end{cases}[/tex].
The [itex]f_i[/itex] are the "pieces" that make up the function. If the function is continuous, then one continuous piece is enough.
 
  • #9
Great, I got it now! Thanks to both of you.

Have a nice weekend.
 
  • #10
Ok, I have a new question similar to this one, so I thought it would make more sense just posting it in here.

Does the same discussion go for piecewise smooth functions? I mean, as we speak, I am writing the Fourier-series for f(x) = |sin(x)|, and then I thought: "This is a periodic function, but not piecewise smooth? Then how can the function have a Fourier-series?"

But it this the same as we talked about earlier? That it is piecewise smooth in "one big piece"?
 
  • #11
It is piecewise smooth. It is given by:
f(x) = -sin(x) on [-pi, 0) and sin(x) on (0, pi];
both pieces are smooth (e.g. it is not differentiable in finitely many points only).
 
  • #12
Why is it not defined in x=0?
 
  • #13
It is. That was a typo. f(x) is -sin(x) on [-pi, 0) and sin(x) on [0, pi].
 
  • #14
But on the interval [-pi;pi], |sin(x)| is both continuous and C1. A x=0, the limit from right and left are the same, so no discontinuity here. And the same with the derivative of sine.

So is this "finite number" again zero?
 
  • #15
Niles said:
But on the interval [-pi;pi], |sin(x)| is both continuous and C1. A x=0, the limit from right and left are the same, so no discontinuity here. And the same with the derivative of sine.

So is this "finite number" again zero?

The derivative is not continuous at 0, from the right it approaches 1, from the left it approaches -1.
 
  • #16
So, |sin(x)| is continuous (therefore, piecewise continuous) but it is not differentiable (though it is piecewise smooth*) on, say, [-pi, pi].

* smooth meaning: infinitely often differentiable.
 
  • #17
d_leet said:
The derivative is not continuous at 0, from the right it approaches 1, from the left it approaches -1.

Ahh yes, of course. But you mean that from the right the limit is -1 and from the left it approaches 1, right?

Ok, I get it now. Thanks to everybody!
 
  • #18
If you come from the right, you are moving along the graph of sin'(x) = cos(x) which goes to +1 as you approach zero.
If you come from the left, you are moving along the graph of -sin'(x) = -cos(x) which approaches -1.
 
  • #19
Of course, I was integrating.. wow, I really need to get some more sleep and pay more attention, so this won't happen again. Thanks for being patient.
 

FAQ: Piecewise smooth and piecewise continuous

What is the difference between piecewise smooth and piecewise continuous functions?

Piecewise smooth functions are continuous with a finite number of continuous derivatives, while piecewise continuous functions may have a finite number of discontinuities but are still considered continuous overall.

Can a function be both piecewise smooth and piecewise continuous?

Yes, a function can be both piecewise smooth and piecewise continuous. For example, a function that is continuous except for a finite number of smooth "bumps" or "dips" would be considered both piecewise smooth and piecewise continuous.

How are piecewise smooth and piecewise continuous functions used in real-world applications?

Piecewise smooth and piecewise continuous functions are commonly used to model real-world phenomena with abrupt changes or discontinuities, such as stock market fluctuations or changes in population growth.

How are piecewise smooth and piecewise continuous functions evaluated?

Piecewise smooth and piecewise continuous functions can be evaluated by considering each piece separately and then combining the results. This involves checking for continuity and differentiability at the points where the pieces meet.

Are there any limitations or drawbacks to using piecewise smooth and piecewise continuous functions?

One limitation of using piecewise smooth and piecewise continuous functions is that they may not accurately represent all real-world phenomena, as some phenomena may have more complex or unpredictable patterns. Additionally, evaluating these functions can be time-consuming and require careful consideration of each piece and its properties.

Back
Top