fsolve to solve 5th order polynomial

I would like to solve the following polynomial numerically for r:
I am trying to use fzero as follows:
r= (5/(r^2*9))- ((2)/(9*(6-r)^2))
x0 = 10; % some initial point
x = fzero(r,x0)
How can this be solved using fzero?

 Risposta accettata

jojo
jojo il 14 Dic 2019
This works.
fun=@(r) (5/(r^2*9))- ((2)/(9*(6-r)^2))-r;
x0 = 10; % some initial point
x = fsolve(fun,x0)

Più risposte (1)

Walter Roberson
Walter Roberson il 14 Dic 2019

1 voto

You have an equation of the form A=B. Subtract B from both sides giving an equation of the form (A) - (B) = 0. Now you can fsolve

Categorie

Scopri di più su Mathematics in Centro assistenza e File Exchange

Richiesto:

il 14 Dic 2019

Risposto:

il 14 Dic 2019

Community Treasure Hunt

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

Start Hunting!

Translated by