How to distinguish exact roots using Solve?

• Mathematica
• aheight
In summary, the conversation discusses how to distinguish between exact solutions and solutions in terms of Roots when using the Solve function in Mathematica. It is mentioned that when the polynomial equation cannot be solved in terms of radicals, Solve returns Root objects, while for simpler equations, it returns exact solutions in terms of radicals. The solution is to use pattern matching or the Head function to differentiate between the two types of solutions. Additionally, it is noted that Root objects are exact numeric quantities and can be converted to approximate values using N or to radicals using ToRadicals.
aheight
Can someone help me distinguish when Solve[polynomial==0,x] returns exact solutions as opposed to solutions in terms of Roots? For example, if I code:

myroots = x /. Solve[1/2 + 1/5 x + 9/10 x^2 + 2/3 x^3 - 1/5 x^4 + 3/11 x^5 == 0, x]

this cannot be solved in terms of radicals so Solve returns Root objects:

{Root[165+66 #1+297 #1^2+220 #1^3-66 #1^4+90 #1^5&,1],
Root[165+66 #1+297 #1^2+220 #1^3-66 #1^4+90 #1^5&,2],
Root[165+66 #1+297 #1^2+220 #1^3-66 #1^4+90 #1^5&,3],
Root[165+66 #1+297 #1^2+220 #1^3-66 #1^4+90 #1^5&,4],
Root[165+66 #1+297 #1^2+220 #1^3-66 #1^4+90 #1^5&,5]}

but
myroots = x /. Solve[1/2 + 1/5 x + 9/10 x^2 + 2/3 x^3 - 1/5 x^4 == 0, x]

returns exact solutions in terms of radicals. I can't figure out how to distinguish the two as in:

If[solve returns exact solutions,
do this;
,
else if Roots are returned do this
]

Can someone help me do this?

A Root is an exact numeric quantity. You can use N on it to get an approximate value to any degree of precision needed. You can also use ToRadicals on it if needed.

You should read the help files on pattern matching. The pattern which matches a Root object is "_Root". Or you can use Head, which returns the head of an expression:

Code:
If[Head[expr]===Root, ...]

aheight

1. How does Solve determine the exact roots of an equation?

Solve uses advanced algorithms and techniques, such as the Newton-Raphson method and the Durand-Kerner method, to find the exact roots of an equation. These methods involve iterative processes that gradually refine the estimate of the root until it reaches a desired level of accuracy.

2. What is the difference between exact and approximate roots?

Exact roots are the precise solutions to an equation, while approximate roots are estimates that may be close to the exact roots but not exact. Approximate roots can be calculated using numerical methods, while exact roots can be found algebraically.

3. Can Solve find the exact roots of all types of equations?

No, Solve is limited to finding the exact roots of certain types of equations, such as polynomial equations. It may not be able to find the exact roots of more complex equations, such as transcendental equations.

4. How can I check if the roots found by Solve are correct?

You can check the roots by substituting them back into the original equation and verifying that they satisfy the equation. You can also use a graphing calculator or software to graph the equation and visually confirm that the roots are correct.

5. Are there any limitations to using Solve to find exact roots?

Yes, there are some limitations to using Solve. It may not be able to find the exact roots if the equation is too complex or if it has multiple roots that are very close together. In these cases, it may be necessary to use other methods or software to find the roots.

• MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
503
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
452
• MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
4K
• Linear and Abstract Algebra
Replies
2
Views
780
• MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K