Go to CCP Homepage Go to Materials Page Go to Differential Calculus Materials Go to Table of Contents
Go Back One Page Go Forward One Page

Maple Tutor

Part 6: Functions

  1. Next we define a function to assign the value 10 sin x to each x.  Enter
    x:='x'
    to
    make sure x is unassigned.  Then enter
    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, highlight
    f(1)
    and select "Approximate"  > "10" from the Context Panel.  Maple should make an arrow pointing to the desired output. (In Maple versions 11 and higher the arrow is labeled "at 10 digits".)

  2. To be sure that the "Approximate" menu option is clear, enter
    103751/2053
    and then find a decimal approximation.
  3. An alternate way of forcing Maple to return a decimal approximation to f(1) is to enter
    f( 1.0 )

  4. There is another way to define a function in Maple. Enter
    g(x) := 10*sin(x)
    and then
    g(1)
    You should get a result similar to Step 1.

  5. Let's evaluate f at π/6. First, we need to figure out how to enter π. One easy way to do this is to use the "Palettes" at the left-hand side of your Maple window.  Click on the palette button which says "Common Symbols", and select π from the grid of symbols which appears.  Finally, press RETURN.  What happens?   Use the context panel to get a decimal approximation for π.

    Now find a decimal approximation to f(π/6).

  6. Find a decimal approximation to each of the following: f(2) and f(π/3).

Go to CCP Homepage Go to Materials Page Go to Differential Calculus Materials Go to Table of Contents
Go Back One Page Go Forward One Page


modules at math.duke.edu Copyright CCP and the author(s), 1998, 1999, 2007