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

Revision history [back]

click to hide/show revision 1
initial version

answered 8 years ago

B r u n o gravatar image

Here is a partial answer (I hope somebody can come with a better one!):

Plotting the solutions of an equation in R3 can be done using the method implicit_plot3d. So you can visualize the solutions of both equations as follows:

sage: var('x,y,z')
sage: s1 = implicit_plot3d((x+y)*(x-z^3), (x,-2,2),(y,-2,2), (z,-2,2))
sage: s2 = implicit_plot3d(x*y+y^2, (x,-2,2),(y,-2,2), (z,-2,2), color="red")
sage: show(s1)
[solutions of the first equation]
sage: show(s2)
[solutions of the second equation]

You can also visualize both solution sets together:

sage: show(s1+s2)

Since you are looking for solutions in R3, having both equations equal zero is the same as the sum of their squares equal zero. So in principle you could do

sage: implicit_plot3d(((x+y)*(x-z^3))^2+(x*y+y^2)^2, (x,-2,2),(y,-2,2), (z,-2,2))

But the problem is that if you try this you will see an empty set of solutions. I am not sure about the reason.

Finally, even though it is not visualization, note that you can have also the set of solutions using solve:

sage: sol = solve([(x+y)*(x-z^3),x*y+y^2], [x,y,z])
sage: sol
[[x == r1, y == -r1, z == r2], [x == 0, y == 0, z == r3], [x == r4^3, y == 0, z == r4]]