Section 6: More on Graphing
© 2000 Seattle Central Community College. Reproduced with permission
> restart;
Parametric Equations
Maple's plot( ) command can also be used to graph curves described by parametric equations.
To graph the parametric curve corresponding to the pair of parametric equations: x=f(t) and y=g(t) on the parameter interval [a,b] use the command:
plot( [ f(t) , g(t) , t=a..b] , x=xmin..xmax, y=ymin..ymax);
There are two things to take careful note of here. First note that there are three entries in the square brackets : the two parametric expressions for x and y and the parameter domain. Also note that the viewing window for the plot is separately specified by the x and y ranges (i.e. x=xmin..xmax, y=ymin..ymax ) .
Example 1:
Plot the parametric curve determined by
and
over the t interval [-2,2] .
> plot([t^2-t,2*t-t^3,t=-2..2],x=-2..5,y=-5..5);
Exercise 6.1
Plot the parametric curve defined
and
over the t interval
.
For a viewing window let x and y range between -2 and 2 .
Student Workspace 6.1
>
>
>
Answer 6.1
> plot([sin(3*t),sin(4*t),t=0..2*Pi],x=-2..2,y=-2..2);
Maple can plot curves that are implicitly defined by an equation in the variables x and y.
Example 1:
To plot the graph of the hyperbola given by the equation:
use the
implicitplot( )
command. To use this command we must first load the "plots" library using the "with" command.
> with(plots):
Warning, the name changecoords has been redefined
Note the syntax for this command on the next line.
> implicitplot(x^2/4-y^2/4=1,x=-5..5,y=-5..5);
>
Example 2:
Graph the equation
using the implicitplot( ) command.
Recall that this is the equation of an ellipse with the lengths of major and minor axes equal to 10 and 6 respectively.
Our first attempt at getting the expected graph comes up short !
> implicitplot(x^2/25+y^2/9=1,x=-5..5,y=-5..5);
Why did we get a circle instead of an ellipse ?
The problem here is that the x and y scales are not equal. To force equal scaling add "scaling=constrained" .
> implicitplot(x^2/25+y^2/9=1,x=-5..5,y=-5..5,scaling=constrained);
>
Exercise 6.2
Graph the equation
Student Workspace 6.2
>
>
>
>
>
>
Answer 6.2
> implicitplot(x^2+4*y^2=4,x=-3..3,y=-2..2,scaling=constrained);
Polar Graphs (optional)
Graphs of polar equations
are handled by the polarplot(..) command, which is part of the plots library accessed using with(plots).
Here are some examples. Note that we include the option scaling=constrained to get geometric perspective.
> polarplot(1+cos(theta),theta=-Pi..Pi,scaling=constrained);
> polarplot(sin(3*theta),theta=-Pi..Pi,scaling=constrained);
Plot Options
There are many options available when you use the plot command. To see a list execute the next line to go directly to Maple's Help Page on this command. Skip this if you wish.
> ?plot[options];