Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
272 views

Maple 11 Cheat Sheet Syntax Ends A Command

This document provides a cheat sheet of keyboard shortcuts and commands for Maple 11. It lists shortcuts for evaluating expressions, completing symbols, toggling between math and text entry, and accessing help. It also summarizes commands for defining variables and functions, performing mathematical operations, solving equations, calculus operations, and simplifying algebraic expressions.

Uploaded by

api-11922418
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
272 views

Maple 11 Cheat Sheet Syntax Ends A Command

This document provides a cheat sheet of keyboard shortcuts and commands for Maple 11. It lists shortcuts for evaluating expressions, completing symbols, toggling between math and text entry, and accessing help. It also summarizes commands for defining variables and functions, performing mathematical operations, solving equations, calculus operations, and simplifying algebraic expressions.

Uploaded by

api-11922418
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Maple 11 Cheat Sheet Keyboard Shortcuts

Enter Evaluate
Syntax Ctrl + = Evaluate and display inline (Document Mode)
; Ends a command with a semicolon. e.g. 5+6; plot(x); Ctrl + Space Complete symbol/command
F5 Toggle Math/Text entry (Document Mode)
: Suppresses the display of output by ending a command with Toggle 2-D/1-D Math entry (Worksheet Mode)
a colon. Useful for lengthy outputs or loading packages. Ctrl + F1 Maple help
e.g. with(plots): 5000!:

:= Assigns an expression to a variable. e.g. a:=3; b:=a+x;


assigns 3 to a and 3 + x to b. x:=’x’; unassigns the Defined Constants
variable x. Pi π ≈ 3.14159265... √
I complex number I = −1
= Defines mathematical equations. e.g. y = x^2 + 3*x + 4; infinity ∞
produces the equation y = x2 + 3x + 4. gamma Euler’s constant γ ≈ 0.5772156649...
th Catalan Catalan’s constant ≈ 0.915965594...
% Refers to the last result. n of the % symbols refers to the n
exp(1) e ≈ 2.718281828
previous result. e.g. %%% gives the third previous presult.

f :=(x,y,...)->... Defines a function. e.g. f := (x,y) ->


x^2+y^2; defines the function f (x, y) = x2 + y 2 . f(0,1) Commands
evaluates f (0, 1) = 02 + 12 = 1. plot3d(f(x,y), x=0..1,
y=0..1); plots the function. General

L :=[x1, x2, ..., xn ] Defines a list (ordered sequence) L with(package ); Loads the specified Maple package.
of expressions x1 , x2 , . . . , xn . Refer to the nth list item unassign(var ); Deletes a value stored in the given variable.
by L[n]. To extract the contents of a list, use the empty e.g. a:=1; unassign(’a’); unassigns the identifier a so
selection operator []. e.g. A:=[1,2,3]; A[3]; returns 3. that it does not contain the value of 1 anymore.
A[] returns 1,2,3.
restart; Clears internal memory. The settings of all identi-
S: :={x1, x2, ..., xn } Defines a set S of expressions x1 , x2 , fiers are resetted.
. . . , xn . Use the empty selection operator[] to extract the
contents of a set. e.g. S:={5,3,3,2,1}; S[]; returns
1,3,4,5.
Common Mathematical Operations
?topic Displays help on topic. x + y - z; addition and subtraction
x * y; multiplication
All identifiers (variables and functions) are case sensitive. x / y; division
e.g. X is different from x. Pi and pi are different! x^y; power xy √
sqrt(x); square root x
In general, a function whose name begins with a capital letter
exp(x); exponential ex
is an inert form of the function who has the same name but
ln(x); natural log ln(x)
begins with lower case. Inert functions are unevaluated
log[b](x); logarithm logb√(x)
and may be manipulated and printed R in a prettyprinted
surd(x,n); real nth root n x
format. e.g. Int(x,x); returns xdx and is the inert
sin(x); cos(x); tan(x); trigonometric functions
form of int(x,x);, which evaluates to x2 /2.
arcsin(x); arccos(x); inverse trig functions
arctan(x);

Usages Numerical Manipulation


Right-click an expression to display a context-sensitive menu eval(expression ); Evaluates the given expression. e.g.
of applicable options. a:=b^2; b:=c+1; c:=2; eval(a); returns 9.
!!! Click the !!! icon to execute the entire worksheet. Useful eval(expression, x=value ); Evaluates expression at the
when you have changed expressions that affect subsequent given point x = value. e.g. eval(x^2+5*x, x=1); evalu-
commands. ates the polynomial x2 + 5x at x = 1 and returns 6.

1
eval(expression, {x=value1, y=value2,...}); Evaluates e.g. solve(x^2-25=0, x); solves the equation x2 − 25 =
expression at the given points x = value1, y = value2,... 0 and returns 5,-5.
subs(x=value,expression ); Substitutes the given value into e.g. solve({x+y+z = 6, x-y+2*z = 5, 2*x+2*y+z =
expression. e.g. subs(x=2,x^2+2*x+1); gives 9. 9}, [x, y, z]) solves the system of three equations
subs(x=0, sin(x)/cos(x)); returns sin(0)/cos(0). and returns the solution [[x = 1, y = 2, z = 3]].
e.g. solve(abs(x+5) > 3, x); solves the inequality |x+
evalf(expression ); Numerically evaluates expression and
5| > 3 and returns RealRange(Open(−2), inf inity),
returns its decimal approximation. e.g. evalf(Pi); re-
RealRange(−inf inity, Open(−8)).
turns 3.141592654.
fsolve(equations, variable, [complex]); Numerically
value(expression ); Evaluates the given inert expression.
solves for the unknown variable in equations. Use
F:=Sum(i,i=1..5); value(F); evaluates the inert
e.g. P
5 the complex option to find a complex solution.
sum i=1 i and returns 15.
e.g. fsolve(x^2+x+1 = 0, x, complex); returns
assume(x, domain ); Restricts variable x to domain. Exam- −.5000000000 − .8660254038I, −.5000000000 +
ples of domain are positive, negative, posint, integer, .8660254038I.
real, and complex. e.g. assume(x, ’integer’); forces
x to be an integer.
assume(relation ); Enforces the given relational property. Calculus
e.g. assume(x > 0); restricts x to be positive.
diff(f, x1, ..., xj ); Differentiates f with respect to vari-
additionally(x, domain ); additionally(relation ); ables x1 , . . . , xj . e.g. diff(sin(x), x); takes the
Places further restrictions on the given variable. Usages first derivative of sin(x). diff(f(x,y),x,y); computes
are similar to that for assume. e.g. assume(x, real); ∂2
∂y∂x f (x, y).
additionally(x > 0); forces x to be real as well as
positive. diff(f, x$n ); Computes the nth derivative of f . e.g.
diff(x^4, x$2); computes the second derivative of x4
and returns 12x2 .
Algebra int(f, x ); Computes an indefinite integral of f with re-
simplify(expression ); Applies simplifica- Rspect to the variable x. e.g. int(cos(x), x); computes
cos(x)dx and returns sin(x).
tion rules to the given expression. e.g.
simplify(cos(Pi*cos(x)^2+Pi*sin(x)^2)); returns -1. int(f, x=a..b ); Computes the definite integral of f with re-
collect(expression, variable ); Combines like terms in spect to the variable x on the Rinterval from a to b. e.g.
2
expression with respect to the given variable. e.g. int(x^2, x=0..2); computes 0 x2 dx and returns 8/3.
collect(a^2*x+b*x+5, x); returns 5 + (a2 + b)x. limit(f, x=a, [dir] ); Computes the limit of f as x ap-
normal(expression ); Simplifies and normalizes the given ra- proaches a. a can be any algebraic expression or infinity.
tional expression so that the result is of factored nor- Direction dir is optional and is real bidirectional by default
mal form, where the numerator and denomator are rel- (except for ∞ and −∞). Possible values of direction are
atively prime polynomials with integer coefficients. e.g. left, right, real, and complex. e.g. limit(1/exp(x),
normal(1/x+x/(x+1)); returns x+1+x
2
x=infinity); computes lim e1x and returns 0.
x(x+1) . x→∞
Pn
factor(expression ); Factors the given expression of a mul- sum(f, k=m..n ); Returns the summation
Pn k=m f (k). e.g.
tivariate polynomial. Does NOT factor integers or integer sum(x^2, x=1..n); computes x=1 x2 .
coefficients in a polynomial. e.g. factor(4*x^2+12*x+8)
returns 4(x + 1)(x + 2).
ifactor(expression ); Factors an integer or rational number
into a product of primes. e.g. ifactor(24/19); returns
(2)3 (3)
(19) . ifactor(2^10-1); returns (3)(11)(31).

expand(expression ); Distributes the given expression. e.g.


expand((x+3)*(x+5)); returns x2 + 8x + 15.
solve(equations, variables ); Solves for the unknown
variables in the given equations or inequalities.

2
Plots • f is represented parametrically:
[f1(x,y), f2(x,y), f3(x,y)]. e.g.
plot(f, x=xmin..xmax, options ); Creates a two-
plot3d([x*sin(x)*cos(y), x*cos(x)*cos(y),
dimensional plot of the real function f (x) over the
x*sin(y)], x=0..2*Pi, y=0..Pi);
horizontal range from xmin to xmax. Options are
specified in the form option=value (see box below). • f is a list of functions to be graphed on
the same plot: [f1(x,y), f2(x,y), ...,
• f is a function with an independent variable. e.g. fn(x,y)]. If there are three functions, use
plot(x^2, x=-5..5);. the plotlist option to avoid a parametric
plot. e.g. plot3d([sin(x*y),cos(x*y),x+y],
• f is represented parametrically:
x=-1..1, y=-1..1, plotlist); puts the functions
[x(t),y(t),t=t0..t1]. e.g.
z = sin(xy), z = cos(xy), and z = x + y on the same
plot([cos(t),sin(t),t=-2*Pi..2*Pi]);
plot.
• f is a list of functions to be graphed on the same
plot: [f1, f2, ..., fn]. e.g. plot([1,x,x^2], implicitplot3d(eqn, x=a..b, y=c..d, z=i..j, options );
x=-2..2); puts the functions y = 1, y = x, and In the plots package. Creates the three-dimensional plot
2
y = x on the same plot. of an implicitly defined surface eqn on the specified
intervals: x = [a, b], y = [c, d] and z = [i, j]. Options are
implicitplot(eqn, x=xmin..xmax, y=ymin..ymax, options ); specified in the form option=value (see box below). e.g.
In the plots package. i.e. Must be preceded by implicitplot3d(x^2+y^2+z^2=1, x=-1..1, y=-1..1,
with(plots); Creates the two-dimensional plot of an z=-1..1);.
implicitly defined curve eqn on the specified intervals: Options for Plot3d and Implicitplot3d
[xmin, xmax] and [ymin, ymax]. Options are speci-
fied in the form option=value (see box below). e.g. Type of axes axes=boxed/frame/none/normal
implicitplot(x^2+y^2=1, x=-1..1, y=-1..1);. Color of curves color=blue/black/green/red/etc.
Contours contours=number
inequal(ineqs, x=xmin..xmax, y=xmin..xmax, options ); Coordinate System coords=cartesian/cylindrical/
In the plots package. Plots regions defined by spherical/etc.
inequalities ineqs in the specified x and y inter- Grid Dimensions grid=[m,n]
vals. Options are in the form optionsfeasible / Label Axes labels=[x,y,z]
optionsopen / optionsclosed / optionsexcluded Scaling scaling=constrained/unconstrained
= (optionsList), where optionsList is of the Line thickness thickness=number
format (option=value, option2=value2, ...). Title title="plot title"
e.g. inequal(x+y>0, x-y<=1, x=-3..3, y=-3..3, View window view=[xmin..xmax,ymin..ymax,
optionsexcluded=(color=blue,thickness=2)); zmin..zmax]

animate(plotcommand, plotargs, t=a..b, options );


Options for Plot, Implicitplot, and Inequal In the plots package. Creates a 2-D or 3-D animation
on paramter t, ranging from a to b. plotcommand is
Type of axes axes=boxed/frame/none/normal a Maple command that generates a 2-D or 3-D plot
Color of curves color=blue/black/green/red/etc. (e.g. plot, plot3d, implicitplot). plotargs is
Determine input discont=true/false a list of arguments to the plot command. Possible op-
discontinuities tions are those used in the plot command or the following:
Draw gridlines gridlines=true/false
Label Axes labels=[x,y] Number of frames frames=n
Scaling scaling=constrained/unconstrained Display a trace of n frames trace=n
Line thickness thickness=number
Title title="plot title" e.g. animate(plot, [A*sin(x), x=0..10], A=0..2,
Min/max y values y=ymin..ymax frames=50, trace=5);
View window view=[xmin..xmax,ymin..ymax]
display(L, options); In the plots package. Combines the
plot3d(f, x=a..b, y=c..d, options ); Creates a three- list L of plot structures into a single plot or animation.
dimensional plot of the real function f (x, y) over the options are those used for plot or plot3d.
horizontal range [a, b] and vertical range [c, d]. Options
e.g. with(plots):
are specified in the form option=value (see box below).
p1:=plot3d(sin(x*y), x=-Pi..Pi, y=-Pi..Pi):
• f is a function with two independent variables. e.g. p2:=plot3d([x+y, sin(x)], x=-Pi..Pi, y=-Pi..Pi):
plot(sin(x+y), x=-1..1, y=-1..1);. display([p1,p2], axes=boxed, title="test plot");

Maple 11 Cheat Sheet 3 Margaret Yau. Mt. San Antonio College

You might also like