Curve fitting piecewise function

In summary, the speaker is discussing a problem of making a smooth curve, g2(x), that fits the given piecewise function, g1(x). The only conditions are that both curves must start at (0,0) and end at (a,0), and have equal areas. The speaker suggests using interpolating polynomials, Bezier curves, and B-Splines for approximations without considering area preservation. They also suggest converting the function to boxes for easier analysis and mention examining the relationship between overlapping and disjoint areas to determine the derivatives of g2(x). The speaker is open to any ideas or suggestions for solving the problem.
  • #1
dxdy
10
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
  • #2
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.
 

Related to Curve fitting piecewise function

1. What is a piecewise function?

A piecewise function is a function that is defined by different rules or equations over different intervals of its domain. This allows for more flexibility in modeling data that may have different behaviors in different regions.

2. How is curve fitting used with piecewise functions?

Curve fitting is used to find the best-fitting piecewise function that represents a set of data points. This involves finding the optimal set of parameters for the different equations that make up the piecewise function, in order to minimize the difference between the function and the data points.

3. What are the benefits of using piecewise functions for curve fitting?

Piecewise functions allow for a more accurate representation of data that has different behaviors in different regions. This can result in a better fit and more accurate predictions compared to using a single equation to model the entire dataset.

4. Are there any limitations to using piecewise functions for curve fitting?

One limitation is that the resulting piecewise function may not be easily interpretable or generalizable beyond the specific data set it was fitted to. Additionally, finding the optimal set of parameters for a complex piecewise function can be computationally intensive.

5. How can I determine the appropriate number of intervals for a piecewise function?

The number of intervals for a piecewise function can vary depending on the complexity of the data and the desired level of accuracy. One approach is to start with a small number of intervals and gradually increase until the fit no longer improves significantly. Another approach is to use expert knowledge or statistical methods to determine the optimal number of intervals.

Similar threads

Replies
2
Views
2K
Replies
5
Views
1K
Replies
4
Views
2K
Replies
3
Views
1K
Replies
3
Views
905
  • MATLAB, Maple, Mathematica, LaTeX
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
446
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
913
Replies
24
Views
2K
Back
Top