Different answers from 'roots' & 'solve' command?

2 ビュー (過去 30 日間)
Subham Shit
Subham Shit 2015 年 4 月 7 日
編集済み: Matt J 2015 年 4 月 7 日
>> R=roots([3 0 0 0 0 4 1])
R =
0.9017 + 0.6256i
0.9017 - 0.6256i
-0.2767 + 1.0147i
-0.2767 - 1.0147i
-1.0000 + 0.0000i
-0.2502 + 0.0000i
>> R(R == real(R))
ans =
-1.0000
-0.2502
>> solx = solve(3*x^6 + 4*x + 1==0, x)
solx =
-1
RootOf(z^5 - z^4 + z^3 - z^2 + z + 1/3, z)[1]
RootOf(z^5 - z^4 + z^3 - z^2 + z + 1/3, z)[2]
RootOf(z^5 - z^4 + z^3 - z^2 + z + 1/3, z)[3]
RootOf(z^5 - z^4 + z^3 - z^2 + z + 1/3, z)[4]
RootOf(z^5 - z^4 + z^3 - z^2 + z + 1/3, z)[5]
>> solx(solx == real(solx))
ans =
-1
>>
  1 件のコメント
Subham Shit
Subham Shit 2015 年 4 月 7 日
編集済み: Subham Shit 2015 年 4 月 7 日
Using 'roots' I am getting 2 real solution but using 'solve' I am getting 1 real solution of same equation. How is that possible?

サインインしてコメントする。

採用された回答

Matt J
Matt J 2015 年 4 月 7 日
編集済み: Matt J 2015 年 4 月 7 日
SOLVE was not able to find a closed symbolic form for all the roots (because one doesn't exist for this polynomial). It therefore cannot assess whether the ones not in closed form are real.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAssumptions についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by