Cubic Fit to minimize a polynomial

4 vues (au cours des 30 derniers jours)
Haris Hameed
Haris Hameed le 12 Août 2020
Modifié(e) : Haris Hameed le 18 Août 2020
hi,
using "cubic fit" calculate : min x^4 + 2*x + 4
i need some guidance how to code this?
i have searched and found this formulation for cubic fit

Réponse acceptée

Walter Roberson
Walter Roberson le 12 Août 2020
Use calculus. To find min(f(x)) then solve . The roots of that give you the critical points; call those for the moment. Then, examine . Positive values indicate that the corresponding was a minima.
For a degree 4 polynomial, the derivative is degree 3, and there are closed form solutions for the roots of a polynomial of degree 3. Therefore you can calculate the exact critical points, and test them.
You will only find one real-valued root. You might assume that it must be the minima, but in the general case, it will not be a safe assumption.
  1 commentaire
Haris Hameed
Haris Hameed le 12 Août 2020
Thank you. i understand it now

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Polynomials dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by