Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question
1

How to remove radicals from an equation

asked 1 year ago

vidyarthi gravatar image

updated 1 year ago

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
E.canonicalize_radical()

gives the output same as E

Any alternative? Thanks beforehand.

Preview: (hide)

Comments

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 (a2+b2+c2+a2+b2+c2)(a2+b2+c2a2+b2+c2)=0then expand and factorize...

dan_fulea gravatar imagedan_fulea ( 1 year ago )

1 Answer

Sort by » oldest newest most voted
2

answered 1 year ago

Emmanuel Charpentier gravatar image

@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
sage: from sympy.solvers.solvers import unrad
sage: unrad(Eq._sympy_())
(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,

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 1 year ago

Seen: 307 times

Last updated: Aug 01 '23