How Do I - Maple Programming Help

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

How Do I

 Evaluate an Expression?

Maple can evaluate any mathematical expression and display the results inline or on a new line.  Maple can also evaluate an expression at a point.

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.

Evaluating an Expression Inline

Follow the steps below to evaluate  and display the result inline.

 Step Description Illustration 1 Type . For instructions on entering this expression, see entering an expression. 2 Press Ctrl + =  or Alt + Enter to evaluate the expression inline.

The inline evaluation mechanism, when used with Maple's Context-Sensitive Menus, is one of the fastest methods to perform a string of successive computations.

Evaluating an Expression on a New Line

Follow the steps below to evaluate  and display the result on a new line.

 Step Description Illustration 1 Type . For instructions on entering this expression, see entering an expression. 2 Press Enter. Maple displays and labels the result of an executed statement on a new line. By default, if this result is the first label in the document, it will be shown as (1). For more information on labels, see the Equation Labels subsection of the How Do I help page.

Equation labels organize the flow of computations. Keep these tips in mind when working with labels:

 • References can be made to any labeled result.
 • Labels are automatically numbered in sequence; if any labeled result is removed, then Maple automatically renumbers all equation labels and updates all equation label references.
 • The display format for labels can be changed. For more information, see the Equation Labels subsection of the How Do I help page.

Evaluating at a Point

Follow the steps to evaluate $\sqrt{{x}^{2}+\mathrm{\pi }}$ at $x=2$.

 Step Description Illustration 1 Type $\sqrt{{x}^{2}+\mathrm{\pi }}$ . For instructions on entering this expression, see the How Do I topic on entering an expression. 2 Right-click on the expression.  In the context-sensitive menu that appears, select Evaluate at a Point. 3 A dialog box appears; enter $x=2$.   The substitution is made. 4 Note that the result was calculated in symbolic form.  If you prefer an approximation, right-click on the result and choose Approximate and the desired number of digits.

You can also use the "evaluate at a point" template  from the Expression palette.

For example,

 Related Topics The How Do I... topics cover the essentials for doing mathematics in Maple.  Learn more about available tools and features, such as palettes and context-sensitive menus. Refer to Help>Quick Reference for basic Getting Started tips.