solve() gives incorrect answer
古いコメントを表示
I am having trouble with the solve() command in Matlab R2012a 64 bit. I will supply an example to show what I mean. I stated the specificiation of my computer as well, I do not know if that is considered useful.
----------------------------
COMPUTER SPECIFICATIONS
----------------------------
Windows 7 Enterprise SP 1
64-bit OS
Intel Core i7-2670QM CPU 2.2 GHz
8,00 GB RAM
----------------------------
EXAMPLE
----------------------------
I have a function
G = (- 13*x^2 + 2*x + 1)/(10*(x^5)^(1/2)).
I am interested in the intersection with y = -1.
Both
solve(G+1)
and
solve('(- 13*x^2 + 2*x + 1)/(10*(x^5)^(1/2)) == -1')
give me
ans =
1
This is only one of the intersections, as can be seen from the figure below. Does anyone have an idea what I might be overlooking?
Thanks in advance,
Jori

1 件のコメント
Walter Roberson
2012 年 11 月 6 日
The other solution is the rather messy
69/400 + (1/1200)*3^(1/2)*((27883*(127918+30*315201^(1/2))^(1/3) + 400*(127918+30*315201^(1/2))^(2/3) + 1009600)/(127918 + 30*315201^(1/2))^(1/3))^(1/2) + (1/1200)*6^(1/2)*((27883*(127918 + 30*315201^(1/2))^(1/3) - 200*(127918 + 30*315201^(1/2))^(2/3) - 504800 + 1193127*3^(1/2)*((127918 + 30*315201^(1/2))^(1/3)/(27883*(127918 + 30*315201^(1/2))^(1/3) + 400*(127918 + 30*315201^(1/2))^(2/3) + 1009600))^(1/2)*(127918 + 30*315201^(1/2))^(1/3))/(127918 + 30*315201^(1/2))^(1/3))^(1/2)
... for whatever that is worth ;-)
採用された回答
その他の回答 (1 件)
Matt Fig
2012 年 11 月 6 日
Try this way:
>> solve('(- 13*x^2 + 2*x + 1)/(10*(x^5)^(1/2))+1')
ans =
1
0.804852915577
0.293548879142
- 0.204200897359 + 0.0250516778169*i
- 0.204200897359 - 0.0250516778169*i
1 件のコメント
カテゴリ
ヘルプ センター および File Exchange で Code Performance についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!