开发者

What's the difference between Solve[lhs == rhs, x] and Roots[lhs == rhs, x] in Mathematica 7?

Why do开发者_开发问答es the Roots function exist when you can do the same thing with Solve?


Roots only applies to polynomial equations such as x^2==1. Solve handles polynomial equations over the complex numbers as well, but it lacks a lot of options for more advanced polynomial gymnastics.
For instance Roots allows you to specify that you want solutions over the ring of integers modulo some n, or that you want solutions to quartic solution handled in a special way etc.

In short, if you don't need any of the specail features of Roots just stick with Solve.


When you're actually looking for a root, Roots produces a cleaner output.

Also, from the manual:

Roots is generated when Solve and related functions cannot produce explicit solutions. Options are often given in such cases.

http://reference.wolfram.com/mathematica/ref/Roots.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜