Curve fitting piecewise function

Click For Summary
The discussion revolves around creating a smooth curve, g_2(x), that fits a given piecewise function, g_1(x), while adhering to specific conditions: both curves must start and end at the same points, and their areas must be equal. Suggestions include using interpolating polynomials, Bezier curves, and B-Splines or NURBS for approximations. One participant proposes converting the function into rectangular boxes to simplify the area preservation analysis. There is also a consideration of whether g_2 needs to be Riemann integrable. Overall, the conversation emphasizes the complexities of achieving a smooth curve that meets the specified criteria.
dxdy
Messages
10
Reaction score
0
I have a piecewise function described by g_1(x) as shown in the figure below. I wish to make a smooth curve, g_2(x), to fit (but not necessarily exactly) g_1(x). The only conditions are:

  • Both curves must start at (0,0) and end at (a,0).
  • The area of both curves must be the same.

How do you suggest I go about finding an expression for this? I am looking for as many variates of g_2(x) that meet these conditions.

[PLAIN]http://dump.omertabeyond.com/?di=1613174606062
 
Last edited by a moderator:
Physics news on Phys.org
Hey dxdy and welcome to the forums.

In some of my research I am working on the same problem you are, but the functions are more restricted (think lots of rectangular boxes and nothing else). I am not working on it right now but I will be working on it in the summer (starting at about christmas).

I haven't worked on it long, but I haven't found anything that can really help me for functions that are very broad and not restricted to any particular subset of functions.

In terms of approximations without area preservation not being considered, you are best to look at something like interpolating polynomials (Langrange), Bezier curves in any dimension, and for the ultimate interpolating framework B-Splines and NURBS.

One suggestion that I might have is to convert your function to one of boxes and then analyze the area preservation problem in terms of these boxes. The reason I say this is that it might be easier just to deal with boxes and not any general type of region.

Also what are the properties of the g2 function? Does it have to be Riemann integrable? From what you are trying to find it sounds like it does.

I am going to examine looking at how different areas both overlapping and disjoint relate to each other in order to determine the derivatives of what you call the "g2" function, but I don't want to start this while I'm doing coursework.

If you have any ideas, I'd be very glad to hear them.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K