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

Max and Min of a poly

  1. Mar 4, 2010 #1
    I need to make to functions in java that gives the maxim and minin of the Parabola polynom ax2+bx+c for an interval of two given points.

    I have no Idea how to make this algorithm , could you help ?

    I have come to something like this :
     
  2. jcsd
  3. Mar 4, 2010 #2

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Figure out the math first, then worry about how to program it.
     
  4. Mar 4, 2010 #3
    I dont know the math that's why I'm asking. I dont want the java code.
     
  5. Mar 4, 2010 #4

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Well, what do you know about finding minima and maxima?

    Alternatively, what do you know about the shape of the graphs of parabolas?
     
  6. Mar 4, 2010 #5
    well the maxima should be the value of Y which is the bigger to a value of X and the minima the same.

    About the shape its sinusoidal waves.
     
  7. Mar 4, 2010 #6

    crd

    User Avatar

    Careful, you are mixing apples and oranges. The max(min) will be the value of Y which is bigger(smaller) than every other value of Y for some region around your max(min) value.

    Not X like you said, X is the input variable that determines your Y.

    You should try graphing ax^2 + bx + c for various values of a, b, and c to verify if it has "sinusoidal waves."

    that also might give you some intuition into the the max(min) of a parabola
     
  8. Mar 5, 2010 #7
    Theorem: If E ⊂ R and f: E → R, and f has a maximum or minimum at x ∈ E, then one of the following three is true:
    (1) x is a boundary point of E,
    (2) f'(x) = 0, or
    (3) f is not differentiable at x.

    In your case, f(x) = ax2 + bx + c and E is the interval [x1, x2]. Then the only possibilities are these: (1) x is one of the boundary points x1 or x2 of E, or (2) f'(x) = 2ax + b = 0, so x = -b/2a. Look at the values of f at those three points; the largest one is the maximum, and the smallest one is the minimum.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Max and Min of a poly
  1. Relative Max/Min (Replies: 3)

Loading...