Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I tinkered with your equation and finally had something that looks like a solution. But this is not the way I expect solving equations with sage.

var('x y z')
expr = (1+x - sqrt((1+x)^2-4*y))^2
eqn1 = expr.expand().simplify_full() == z
show(eqn1)

eqn2 = eqn1.subtract_from_both_sides(2*x^2 +4*x -4*y +2)
eqn3 = eqn2.lhs()^2 == eqn2.rhs()^2
show(eqn3)

eqn4 = eqn3.expand()
eqn5 = eqn4.subtract_from_both_sides(eqn4.lhs())
show(eqn5)
sol = solve(eqn5,y)
for s in sol: show(s)