Extremum of polynomial?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello Experts,
Consider I have polynomial coefficients vector p = [a_n,...,a_0].
I do d/dx p and get the Derivative of p.
I need to find the extremum points - to find the roots of p'.
Is there a function in Matlab that gets polynomial p, and finds it's extremum points - min/max. Like fminsearch, that doesn't work with such vector.
Please tell me what function do it.
Thanks a lot!
0 comentarios
Respuestas (1)
Walter Roberson
el 12 de Oct. de 2011
If the polynomial coefficients are numeric, then take the derivative of p and use roots() to solve for zeros; take those roots and substitute them back in to the polynomial to get the values at those locations.
As usual, to determine whether a particular point is a min or max or inflection point, take the second derivative of p, substitute in the locations you got from roots() and check the signs of the values: a positive value indicates a minimum, a negative value indicates a maximum, and 0 indicates an inflection point.
People sometimes mean something a shade different by "extremum". Keep in mind that for any polynomial with real coefficients, that as the free variable goes to infinity or negative infinity, the polynomial must go to one of the infinities as well. Even-order polynomials must go to the same infinity on both ends, odd-order polynomials must go to different infinities on the two ends; the sign of the coefficient of the highest-order term tells you which is which.
"Extremum" are sometimes only considered over a limited range: in such a case examine the value of the polynomial at the ends of the range, and examine the value of the polynomial at only the roots that are within the range.
2 comentarios
Walter Roberson
el 12 de Oct. de 2011
I get frustrated when posters leave out major information from their question.
Ver también
Categorías
Más información sobre Polynomials en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!