solve, command reveals solution for each part of my polynomial
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
John D'Errico
2016 年 6 月 8 日
編集済み: John D'Errico
2016 年 6 月 8 日
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. :)
その他の回答 (2 件)
Gavin Seddon
2016 年 6 月 9 日
1 件のコメント
Walter Roberson
2016 年 6 月 9 日
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.
参考
カテゴリ
Help Center および File Exchange で Mathematics and Optimization についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!