Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

@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,