Why does the Roots function exist when you can do the same thing with Solve?
views:
69answers:
2
+2
A:
When you're actually looking for a root, Roots
produces a cleaner output.
Also, from the manual:
Roots
is generated whenSolve
and related functions cannot produce explicit solutions. Options are often given in such cases.
domsterr
2010-09-13 23:04:51
So the only difference is the style of the output?
Bravery Onions
2010-09-13 23:10:30
Well, and this is how I understand it so don't take it for granted, 'Roots' is one of many algorithms used to solve equations and 'Solve' returns it when it can't give anything better. It's some kind of sub-function.
domsterr
2010-09-13 23:42:44
+3
A:
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
.
Janus
2010-09-14 03:34:16
Also note that Solve output are rules, while Roots output are equations.You can use "ToRules" to convert from equations to rules
belisarius
2010-09-16 18:02:23