Here are a few things that may be helpful when plotting using Maple. The first is that constants and equations can be assigned to variables.
a:=1997;
b:=cos(x);
The first line assigns the value 1997 to
An important point to notice is that commands in Maple end with a semicolon. This tells Maple that the command has ended and to perform the processes that were called upon. If you do not end a command with a semicolon and push enter you will see this:
>
>
>
This does not mean you have to reenter the command. Simply type a single semicolon and push enter. Maple will complete the command that you had intended to run.
Plotting in Maple is similar to plotting in Mathematica. In
Maple the function used for two dimensional plotting is called
The first argument is a description of the function to be
plotted. The second argument defines the range of the variable
in the function. Below is an example that was used with Mathematica.
It plots the cosine function from -2Pi to 2Pi.
>plot(cos(x), x=-2*Pi..2*Pi);
If we use the definition of b from the top of the page,
>plot(b, x=-2*Pi..2*Pi);
Maple can also plot multiple functions at the same time. This is done by enclosing the functions to be plotted within brackets. In the example below, the cosine and sine curves are plotted within the range -2pi to 2pi.
>plot({cos(x), sin(x)}, x=-2*Pi..2*Pi);
Just as multiple functions can be plotted, multiple attributes can be given to the range argument. A range can be applied to the dependent variable as well as the independent variable. Below is an example that uses this technique.
This particular function has an asymptote at x=0. The second part of the range though scales the y-axis from -5 to 5. This allows the function to be plotted without being scaled pout of existence.
>plot(sin(x)/x^2, x=-1..1,-5..5);
The principal method for three dimensional plotting in Maple is
>plot3d(sin(x)+cos(y), x=0..4*Pi, y=0..4*Pi);
The above example describes a surface using the equation
sin(x)+cos(y)
with the x-axis and y-axis having
a range of 0 to 4pi. This example could also have been entered
as shown below with the equation saved in a variable.
> b:=sin(x)+cos(y);
b := sin(x) + cos(y)
> plot3d(b, x=0..4*Pi, y=0..4*Pi);