|
You have reached an Archive Page on the CCTR web server! This web page is no longer being updated, and the information may be outdated or inaccurate. If you have reached this page from a link on another page, please inform the CCTR web maintainer. If you need help finding information regarding CCTR, please contact us at ops@cctr.umkc.edu. |
Maple
| Site
| Docs
| Ref
| Resources
| Community
| FeedBack
|
| Mail
| Web
| Software
| Classes
| FAQs
|
|ACCESS
|DIALUP
|DOS
|EXCEL
|FOX
|HTML
|MAPLE
|POWERPT
|SAS
|
|SPSS
|WINDOW
|WORD
|WP
|WWW-HTML
|WWW
|XWIN
|
Start maple by typing maple. There is also a xwindows version of maple, which is started by typing xmaple.
BASIC FACTS
Examples:
Simple calculations:
Type the expression followed by ";" and return.( the result is displayed in this case)
Basic arithmetic operations in maple:
operation symbol example
addition + 2 + 2
subtraction - 10 - x
mutiplication * 3 * Y * x
division / x / 2
exponentiation ^ or ** x ^ 2
factorial ! 10 !
logarithm ln natural log ln(2)
log10 log to the base 10.
general form: log[b] (x) ---- log of x to the base b;
absolute value abs (...) abs ( -4)
truncating
division iquo(...) iquo(17, 3)
integer
remainder irem(...) irem(10,7)
> k!; denotes k factorial.
> 2^n; denotes exponentiation , i.e 2 raised to the power of n;
> ln(3 * 2 ); denotes log of the number in the parentheses where 3*2
the prodict of 3 and 2;
> 2 + 2 ;
4
> " + 3;
7
NOTE: Double quotes denote the previously evaluated expression, which in this case is 2 + 2.
If you enter an expression with RETURN and there's a grammatical mistake in what you have typed, maple will respond with a syntax error: message. <maple will print out what you typed with an indication of where it noticed an error.
Review the maple documentation describing what you are trying to do, if you cant figure out what the actual syntax is.
Syntax errors are often caused by typographical mistakes in entry.
commands:
The ? command allows you to display further details of maple.Using the ? command, you can display descriptions and usage examples of maple commands and other features.
?topic is the command for maple tp display a "thumbnail" sketchh on the specified topic.
commands:
Entering quit ( in front of the > prompt ), followed by a return, ends a maple session. done or stop are synonyms for quit.
example:
>quit bytes used=139632, alloc-131048, time=.233
variable := expression ;
assigning a value to a variable:
In maple , you can label a calculated result for further use.This is called assigning a maple variable a value. But unlike many conventional programming languages, maple can use variables in the sense of a "mathematical unknown" as well.
A maple vaiable ordinarily starts with a letter, followed by upto 498 letters, digits, or underscores. Maple names can also be created by surrounding characters in backquotes (`), also called "leftquotes".
examples:
expr1 x T formula_47
`a funny name` `the answer is`
>z := y * x; z := y * x
>y := 100; y := 100
>x := 200; x := 200
>z; z := 20000
Mathematical constants known to maple:
constant maple name
integers -47,1,2
rational numbers 3/5, -1/3
e ( natural log base) exp(1) , E
___
\/ -1 I , (-1)^(1/2)
oo infinity
Euler's constant gamma
floating-point numbers 1.0, .002 Float(314,-2), Float(-8,5)
TT Pi
Note: PI and pi are not substitutes for Pi ( remember,maple is case sensitive).
Use I and not i for imaginary numbers.
Mathematical functions known to maple
Function Maple name
exponential function exp(x)
ln x ln(x) or log (x)
log x to the base 10 log10(x)
squareroot of x sqrt(x)
minimum, maximum min, max
round x to the nearest integer round(x)
truncate x to its integer part trunc(x)
fractional part of x frac(x)
Sine, cosine, tangent of x sin(x),cos(x), tan(x)
Secant,cosecant,cotangent of x sec(x), csc(x), cot(x)
Inverse trigonometric functions arcsin(x),arccos(x), arctan(x)
arcsec(x), arccsc(x), arccot(x)
Hyperbolic functions sinh(x),cosh(x), tanh(x)
sech(x), csch(x), coth(x)
(n , m) binomial coefficient binomial(n,m)
Maple calculations with mathematical unknowns:
> expr1 := ( x + y + x + z + x ) / 2
expr1 := 3/2 x + 1/2 y + 1/2 z
In this section we take a brief tiur of some commonly used computational functions, including those for solving equations, doing calculus, and plotting graphs.
1. Solution of algebriac equations solve( equation) solve( equation, variable)
solve an equation for an unknown
solve( set of equations, set of variables)
solve a set of equations for a set of unknowns
2. Expression substitution with subs:
subs( var = replacement, expression) substitute for a variable on an expression
subs( var1=replacement1, var2=replacement2, expression)
multiple substitution
In the calculation of several steps, a known identity (say x or y ..) often needs to be applied to an expression. WE can do this by replacing every x or y in the expression by its evaluated value. A double substitution can be specified by the second form of the sub command.Every occurence of var1 is replaced by replacement1, and so on.
3. Using Maple as a numerical calculator
Numerical calculations to any desired precision.
evalf( expression) Find a numerical approximation
evalf( expression, digits) Find a numerical approximation calculating with more digits
4. Graphing and plotting functions on screen
You can get Maple to do a simple graphing through its plot command
graphing simple functions
plot( expression, variable = horizontal range ) plot( expression, horizontal range)
plot of a single function plot( set of expressions, variable = horizontal range )
plot of several functions on the same graph
plot( expression, horizontal range, vertical range)
plot will produce a graph of the expression, that involves one variable as it varies through the specified range of values. If two ranges are specified, the first range will specify the limits of the horizontal axis ( the range of the variable) and the second the limits of the vertical axis If you wish to display the graphs of several functions on the same plot, use a set of expressions for the first argument.
Maple has grammatical( syntax) rules for what it considers valid input. For example, Maple requires you to end calculation/commands with semicolons or colons. It wont do anything with what you have entered until the punctuation mark is entered.Here are some of those syntax error s which you encounter if you disobey maple's grammatical rules.
print( expr1, expr2,...exprn); Prettyprint expressions
lprint( expr1, .....exprn); Print expressions in linear format
print and lprint are commands for displaying the values of one or more expressions at once. print with several arguments " pretty prints" theirvalues, seperated by commas. lprint prints out the values that result from evaluating expr1, expr2...exprn. "lprint" stands for "linear print". The results of the command are printed in a linear format like that of the maple input instead of the 2 dimensional format used in prettyprinting.
Information Services, Central Computing
University
of Missouri Kansas City