How can I interpolate a curve with relative min/max or roots at discrete points?

  • Context: Undergrad 
  • Thread starter Thread starter Rafajafar
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on interpolating a curve with specified relative minima and maxima at discrete points using mathematical functions. The user seeks to represent these points, which can include local extrema or roots, through a polynomial function. The proposed method involves calculating the anti-derivative of the derivative function, f'(x) = (x - a)(x - b)(x - c)(x - d)(x - e), where the points a, b, c, d, and e are the specified extrema. The goal is to simplify the resulting function for computational efficiency, potentially using trigonometric identities or spline methods.

PREREQUISITES
  • Understanding of polynomial functions and their properties
  • Knowledge of calculus, specifically derivatives and anti-derivatives
  • Familiarity with interpolation techniques, including spline interpolation
  • Basic concepts of wave functions and trigonometric identities
NEXT STEPS
  • Study polynomial interpolation methods, focusing on Lagrange and Newton forms
  • Learn about spline interpolation, particularly cubic splines
  • Investigate the application of trigonometric identities in simplifying polynomial equations
  • Explore numerical methods for finding roots of functions and their applications in curve fitting
USEFUL FOR

Mathematicians, data scientists, and programmers looking to implement curve fitting techniques with specific constraints on local extrema or roots in their projects.

Rafajafar
Messages
4
Reaction score
0
Hi... I'm a programmer, and I think I can solve a particular problem I'm having a lot easier if I only had a little more knowledge in math. Perhaps one of you can point me in the right direction so I can teach myself what I want to know.

The concept is this:

You have a set of discrete points such that the set x = (a, b, c, d, ...). All points a, b, c, d, etc. are not periodic in nature (normally). In other words, they could be regular such as x = (2, 4, 6, 8), or x = (2, 4, 8, 16) but more often than naught they will have no pattern such as with x = (all primes).

Each of these points are to represent a relative min, a relative max, OR a relative min/max of an equation. (all three will work for my purposes). I need to interpolate a curve that has a relative min/max for each of the points in set {x}. Preferably, I would like this to be the sum of wave functions so that the actual equation itself can be reduced into a much simpler function via trig identities (more simple meaning easier for a computer to store... reduced). If that is not possible, some sort of spline could work too... maybe.

It does not matter what happens between the points, so long as at the points themselves they are a relative min/max. This min/max value can be a set number such as 1 / -1 . It doesn't matter, I just need them to peak at those discrete points and only those discrete points.

The cardinality of x is variable.

To help you picture what I'm talking about, picture a wave function with the peaks of the function being one of those discrete points.

What method should I use to accomplish this?

EDIT: Another alternative to min/max peaks could be the roots of the function.
 
Last edited:
Physics news on Phys.org
Rafajafar said:
Each of these points are to represent a relative min, a relative max, OR a relative min/max of an equation. (all three will work for my purposes). I need to interpolate a curve that has a relative min/max for each of the points in set {x}. Preferably, I would like this to be the sum of wave functions so that the actual equation itself can be reduced into a much simpler function via trig identities (more simple meaning easier for a computer to store... reduced). If that is not possible, some sort of spline could work too... maybe.
If I interprete this correctly, then what you need is a polynomial. The local max/min of the function (or local extrema) is just where f'(x) = 0.
Say, the function has the following set of extremas: {a, b, c, d, e}
Then f'(a) = f'(b) = f'(c) = f'(d) = f'(e) = 0
So, the simplest curve you can find is the anti-derivative of:
f'(x) = (x - a)(x - b)(x - c)(x - d)(x - e)
So the curve is:
[tex]f(x) = \int f'(x) dx[/tex]
 
Is there any way to do this such that the number of terms is less than the number of points in the set of extrema?
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
12K
Replies
9
Views
3K
  • · Replies 46 ·
2
Replies
46
Views
7K
Replies
11
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K