# Max and Min of a poly

LSDwhat?
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 :
if (-b/(2*a)>=x1 && -b/(2*a)<=x2)
return (-b/(2*a));

## Answers and Replies

Staff Emeritus
Gold Member
I have no Idea how to make this algorithm , could you help ?
Figure out the math first, then worry about how to program it.

LSDwhat?
Figure out the math first, then worry about how to program it.

I dont know the math that's why I'm asking. I dont want the java code.

Staff Emeritus
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?

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

Alternatively, what do you know about the shape of the graphs of parabolas?

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.

crd
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.

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