How can I find the maximum and minimum of a Parabola polynom using Java?

  • Thread starter LSDwhat?
  • Start date
  • Tags
    Max
In summary, when finding the maximum and minimum of a parabola with the equation ax2+bx+c, you first need to determine the values of a, b, and c. Then, using the theorem that states 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, you can find the maximum and minimum values by checking the boundary points and the point -b/2a. It is important to note that x is the input variable, while Y is
  • #1
LSDwhat?
13
0
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));
 
Physics news on Phys.org
  • #2
LSDwhat? said:
I have no Idea how to make this algorithm , could you help ?
Figure out the math first, then worry about how to program it.
 
  • #3
Hurkyl said:
Figure out the math first, then worry about how to program it.

I don't know the math that's why I'm asking. I don't want the java code.
 
  • #4
Well, what do you know about finding minima and maxima?

Alternatively, what do you know about the shape of the graphs of parabolas?
 
  • #5
Hurkyl said:
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.
 
  • #6
LSDwhat? said:
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
 
  • #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.
 

FAQ: How can I find the maximum and minimum of a Parabola polynom using Java?

What is the definition of "max and min of a poly"?

The maximum and minimum of a polynomial (poly) refers to the highest and lowest values of the polynomial function. It represents the highest and lowest points on the graph of the polynomial.

How do you find the max and min of a poly?

To find the maximum and minimum of a polynomial, you can use calculus by taking the derivative of the polynomial function and setting it equal to zero. The resulting values will be the x-coordinates of the maximum and minimum points. You can then plug these values back into the original polynomial to find the corresponding y-coordinates.

What do the max and min of a poly represent?

The max and min of a polynomial represent the extreme values of the function. The maximum point represents the highest point on the graph, while the minimum point represents the lowest point on the graph. These points can be used to determine the range of the polynomial function.

Can a polynomial have more than one max or min?

Yes, a polynomial can have multiple maximum and minimum points. This usually occurs when the polynomial has a high degree (power) and contains multiple terms. Each max and min point will have a corresponding peak or valley on the graph of the polynomial function.

How are the max and min of a poly related to the roots?

The roots (or zeros) of a polynomial function are the x-intercepts on the graph. They do not necessarily correspond to the max and min points. However, the max and min points can be used to identify the intervals where the polynomial is increasing or decreasing, which can help in finding the roots of the polynomial.

Back
Top