You need to know a few things before you can use this Mathematica notebook.  Here are the basics:

"Cells" are denoted by the square brackets on the right.

The "input cells" in this notebook all start with "Clear", and  can be run to give you graphs.  After the "Clear" command, each cell contains some parameters which you may redefine, the functions for the problem (which depend on the parameters), and some plotting commands which generate graphs.

To run an input cell, put the cursor anywhere in the cell (use the mouse and click the left mouse button to place the cursor), hold down the  "Shift" key, and hit "Return" while still holding the "Shift" key.

You can edit the input cells.  Specifically, you will want to change the functions plotted.

To open a set of cells, double-click on the harpoon.

Almost any question you might ask can also be answered using the "Help Browser" located in the pull-down menu under "Help" (top right corner).


To open a set of cells, double-click on the harpoon at the right.

Plotting FUNCTIONS of two variables
(rectangular coordinates)

To plot a function of two variables, f(x,y), us the Plot3D command.

?Plot3D

Clear[f,x,y];
f[x_,y_]=((4-(x^2)-(y^2))/(Sqrt[Abs[4-(x^2)-(y^2)]]));
Plot3D[f[x,y],{x,-3,3},{y,-3,3},PlotPoints->24,AspectRatio->1,ViewPoint->{1.3`,-2,0.5`},AxesLabel->{"x","y","f"}]

Clear[f,x,y];
f[x_,y_]=y-Sin[x];
Plot3D[f[x,y],{x,0,2 π},{y,0,6},PlotPoints->24,AspectRatio->Automatic,ViewPoint->{1.`,-2,1}]

Clear[f,x,t];
f[x_,t_]=Cos[t] Sin[x];
Plot3D[f[x,t],{x,0,π},{t,0,2 π},PlotPoints->24,AspectRatio->Automatic,ViewPoint->{1.3`,-2,1},AxesLabel->{"x","t","f"}]

Plotting EQUATIONS in three variables
(rectangular coordinates)

To get plot of three dimensional equations using the ContourPlot3D command, you must first write your equation in the form F(x,y,z)=0 and then use ContourPlot3D with the function F.

FIRST you must load the graphics package called "ContourPlot3D.

?Plot3D

Clear[F,x,y,z];
F[x_,y_,z_]=(x^2)+(y^2)+(z^2)-4;
ContourPlot3D[F[x,y,z]==0,{x,-3,3},{y,-3,3},{z,-3,3},PlotPoints->{5,5,5},Axes->True]

ContourPlot3D[F[x,y,z]==0,{x,-3,3},{y,-3,3},{z,-3,3},PlotPoints->{5,5,5},Axes->True]

Clear[F,x,y,z];
F[x_,y_,z_]=(x^2)+(y^2)+(z^2)-4;
ContourPlot3D[F[x,y,z]==0,{x,-3,3},{y,-3,3},{z,-3,3},PlotPoints->{5,5,5},Axes->True]

Clear[F,x,y,z];
F[x_,y_,z_]=(((x-1))^2)+(((y+3))^2)+(((z-2))^2);
ContourPlot3D[F[x,y,z]==4,{x,0,6},{y,-6,0},{z,0,6},Axes->True,AxesLabel->{"x","y","z"},PlotRange->{{0,6},{-6,0},{0,6}}]

The following cells will do the algebra required to find the intercepts of the graph above with the x-, y-, and z- axes.  (Note:  because all solutions are imaginary, there are no intercepts with the coordinate axes in this case.)

Solve[{F[x,y,z]==0,y==0,z==0},x]
Solve[{F[x,y,z]==0,x==0,z==0},y]
Solve[{F[x,y,z]==0,x==0,y==0},z]

The following cells find the equations of the circles where the sphere above intersects the x-y plane, the y-z plane, and the x-z plane.  (Note:  In this case the computer spits out an answer for the intersection with the x-y plane, even though there isn't any!  Notice that the equation it gives is total nonsense because it says that y = Sqrt[-(x-1)^2 ].)  (Notice that there is a similar problem with the equations for the intersection with the x-z plane since you have [-(x-1)^2-5] under the square root.)

Solve[{F[x,y,z]==0,z==0},y]
Solve[{F[x,y,z]==0,x==0},z]
Solve[{F[x,y,z]==0,y==0},z]

Clear[F,x,y,z];
F[x_,y_,z_]=(x^2)+(y^2)-(z^2)+1;
ContourPlot3D[F[x,y,z]==0,{x,-4,4},{y,-4,4},{z,-6,6},Axes->True,AxesLabel->{"x","y","z"}]

Plotting EQUATIONS in 2-D with Polar Coordinates
(spherical coordinates)

The following cell will plot a graph of"r=f(theta)" (i.e., the radius is a function of the angle).

Clear[r,theta];
r[theta_]=2 theta;
ParametricPlot[{r[theta] Cos[theta],r[theta] Sin[theta]},{theta,0,3 π}]

Plotting FUNCTIONS of two variables with Cylindrical Coordinates

Here you can plot a function z=f(r,theta);
the example plots f(r,theta)=theta+r   for 0 < r < 3 and -pi < theta < 2 pi

Clear[r,theta,z,x,y];
f[r_,theta_]=theta+r;ParametricPlot3D[{r Cos[theta],r Sin[theta],f[r,theta]},{r,0,3},{theta,-π,2 π}]

Plotting FUNCTIONS in 3-D with Spherical Coordinates
(spherical coordinates)

Here you can plot a function rho=f(theta,phi);
the example plots rho(theta,phi)=theta  for 0 < theta < pi and 0 < phi < pi

Clear[rho,theta,z,x,y];
f[theta_,phi_]=theta;ParametricPlot3D[{f[theta,phi] Cos[theta] Sin[phi],f[theta,phi] Sin[theta] Sin[phi],f[theta,phi] Cos[phi]},{theta,0,π},{phi,0,π},AxesLabel->{"x","y","z"}]

Parametric Plots in 2-D
(rectangular coordinates)

*****************2-D  STUFF ****************

The parametric equations are input here, with the limits on the parameter "t":

Clear[starttime,endtime,x,y,t];
x[t_] = Cos[t];
y[t_] = Sin[t];
starttime = 0;
endtime = 2*Pi;

The next cell will generate the graphics; directions for animating these are below.

(Clear[big,nplots];) (big=1.1` Max[Table[N[Abs[x[starttime+(1/100) i (endtime-starttime)]]],{i,0,100}],Table[N[Abs[y[starttime+(1/100) i (endtime-starttime)]]],{i,0,100}]];) (nplots=10;) Do[Print[Show[ParametricPlot[{x[t],y[t]},{t,starttime,starttime+((i (endtime-starttime))/nplots)},AspectRatio->1,PlotRange->{{-big,big},{-big,big}},PlotStyle->{RGBColor[1,0,0],Thickness[0.01`]},DisplayFunction->Identity],Graphics[{PointSize[0.04`],Point[{x[starttime+((i (endtime-starttime))/nplots)],y[starttime+((i (endtime-starttime))/nplots)]}]}],DisplayFunction->$DisplayFunction]],{i,1,nplots}]

To animate these graphics, close the cells by double-clicking on the middle cell bracket (only one graph will be showing).  While these cells are selected, go to the "Cell" menu above and choose "Animate Selected Graphics".

Other Examples
*******************************************

The parametric equations are input here, with the limits on the parameter "t":

Clear[starttime,endtime,x,y,t];
x[t_]=Cos[2 t];
y[t_]=5 Sin[2 t];
starttime=0;
endtime=2 π;
Clear[big,nplots];
big=1.1` Max[Table[N[Abs[x[starttime+(1/100) i (endtime-starttime)]]],{i,0,100}],Table[N[Abs[y[starttime+(1/100) i (endtime-starttime)]]],{i,0,100}]];
nplots=10;
Do[Print[Show[ParametricPlot[{x[t],y[t]},{t,starttime,starttime+((i (endtime-starttime))/nplots)},AspectRatio->1,PlotRange->{{-big,big},{-big,big}},PlotStyle->{RGBColor[1,0,0],Thickness[0.01`]},DisplayFunction->Identity],Graphics[{PointSize[0.04`],Point[{x[starttime+((i (endtime-starttime))/nplots)],y[starttime+((i (endtime-starttime))/nplots)]}]}],DisplayFunction->$DisplayFunction]],{i,1,nplots}]

*******************************************

The parametric equations are input here, with the limits on the parameter "t":

(Clear[starttime,endtime,x,y,t,a,b,c];) (a=7.`;) (b=6.`;) (c=1.`;) (x[t_]=(a-b) Cos[t]+c Cos[(1-(a/b)) t];) (y[t_]=(a-b) Sin[t]+c Sin[(1-(a/b)) t];) (starttime=0;) (endtime=12 π;) (Clear[big,nplots];) (big=1.1` Max[Table[N[Abs[x[starttime+(1/100) i (endtime-starttime)]]],{i,0,100}],Table[N[Abs[y[starttime+(1/100) i (endtime-starttime)]]],{i,0,100}]];) (nplots=10;) Do[Print[Show[ParametricPlot[{x[t],y[t]},{t,starttime,starttime+((i (endtime-starttime))/nplots)},AspectRatio->1,PlotRange->{{-big,big},{-big,big}},PlotStyle->{RGBColor[1,0,0],Thickness[0.01`]},DisplayFunction->Identity],Graphics[{PointSize[0.04`],Point[{x[starttime+((i (endtime-starttime))/nplots)],y[starttime+((i (endtime-starttime))/nplots)]}]}],DisplayFunction->$DisplayFunction]],{i,1,nplots}]

Parametric Plots in 3-D
(rectangular coordinates)

*****************3-D STUFF ****************

Clear[starttime,endtime,x,y,z,t];
x[t_]=2.`+3 t;
y[t_]=5.` t;
z[t_]=7;
starttime=-3;
endtime=5;
Clear[big,nplots];
big=1.1` Max[Table[N[Abs[x[starttime+(1/100) i (endtime-starttime)]]],{i,0,100}],Table[N[Abs[y[starttime+(1/100) i (endtime-starttime)]]],{i,0,100}],Table[N[Abs[z[starttime+(1/100) i (endtime-starttime)]]],{i,0,100}]];

nplots=10;
Do[Print[Show[ParametricPlot3D[{x[t],y[t],z[t]},{t,starttime,starttime+((i (endtime-starttime))/nplots)},ColorFunction->Function[{s,t},Hue[t]],AspectRatio->1,PlotRange->{{-big,big},{-big,big},{-big,big}},DisplayFunction->Identity,ViewPoint->{2,-1,1}],Graphics3D[{PointSize[0.04`],Point[{x[starttime+((i (endtime-starttime))/nplots)],y[starttime+((i (endtime-starttime))/nplots)],z[starttime+((i (endtime-starttime))/nplots)]}]}],DisplayFunction->$DisplayFunction]],{i,1,nplots}]

Other Examples
***************************************

Clear[starttime,endtime,x,y,z,t];
x[t_]=Cos[t];
y[t_]=Sin[t];
z[t_]=(t/10);
starttime=-2 π;
endtime=2 π;
Clear[big,nplots];
big=1.1` Max[Table[N[Abs[x[starttime+(1/100) i (endtime-starttime)]]],{i,0,100}],Table[N[Abs[y[starttime+(1/100) i (endtime-starttime)]]],{i,0,100}],Table[N[Abs[z[starttime+(1/100) i (endtime-starttime)]]],{i,0,100}]];
nplots=10;
Do[Print[Show[ParametricPlot3D[{x[t],y[t],z[t],Hue[(t/((i (endtime-starttime))/nplots))]},{t,starttime,starttime+((i (endtime-starttime))/nplots)},AspectRatio->1,PlotRange->{{-big,big},{-big,big},{-big,big}},DisplayFunction->Identity,ViewPoint->{2,-1,1}],Graphics3D[{PointSize[0.04`],Point[{x[starttime+((i (endtime-starttime))/nplots)],y[starttime+((i (endtime-starttime))/nplots)],z[starttime+((i (endtime-starttime))/nplots)]}]}],DisplayFunction->$DisplayFunction]],{i,1,nplots}]

Contour Plots in 2-D
( level curve for f(x,y) )

Clear[f,x,y];
f[x_,y_]=((((x^2)+4 (y^2)))^(1/4));
ContourPlot[f[x,y],{x,-5,5},{y,-5,5},AspectRatio->1]

Contour Plots in 3-D
( level curve for f(x,y) )

The following commands will plot the contour corresponding to
f(x,y,z) = c.

Clear[f,x,y,z,c];
f[x_,y_,z_]=(x^2)+(y^2)+((z^2)/4);
c=4;
ContourPlot3D[f[x,y,z]==c,{x,-5,5},{y,0,5},{z,-5,5},Contours->{c},AxesLabel->{x,y,z},Axes->True]