| 1 | initial version |
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
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.