Plotting expressions and equations
Maple plots mathematical expressions with ease. Plotting can be accomplished in three ways. The plot command can be given in the form
plot(expression, x=xmin..xmax)
where expression is either a mathematical expression with one variable to be plotted (in this case the variable is x) or is the name of an expression that was previously entered into the Maple document. Generally, the name of an expression is used. xmin and xmax are the numerical values that define the range over which the variable x is plotted. The min and max values are separated by a sequence of two periods.
The second alternative for plotting a mathematical expression in the variable x is to right-click on the expression and choose Plot->2D from the menu of options. Maple will try to guess the range over which you want to plot the expression and will display the plot. You can then right-click the plot and choose various options to change the plot in the way that you want, such as changing the range of values over which you want the plot displayed. Using the plotting options you can also add labels to the axes, create legends, create a title, change colors, etc.
Maple can also plot equations, but it does this differently than for expressions, using different commands. To plot an equation, use the
implicitplot
command
with(plots):
implicitplot(eqn, x=xmin..xmax, y=ymin..ymax)
The with(plots)
command tells Maple that you want to use special plotting software that it then loads into the computer from the disk. This command is followed by a colon (:) so that the list of all the commands that are loaded in from disk is not displayed. Leave the colon off the first time you use the
with(plots)
command to see what happens. The with(plots)
command need only be used once in a Maple document.
The implicitplot
command looks like the plot command except that you must specify both the x and y limits and you must specify an equation instead of an expression.
Alternatively you can right-click the equation that you wish to plot and select the ‘Plots->2D implicit plot->x,y’ option and Maple will plot the equation. Using the right-click option for implicitplot
does not always work well. Sometimes the Maple software behaves badly when you use the right-click option and then it is best to use the command line approach discussed earlier or use the plot builder discussed next.
A third option for plots is to use the plot builder assistant. Assistants are tools included in Maple to do the work of many commands at a time. There are two ways to open this assistant. First, you can right click on an expression or equation and instead of selecting your type of plot from the menu, select the plot builder. Second, you can go to the top toolbar and go to Tools and Assistants.
Plot builder opens a window and you have to add your expressions. After clicking Add another window opens. In this window you can add an expression by using standard Maple syntax including parenthesis and *, +, -, and / for operators. However, you can also input a previously assigned name that stands for an expression and the expression will appear in the expression box. You are able to include many expressions in the box and they will be plotted together on the same plot. Then, when you click Done, pick from over 30 types of plots and the interval of the variables to make the plot you want. You can even click Options and change labels, axes, titles and more. You can then click Plot and the plot will be returned to the document. It is important to heavily comment after the plot so people understand what you did.