| 1 | initial version |
The "numerical" solution will be slow and artefactual (the rate of variatuns of x, y and z are wildly different, and "one-size-fits-all" plot_points will actually fit none...) :
var("x, y, z")
f1(x, y, z)=y-x^3
f2(x, y, z)=z-x^5
S1=implicit_plot3d(f1, (-5, 5), (-3, 3), (-5, 5), color="blue", opacity=0.5, plot_points=200)
S2=implicit_plot3d(f2, (-5, 5), (-3, 3), (-5, 5), color="red", opacity=0.5, plot_points=200)
f3(x, y, z)=f1(x, y, z)^2+f2(x, y, z)^2-0.01
S3=implicit_plot3d(f3, (-5, 5), (-3, 3), (-5, 5), color="green", opacity=1, plot_points=200)
You can visualize by displaying S1+S2+S3. Ugly...
Better (but more work) to solve for y and z, and plot parametrically wrt x :
Sol=solve([f1(x, y, z), f2(x, y)], (y, z), solution_dict=True)
A3 = parametric_plot3d([x, Sol[0][y], Sol[0][z]], (x, -5^(1/5), 5^(1/5)), color="green")
S1+S2+A3 is faster and better-looking...
More general case : solve z as a function (possibly multi-valued) of x and y and plot3d the result...
HTH,
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.