I notice that almost all of new calculators are able to display the roots of quadratic equations in exact form. For example:
x^2-16x+14=0
x1=8+5sqrt2
x2=8-5sqrt2
What algorithm could I use to achieve that? I've been searching around but I found no results related to this problem
Assuming your quadratic equation is in the form
you get the two roots by
when for one you use the
+
between b and the square root, and for the other the-
. If you want to take something out of the square root, just compute the factors of the argument and take out the ones with exponent greater than 2.By the way, the two root you posted are wrong.