|
Topics with
|
Topic 1
- Numerical Calculations and Approximations Material
originated in 2000 by Seattle Central Community College Using Maple to do numerical computations is very
straightforward. Just enter the numerical expression and end the line with a
semicolon. Pressing
[Enter] will then execute the line and the
result will be displayed in blue in the center of the screen. With Maple loaded and running simply cut and paste the
“red” commands into Maple and press [Enter]. Arithemtic Operations In the problem above change the "3" in the
line above to an "8" and press [Enter].
Notice how the blue output is
automatically updated to display the new result. Exponents Unlike your calculator, Maple gives you the exact
answer to this problem, all 83 digits worth!
You can control the number of digits.
Fractions Maple returns a fractional value.
To find a decimal value use You can use the percent sign ( % ) as a handy shortcut.
It refers to the last expression computed
by Maple. So,
in place of > evalf(3/5+5/9+7/12);
we could have used > evalf(%); If you are going to several
calculations with the problem then it is better to name it rather than use
the (%) shortcut. To assign a
name use a colon followed by an equal sign.
Remember that Maple is case sensitive so k and K are different
variables. You can use up to 8
letter words for a name. So, we now have Square roots Pi and evaluating trig functions Also, notice that an asterisk * is required to indicate
multiplication. Maple
does not understand implicit multiplication. If we want fewer or more digits of accuracy than the
default number which is 10 digits we can add an extra argument to the evalf(
) command as shown below. Here are some trig functions evaluated at specific
angles. Note angles are in
radian measure. To get the inverse sine of a number use the arcsin(
) function: If you ask Maple to calculate a value that is undefined
it will respond with an error message: Natural exponentional function: To enter the natural exponential function
And to get the number e by itself type:
exp(1) . Absolute value function: Prime factorization Sequence of Numbers Practice
problem 1:
Use Maple to calculate a 10-digit approximation for the number
Practice
problem 2: Find
a numerical approximation for the expression :
Solution:
|