Professional Documents
Culture Documents
Based on Maple 12/13 Windows Version Enter Evaluate and display result on new line
Shift + Enter Continue on next line without executing
Ctrl + = Evaluate and display inline (Document Mode)
Syntax Ctrl + Space Complete symbol/command
; Ends a command with a semicolon. e.g. 5+6; plot(x); F5 Toggle Math/Text entry (Document Mode)
Toggle 2-D/1-D Math entry (Worksheet Mode)
: Suppresses the display of output by ending a command with a Ctrl + F1 Maple help
colon. Useful for lengthy outputs or loading packages. e.g.
with(plots): 5000!:
1
Numerical Manipulation factor(expression ); Factors the given expression of a mul-
tivariate polynomial. Does NOT factor integers or integer
eval(expression ); Evaluates the given expression. e.g.
coecients in a polynomial. e.g. factor(4*x2+12*x+8);
a:=b2; b:=c+1; c:=2; eval(a); returns 9.
returns 4( + 1)( + 2).
eval(expression, x=value ); Evaluates expression at the
ifactor(expression ); Factors an integer or rational number
given point = . e.g. eval(x2+5*x, x=1); eval-
2 into a product of primes. e.g. ifactor(24/19); returns
uates the polynomial + 5 at = 1 and returns 6. (2)3 (3)
(19) . ifactor(210-1); returns (3)(11)(31).
eval(expression, {x=value1, y=value2,...}); Evaluates
expression at the given points = 1, = 2,... expand(expression ); Distributes the given expression. e.g.
expand((x+3)*(x+5)); returns 2 + 8 + 15.
subs(x=value,expression ); Substitutes the given value into
expression. e.g. subs(x=2,x2+2*x+1); gives 9. solve(equations, variables ); Solves for the unknown vari-
subs(x=0, sin(x)/cos(x)); returns (0)/(0). ables in the given equations or inequalities.
evalf(expression ); Numerically evaluates expression and re- e.g. solve(x2-25=0, x); solves the equation 2 25 = 0 and
turns its decimal approximation. e.g. evalf(Pi); returns returns 5,-5.
3.141592654.
e.g. solve({x+y+z = 6, x-y+2*z = 5, 2*x+2*y+z = 9},
value(expression ); Evaluates the given inert expression. e.g. [x, y, z]); solves the system of three equations and re-
F:=Sum(i,i=1..5); value(F); evaluates the inert sum turns the solution [[x = 1, y = 2, z = 3]].
5
=1 and returns 15.
e.g. solve(abs(x+5) > 3, x); solves the inequality +
assume(x, domain ); Restricts variable to . Exam- 5 > 3 and returns ((2), ),
ples of are positive, negative, posint, integer, ( , (8)).
real, and complex. e.g. assume(x, integer); forces
to be an integer. fsolve(equations, variable, [complex]); Numerically
solves for the unknown in .
assume(relation ); Enforces the given relational property. e.g. Use the complex option to nd a complex so-
assume(x > 0); restricts to be positive. lution. e.g. fsolve(x2+5*x-4,x); returns
5.701562119, .7015621187.
additionally(x, domain ); additionally(relation );
Places further restrictions on the given variable. Usages sum(f, k=m..n ); Returns the summation
= (). e.g.
are similar to that for assume. e.g. assume(x, real); sum(x2, x=1..n); computes =1 2 .
additionally(x > 0); forces to be real as well as
positive.
normal(expression ); Simplies and normalizes the given ra- implicitdiff(eq, x1, ..., xj ); Implicitly dierentiates
tional expression so that the result is of factored nor- with respect to variables 1 , . . . , . The equation denes
mal form, where the numerator and denomator are rel- as a function of 1 , . . . , implicitly. e.g. f:= y=x2/z2;
atively prime polynomials with integer coecients. e.g. implicitdiff(f, y, x); computes / and returns
2
normal(1/x+x/(x+1)); returns +1+
(+1) . 2/ 2 .
2
[ ]
int(f, x ); Computes an indenite integral of withrespect to Vector[] ([, , ]); row vector
the variable . e.g. int(cos(x), x); computes ()
and returns (). Matrix addition, subtraction, multiplication: A + B , A - B ,
A . B
int(f, x=a..b ); Computes the denite integral of with re- The following commands are in the LinearAlgebra package.
spect to the variable on the interval from to . e.g. Precede commands by with(LinearAlgebra):
2
int(x2, x=0..2); computes 0 2 and returns 8/3.
CrossProduct(u, v ); Computes the cross product of vectors
and .
DEplot(deqns, vars, trange, inits, xrange, yrange ); Transpose(A ); Computes the transpose of .
In the DEtools package. Plots solution curves to a system
of dierential equations by numerical methods. -
list of rst order ordinary dierential equations or a single
dierential equation of any order. - list of dependent Plots
variables. - range of the independent variable. plot(f, x=xmin..xmax, options ); Creates a two-
- list of initial conditions. , - range of the dimensional plot of the real function () over the
two dependent variables. horizontal range from to . Options are specied
e.g. with(DEtools): in the form option=value (see box below).
de1:=diff(x(t),t)=-0.5*x(t)*y(t);
is an expression or function with an independent vari-
de2:=diff(y(t),t)=0.5*x(t)*y(t);
able. e.g. plot(x2, x=-5..5);.
DEplot([de1,de2],[x(t),y(t)],t=0..50,
x=-2..2,y=-2..2,[[x(0)=0.9,y(0)=0]]); is represented parametrically:
[x(t),y(t),t=t0..t1]. e.g.
plot([cos(t),sin(t),t=-2*Pi..2*Pi]);
Linear Algebra is a list of functions to be graphed on the same
plot: [f1, f2, ..., fn]. e.g. plot([1,x,x2],
Matrix(..); Creates a matrix.
x=-2..2); puts the functions = 1, = , and = 2
Matrix(a ); square matrix x lled with 0s on the same plot.
Matrix(a, b, c ); matrix x lled with cs implicitplot(eqn, x=xmin..xmax, y=ymin..ymax, options );
[ ]
In the plots package. i.e. Must be preceded by
Matrix([[a, b, c],[d, e, f]]);
with(plots): Creates the two-dimensional plot of an
implicitly dened curve on the specied intervals:
1 [, ] and [, ]. Options are speci-
2
ed in the form option=value (see box below). e.g.
< 1 , 2 , . . . , > Creates a column vector .
.. implicitplot(x2+y2=1, x=-1..1, y=-1..1);.
inequal(ineqs, x=xmin..xmax, y=xmin..xmax, options );
Vector[](..); Creates a vector of orientation (either row or In the plots package. Plots regions dened by inequalities
column). Default orientation is column. in the specied and intervals. Options are in the
form optionsfeasible / optionsopen / optionsclosed
Vector(a, b ); column vector of size lled with s / optionsexcluded = (optionsList), where
is of the format (option=value, option2=value2, ...).
Vector([, , ]); column vector e.g. inequal({x+y>0, x-y<=1}, x=-3..3, y=-3..3,
optionsexcluded=(color=blue,thickness=2));
3
plot3d(f, x=a..b, y=c..d, options ); Creates a three- transform(f ); In the plottools package. Creates a func-
dimensional plot of the real function (, ) over the hor- tion that applies the given function to all points in
izontal range [, ] and vertical range [, ]. Options are a plot data structure. Useful for embedding 2-D plots
specied in the form option=value (see box below). into 3-D ones and transforming coordinate systems. e.g.
g:=transform((x,y)->(x,y,-1)); creates a procedure
is an expression or function with two indepen- that transforms points with two coordinates (, ) in a plot
dent variables. e.g. plot3d(sin(x+y), x=-1..1, to points with three coordinates (, , 1).
y=-1..1);.
animate(plotcommand, plotargs, t=a..b, options ); In
is represented parametrically: [f1(x,y), f2(x,y),
the plots package. Creates a 2-D or 3-D animation on
f3(x,y)]. e.g. plot3d([x*sin(x)*cos(y),
paramter , ranging from to . is a Maple
x*cos(x)*cos(y), x*sin(y)], x=0..2*Pi,
command that generates a 2-D or 3-D plot (e.g. plot,
y=0..Pi);
plot3d, implicitplot). is a list of arguments
is a list of functions to be graphed on to the plot command. Possible options are those used in
the same plot: [f1(x,y), f2(x,y), ..., the plot command or the following:
fn(x,y)]. If there are three functions, use the
plotlist option to avoid a parametric plot. e.g. Number of frames frames=n
plot3d([sin(x*y),cos(x*y),x+y], x=-1..1, Display a trace of n frames trace=n
y=-1..1, plotlist); puts the functions = (),
e.g. animate(plot, [A*sin(x), x=0..10], A=0..2,
= (), and = + on the same plot.
frames=50, trace=5);
implicitplot3d(eqn, x=a..b, y=c..d, z=i..j, options );
In the plots package. Creates the three-dimensional plot display(L, options ); In the plots package. Combines the
of an implicitly dened surface on the specied in- list of plot structures into a single plot or animation.
tervals: = [, ], = [, ] and = [, ]. Options are are those used for plot or plot3d.
specied in the form option=value (see box below). e.g.
implicitplot3d(x2+y2+z2=1, x=-1..1, y=-1..1, e.g. with(plots):
z=-1..1);. p1:=plot3d(sin(x*y), x=-Pi..Pi, y=-Pi..Pi):
p2:=plot3d([x+y, sin(x)], x=-Pi..Pi, y=-Pi..Pi):
contourplot(f, x=a..b, y=c..d, options ); In the plots display([p1,p2], axes=boxed, title="test plot");
package. Creates a 2-D contour plot of the real function
(, ) over the horizontal range [, ] and vertical range Options for 2D Plots
[, ]. Options are specied in the form option=value and
can be those used in the plot commands or the following: Type of axes axes=boxed/frame/none/normal
Color of curves color=blue/black/green/red/etc.
Number of contours contours=c Determine input discont=true/false
Locations of contours contours=[a, b, c, ...] discontinuities
Filled contours filledregions=true Draw gridlines gridlines=true/false
Gradation coloring coloring=[color1,color2] Label Axes labels=[x,y]
e.g. contourplot(cos(x*y), x=-3..3, Scaling scaling=constrained/unconstrained
y=-3..3, contours=4, filledregions=true, Line thickness thickness=number
coloring=[red,blue]); Title title="plot title"
Min/max y values y=ymin..ymax
View window view=[xmin..xmax,ymin..ymax]
contourplot3d(f, x=a..b, y=c..d, options ); In the
plots package. Creates a 3-D contour plot where contours Additional
Contours
Options for 3D Plots
contours=number
are raised to their appropriate levels. Usages are similar to Coordinate System coords=cartesian/cylindrical/
contourplot. spherical/etc.
spacecurve(curves, t=a..b, options ); In the plots pack- Grid Dimensions grid=[m,n]
age. Creates a curve or a set of curves in 3-D space. Label Axes labels=[x,y,z]
can be a list of points, a list of the , , and View window view=[xmin..xmax,ymin..ymax,
components, or a set of such lists. Options are similar to zmin..zmax]
those in plot3d. e.g. spacecurve({[cos(t),sin(t),t],
[t,sin(t),cos(t)]},t=0..4*Pi);