MAPLE Quick Reference Card
MAPLE Quick Reference Card
Maple Example command Input Output Basic mathematical operations and constants ; >2+2; 4 : >2+2: +, -, *, / >2*3+9^2; 87 11 >33/6;
2
evalf() Pi exp(1)
Expressions
Functions
Dierentiation
Integration Denite:
0
sqrt(x), sin(x), cos(x), exp(x), ln(x),... >arcsin(sqrt(2)/2); Dening your own functions and expressions := >y:=x^2; >y; >eval(y,{x=2}); >subs({x=-3},y); -> >f:=x->x^2; >f(x); >f(4); Dierentiation and integration diff >diff(x^2,x); >diff(x^2 + y^3,x); >diff(x^2 + y^3,y); int >int(sin(x),x); >int(x*sin(x),x=0..Pi); >int(int(y,y=0..x^2),x=0..1); solve Solving equations and systems of equations >solve(x^2=4,x); >solve({x+y=3,x-y=7},{x,y});
x2 x2 4 9 x2 x2 16 2x 2x 3y 2 cos(x)
1 10
x sin x dx
1 x 0
2
Iterated:
0
y dy dx
2, 2 {x = 5, y = 2}
Dening the intervals of change of variables (for plotting, integration, etc) .. >x:=a..b; a..b Working with packages (e.g., many plotting functions are in the plots package) Including the plots package with >with(plots): Plotting plane curves Equations implicitplot >implicitplot(x^2+y^2=1, Useful options: color (red, blue, x=-1..1,y=-1..1);
1 0.5
green, yellow, etc), axes (boxed or normal), thickness, linestyle (solid, dot, dash, dashdot), scaling, labels, title, etc.
y -1 -0.5
0 0 x 0.5 1
-0.5
-1
Graphs
Useful options: color (red, blue, green, yellow, etc), axes (boxed or normal), thickness, linestyle (solid, dot, dash, dashdot), scaling, labels, title, etc.
plot
color thickness linestyle
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0 0 x 0.5 1 -1 -0.5
0 0 x 0.5 1
Parametric curves
Useful options: color (red, blue, green, yellow, etc), axes (boxed or normal), thickness, linestyle (solid, dot, dash, dashdot), scaling, labels, title, etc.
plot
scaling axes labels
-0.2 -0.2 -0.4 -0.4 -1 -0.8 -0.6 -0.4 x -0.2 0 0.2 0.4
Parametric curves
Useful options: color (red, blue, green, yellow, etc), axes (boxed or normal), thickness, linestyle (solid, dot, dash, dashdot), scaling, labels, title, etc.
spacecurve
color thickness axes
Plotting space curves >spacecurve([cos(t),sin(t),t], t=0..4*Pi); >spacecurve([cos(t),sin(t),t], t=0..4*Pi, thickness=3, color=red,axes=boxed); Plotting surfaces >implicitplot3d(x^2+y^2+z^2=1, x=-1..1,y=-1..1,z=-1..1, axes=boxed); >implicitplot3d(x^2+y^2+z^2=1, x=-1..1,y=-1..1, z=-1..1, axes=boxed, style=wireframe, title="Wireframe sphere"); >plot3d(x^2+y^2,x=-2..2, y=-2..2,axes=normal); >plot3d(x^2+y^2,x=-2..2, y=-2..2,axes=normal, style=contour,contours=20);
2
Equations
Useful options: color, axes, style (wireframe, patchnogrid, contour, patchcontour), scaling, numpoints, orientation, labels, title, etc.
implicitplot3d
axes style title
Wireframe sphere
Graphs
Useful options: color, axes, style (wireframe, patchnogrid, contour, patchcontour), scaling, numpoints, orientation, labels, title, etc.
plot3d
axes style
4 -2 2 -1 x 0 0 1 0 1 2 2 1 -1 y -1 x -2 -2
4 -2 2 -1 y 0 0 0 1 2
Parametric surfaces
Useful options: color, axes, style (wireframe, patchnogrid, contour, patchcontour), scaling, numpoints, orientation, labels, title, etc.
plot3d
axes numpoints, orientation
Level curves
Useful options: color, filled (true or false), contours (either number of contours, contours=20, or level values, contours=[-2,-1,0,3,5]), etc.
contourplot contourplot3d
contours filled
>plot3d([u*cos(v),u*sin(v),v], u=-1..1,v=0..4*Pi); >plot3d([u*cos(v),u*sin(v),v], u=-1..1,v=0..4*Pi, axes=boxed, numpoints=2000, orientation=[20,60]); Plotting level curves >contourplot(x^2+y^2, x=-2..2,y=-2..2); >contourplot(x^2+y^2, x=-2..2,y=-2..2, contours=15,filled=true); Plotting vector elds >gradplot(x^2+y^2, x=-2..2,y=-2..2); >fieldplot([-y,x],x=-2..2, y=-2..2,grid=[15,15], thickness=3,arrows=SLIM, color=blue,scaling=constrained); Combining Plots levels:=contourplot(x^2+y^2, x=-2..2,y=-2..2,contours=15): gf:=gradplot(x^2+y^2, x=-2..2, y=-2..2,color=blue, arrows=THICK,grid=[10,10]): >display([levels,gf],axes=boxed, scaling=constrained); >display([ plot3d(x^2-y^2,x=-2..2,y=-2..2, style=patchnogrid,color=yellow), implicitplot3d(x^2+y^2=1, x=-2..2,y=-2..2,z=-2..2, style=patchnogrid,color=green), spacecurve([cos(t),sin(t), cos(t)^2-sin(t)^2], t=0..2*Pi, color=red,thickness=4)], axes=boxed,scaling=constrained, view=[-2..2,-2..2,-2..2], orientation=[-55,65]);
y 0 -2 -1 0 x 1 2 -2 -1
y 0 0 x 1 2
-1
-1
-2
-2
gradplot fieldplot
contours filled
y 0 -2 -1 0 x 1 2 -2 -1
y 0 0 x 1 2
-1
-1
-2
-2
Combining plots by rst assigning them to expressions and then using the display command. Important: Always use : when you assign plots to expressions. Note: Both [] and {} can be used in the display command. It is also possible to combine plots directly in the display command.
display
y 0
-1
-2
-2
-1
0 x
display display3d
style color thickness axes scaling view orientation
-1 2 -2 -2 -1 x 0 1 2 -2 -1 0 y 1