How Do I ... - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Getting Started : How Do I... : HowDoI/EnterAFunction

How Do I ...

...Enter a Function?

Mathematical functions are represented in Maple as operators. There are various methods for entering a function: by using a template from the Expression palette, by using Maple's operator syntax directly, or by converting an existing expression into an operator.

 

Before you proceed, be sure to familiarize yourself with entering simple mathematical expressions.   Open a new worksheet in Document mode, and ensure that you are in Math mode.

 

Using a Template From the Expression Palette

Follow the steps below to enter the operator xx21 and assign it to a variable whose name is f.

 

Step

Description

Illustration

1

Select the f:=ay template from the Expression palette. The green placeholder f is selected automatically.

2

Type f, overwriting the green f.

3

Move the cursor among placeholders by pressing Tab. The a is selected as you do so. Type x.

4

Press Tab to select the final placeholder y. To type x2, first type x. Press Shift + ^ to bring the cursor into the exponent position and type 2.

5

To bring the cursor back onto the base line, press the right arrow () key on your keyboard.

6

Type -. There is no need to type a space, as Maple automatically adjusts spacing for you. Type 1.

7

Press Enter to execute the statement. Maple displays and labels the result of an executed statement on a new line. (For more information, see the How do I topic on evaluating expressions.)

8

To see what f does, enter f1 and press Ctrl + = to evaluate it in-line. As you can see, Maple evaluates the expression x21 at x=1, which yields 121=0.

 

When Working with Templates From the Palettes, Keep These Tips in Mind:

• 

If you accidentally move the cursor outside a template, simply move the cursor back into the template and press Tab to move to the next placeholder.

• 

Use Shift + Tab to move back to the previous placeholder, if you have not overwritten it yet.

Using Maple's Operator Syntax

Follow the steps below to enter xx21 and assign it to a variable whose name is f.

 

Step

Description

Illustration

1

Type f, followed by a colon (:) and an equal sign (=). The colon-equals notation assigns the content on the right-hand side to a variable name on the left-hand side.

2

Type x. This is the name of the independent variable. To type the arrow, first type a minus sign -, then the right angule bracket (>). Maple automatically converts these characters to an arrow.

 

Tip: "->" looks like a right arrow.

3

Type x21. For detailed instructions, see steps 4 to 6 of the example shown earlier.

4

Press Enter to execute the statement. Maple displays and labels the result of an executed statement in a new line. (For more information, see the How do I topic on evaluating expressions.)

5

To see what f does, enter f1 and press Ctrl + = to evaluate it in-line. As you can see, Maple evaluates the expression x21 at x=1, which yields 121=0.

Converting an Existing Expression Into an Operator

Suppose the expression x21 has already been typed. Follow the steps below to convert it to the operator xx21 and assign the result to a variable whose name is f.

 

Step

Description

Illustration

1

Right-click any part of the expression (within the dotted outline). A context-sensitive menu is displayed. For more information, see the Context-Sensitive Menus subsection of the How Do I help page.

2

Select Conversions > Operator > x. Maple will convert the expression to an operator of x.

3

Right-click any part of the blue output; in the context-sensitive menu that appears, select Assign to a Name.

4

A dialogue box appears; enter the name f. Click OK.

5

To see what f does, enter f1 and press Ctrl + = to evaluate it in-line. As you can see, Maple evaluates the expression x21 at x=1, which yields 121=0.

Note for non-Windows users: The keystrokes given in this document are for Windows.  There will be differences for other platforms. If you are using a different platform, see Help>Quick Help for the list of the most common keystrokes.

Related Topics

The How do I... topics cover the essentials for doing mathematics in Maple.  Learn more about Maple's tools and features, such as palettes and context-sensitive menus.

How do I...

...enter a simple expression?

...enter a function?

...enter a matrix?

...evaluate an expression?

...plot a function?

...enter a complex number?

Tools and Features

Palettes

Context-Sensitive Menus

Command Completion

Equation Labels

Assistants

Maple Help

Plotting Guide

Applications

Example Worksheets

Manuals

Refer to Help>Quick Reference for basic Getting Started tips.

See Also

MaplePortal, assignment, functional operators


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam