# How to remove radicals from an equation

If an equation has several radicals, is it possible to remove the radicals to get a radical free equation in SageMath? The simplify_radical() method seems not to exist in SageMath. The canonicalize_radical() seems to do nothing. For example,

E=a^2 + b^2 + c^2 + sqrt(a^2 + b^2 + c^2)==0


gives the output same as E

Any alternative? Thanks beforehand.

edit retag close merge delete

You may not do more, except if you may want to explicitly introduce further solutions. Just use a new letter for the radical, and make all equations algebraic. This may be a step backwards in the solution, but it is a step forwards in the question. In the given example, you may consider - by introducing new solutions - instead of $E$ the equation $$(a^2+b^2 +c^2+\sqrt{a^2 +b^2+c^2})(a^2+b^2 +c^2-\sqrt{a^2 +b^2+c^2})=0$$then expand and factorize...

( 2023-08-01 01:28:35 +0200 )edit

Sort by ยป oldest newest most voted

@dan_fulea's answer is correct, but you may avoid the hassle of driving yourself the transformations by using Sympy's unrad function :

sage: var("a, b, c")
(a, b, c)
sage: Eq=a^2 + b^2 + c^2 + sqrt(a^2 + b^2 + c^2)==0
(a**4 + 2*a**2*b**2 + 2*a**2*c**2 - a**2 + b**4 + 2*b**2*c**2 - b**2 + c**4 - c**2,
[])


Note that this function returns a (system of) equation(s) whose roots include the roots of the original equation ; you will have to filter them bu checking that the candidate root indeeded satisfy the original equation.unrad?. Example :

sage: [(s, Eq.subs(s)) for s in unrad(Eq._sympy_())[0]._sage_().solve(a, solution_dict=True)]
[({a: -sqrt(-b^2 - c^2 + 1)}, 2 == 0),
({a: sqrt(-b^2 - c^2 + 1)}, 2 == 0),
({a: -sqrt(-b^2 - c^2)}, 0 == 0),
({a: sqrt(-b^2 - c^2)}, 0 == 0)]


By squaring, unrad added solutrions of the transformed equation which are not roots of Eq.

For details, unrad?...

HTH,

more