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

  • Thread starter Rafajafar
  • Start date
In summary, you need to find a polynomial that interpolates between the local max/min of the function (or local extrema).
  • #1
Rafajafar
4
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
  • #2
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]
 
  • #3
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?
 

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

1. What is the first step to take when unsure how to go about a scientific task?

The first step is to carefully analyze the task and identify the specific problem or goal. This will help you determine the best approach to take.

2. How do I determine the appropriate methodology to use?

Consider the resources and materials available to you, as well as the desired outcome of the task. Research similar studies or experiments and consult with colleagues or mentors for their input and advice.

3. What should I do if I encounter unexpected results?

Take a step back and review your methods and procedures to see if there were any errors or variables that could have affected the results. If the issue cannot be identified, seek advice from other scientists or experts in the field.

4. How do I effectively communicate my uncertainties in a scientific study?

Be transparent and thorough in your reporting. Clearly state any limitations or uncertainties in your methodology, data, or conclusions. This will help others accurately interpret your findings.

5. What are some strategies for overcoming uncertainty in scientific research?

Collaborate with others, seek guidance from experts, and continuously review and revise your methods and procedures. Be open to alternative approaches and be willing to adapt as new information or data becomes available.

Back
Top