Application Center - Maplesoft

App Preview:

Maple Essentials: Section 6: More on Graphing

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

section6.mws

Section 6: More on Graphing

>    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   x = t^2-t   and    y = 2*t-t^3  over the t -interval [-2, 2] .

>    plot([t^2-t,2*t-t^3,t=-2..2],x=-2..5,y=-5..5);

[Maple Plot]

>   

Exercise 6.1

Plot the parametric curve defined x = sin(3*t)  and y = sin(4*t)  over the t -interval [0, 2*Pi]  .

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 Plot]

>   

Implicit Plots

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: x^2/4-y^2/9 = 1  use the implicitplot  command. To use this command we must first load the "plots" package 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);

[Maple Plot]

>   

Example 2

Graph the equation   x^2/25+y^2/9 = 1  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);

[Maple Plot]

>   

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" or click on the graph to expose the graphing toolbar, and select the button marked 1:1.

The graph then appears as seen in the following figure.

>    implicitplot(x^2/25+y^2/9=1,x=-5..5,y=-5..5,scaling=constrained);

[Maple Plot]

>   

Exercise 6.2

Graph the equation x^2+4*y^2 = 4  

Student Workspace 6.2

>   

>   

>   

>   

>   

>   

Answer 6.2

>    implicitplot(x^2+4*y^2=4,x=-3..3,y=-2..2,scaling=constrained);

[Maple Plot]

>   

Polar Graphs (optional)

Graphs of polar equations r = f(theta)  are handled by the polarplot  command, which is part of the plots package 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);

[Maple Plot]

>   

>    polarplot(sin(3*theta),theta=-Pi..Pi,scaling=constrained);

[Maple Plot]

>   

Another way of graph polar graphs is to use the plot option coords=polar  and graph the curve using parametric equations. The general form of the command is:

plot([r(s), theta(s), s=a..b], coords=polar);

If the parameter s  is actually the angle theta , the command becomes

plot([r(theta), theta, theta=a..b], coords=polar);

For example, to graph 1+cos( theta ) in polar coordinates using the plot  command, type:

>    plot([1+cos(theta),theta,theta=-Pi..Pi],coords=polar);

[Maple Plot]

>   

The coords=polar  option can be applied to implicitplot  command as well.

For example, to graph the lemniscate r^2 = 4*cos(2*theta)  over the theta  interval -Pi .. Pi , type:

>    implicitplot(r^2=4*cos(2*theta), r=0..2, theta=0..2*Pi,coords=polar, scaling=constrained, grid=[50,50]);

[Maple Plot]

>   

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];

>   

>