Modules for Differential
Calculus
Maple Tutor
Part 7: Functions
- Next we define a function
to assign the value 10 sin x to each x. Enter
x:='x';
f:=x->10*sin(x);
and then
f(1);
You may be surprised to see
10 sin(1)
rather than a decimal approximation. To obtain a decimal approximation,
enter
evalf(%);
The command "evalf" stands for "floating point evaluation."
- To be sure that the action
of evalf is clear, enter
103751/2053;
and then
evalf(%);
- Now let's evaluate f at
pi/6. First, we need the value of pi. Enter
Pi;
Now alter this line to read
evalf(Pi);
Note that Maple is case sensitive.The "P" must be upper-case
and the "i" must be lower-case. Find a decimal approximation
to f(pi/6).
- Find a decimal approximation
to each of the following: f(2) and f(pi/3).
Send comments to the
authors <modules at math.duke.edu>
Last modified: June 23,
1997