Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Unsure how to go about this

  1. Aug 13, 2006 #1
    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: Aug 13, 2006
  2. jcsd
  3. Aug 14, 2006 #2


    User Avatar
    Homework Helper

    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]
  4. Aug 14, 2006 #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?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook