All published worksheets from http://sagenb.org
Image: ubuntu2004
Functions of several variables: ,
Functions of several variables are used to keep track of things like temperature, wind speed, barometric pressure, altitude, profit, and much more. Pretty much any time you want to understand a variable which changes, then functions of several varialbes are used to model this.
To plot a function , use plot3d.
Here we plot the function with its traces. We plot the traces as parametric curves in 3d.
And here is a contour plot (make sure you evaluate the definition of above). Here, the shading helps us to know which values are higher and which values are lower. In this plot, higher values are lighter.
Or with specific contour lines (where , , and ). Here, the shading only happens between the contour lines; the white outside of the contour lines doesn't indicate anything.
We can also plot 3d contour plots of functions of the form using implicit_plot3d.
Vector Fields
To plot 3d vector fields, we first define a function which plots them.
Parametric surfaces
You can see many examples of parametric plots in the Sage documentation, either by typing "parametric_plot3d?" in a cell, or going here: http://sagemath.org/doc/reference/sage/plot/plot3d/parametric_plot3d.html#sage.plot.plot3d.parametric_plot3d.parametric_plot3d