Graphing Functions - Plot.nb

The "Plot" Command

The basic graphing command is "Plot": You input the function you want to graph, then a list containing the variable name, the left end point of the viewing domain and the right end point of the domain:

Plot[x^2, {x, -2, 3}]

You can resize a picture by dragging at one of its corners. Try it with the graph below!

Plot[Exp[-x], {x, -3, 2}]

Mathematica chooses the viewing range automatically. You can change its choice by including range instructions. 
(You can type the arrow "->" by combining "-" with">".)

Plot[Exp[-x], {x, -3, 3}, PlotRange -> {0, 5}]

Use "PlotRange->All" to see all of the range:

Plot[z^4 - 3  z^2 + 5  z - 4, {z, -3, 3}]

Plot[z^4 - 3  z^2 + 5  z - 4, {z, -3, 3}, 
      PlotRange -> All]

You can graph more than one function at a time by providing a list of functions:

Plot[{Sin[x], Cos[x]}, {x, 0, 2  Pi}]

The "ImplicitPlot" Command

Mathematica can also graph implicit functions. Note that two equal signs are needed for the equation, and that you have to tell the program about the domain for both variables.

ImplicitPlot[
      x^2 + y^2 == 2, {x, -1.5, 1.5}, {y, -1.5, 1.5}]

If the graph looks rugged, try to increase the variable "PlotPoints". Compare the two examples below:

ImplicitPlot[
      x^3 - y^2 + 200  Sin[x^2 + y] == 7, {x, -2, 2}, {y, -2, 
        2}]

ImplicitPlot[
      x^3 - y^2 + 200  Sin[x^2 + y] == 7, {x, -2, 2}, {y, -2, 2}, 
      PlotPoints -> 200]

Etc.

Needs["Graphics`Master`"];
Needs["Calculus`Master`"];

Author: H. Knaust (helmut@math.utep.edu)
Created: August 2000
Last Edits: February 3, 2001