# Revision history [back]

When you do solve(eqns,z), Sage is trying to find z that satisfies both equations and finds that there is no such z. However, if you use solve(eqns,[x,z]), it can find a solution and gives the one you want.

solve(eqns,[x,z])


gives

[[x == y, z == 2*y^2]]


For the simple elimination you suggest in your question, you could just do a substitution.

eq=x^2+y^2==z
eq.subs(x=y)


gives

z==2*y^2