tags:

views:

69

answers:

2

Why does the Roots function exist when you can do the same thing with Solve?

+2  A: 

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

domsterr
So the only difference is the style of the output?
Bravery Onions
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
+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
Also note that Solve output are rules, while Roots output are equations.You can use "ToRules" to convert from equations to rules
belisarius