solve, command reveals solution for each part of my polynomial
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Gavin Seddon
le 8 Juin 2016
Commenté : Gavin Seddon
le 10 Juin 2016
however the solution presented is for each part of the polynomial:
>> solve((1211*x^6)/2500 + (9953*x^5)/10000 + (193*x^4)/125 - (681*x^3)/200 - (9549*x^2)/10000 + (3117*x)/1000 + 304/25 == 0,x)
ans =
root(z^6 + (9953*z^5)/4844 + (3860*z^4)/1211 - (17025*z^3)/2422 - (9549*z^2)/4844 + (15585*z)/2422 + 30400/1211, z, 1)
root(z^6 + (9953*z^5)/4844 + (3860*z^4)/1211 - (17025*z^3)/2422 - (9549*z^2)/4844 + (15585*z)/2422 + 30400/1211, z, 2)
root(z^6 + (9953*z^5)/4844 + (3860*z^4)/1211 - (17025*z^3)/2422 - (9549*z^2)/4844 + (15585*z)/2422 + 30400/1211, z, 3)
root(z^6 + (9953*z^5)/4844 + (3860*z^4)/1211 - (17025*z^3)/2422 - (9549*z^2)/4844 + (15585*z)/2422 + 30400/1211, z, 4)
root(z^6 + (9953*z^5)/4844 + (3860*z^4)/1211 - (17025*z^3)/2422 - (9549*z^2)/4844 + (15585*z)/2422 + 30400/1211, z, 5)
root(z^6 + (9953*z^5)/4844 + (3860*z^4)/1211 - (17025*z^3)/2422 - (9549*z^2)/4844 + (15585*z)/2422 + 30400/1211, z, 6)
whereas I want a single X value for y = 0
Will someone tell me the correct command?
g.
0 commentaires
Réponse acceptée
John D'Errico
le 8 Juin 2016
Modifié(e) : John D'Errico
le 8 Juin 2016
There are no real roots.
You can ask for a "single" X value that works, but no matter what you do, you cannot make magic, unless of course, your name is Harry Potter. It might be, I guess. He did leave Hogwarts.
I suppose that possibly your question is really how to turn that mess into actual umbers. If so, just use vpa.
syms x
r = solve((1211*x^6)/2500 + (9953*x^5)/10000 + (193*x^4)/125 - (681*x^3)/200 - (9549*x^2)/10000 + (3117*x)/1000 + 304/25 == 0,x);
vpa(r)
ans =
- 1.3989312138161239546724799986628 + 1.9811978680634290116114610605855i
- 1.3989312138161239546724799986628 - 1.9811978680634290116114610605855i
- 0.92035026602535783679025120533384 - 1.0426356256188857001302004733061i
- 0.92035026602535783679025120533384 + 1.0426356256188857001302004733061i
1.2919280529215808831225165054004 - 0.73309990384079756483990991478414i
1.2919280529215808831225165054004 + 0.73309990384079756483990991478414i
Feel free to pick any of those complex roots.
Mathematics can be cruel. It refuses to do what you want, instead, doing what it wishes, blithely ignoring the needs of others. :)
Plus de réponses (2)
Gavin Seddon
le 9 Juin 2016
1 commentaire
Walter Roberson
le 9 Juin 2016
In all newer releases, when vpasolve() sees that you have a polynomial to solve, it is going to return all of the roots. In order releases, it was potentially random as to which of the roots it returned.
If you know the approximate root, you could determine which of the 6 roots is closest to the one you are looking for. However, it seems improbable to me that you would be seeing an imaginary root on a distance/time plot, which suggests that you have given the wrong equations.
Voir également
Catégories
En savoir plus sur Mathematics and Optimization 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!