• 沒有找到結果。

Selecting Mathematical Expressions

When you perform a mathematical operation, a mathematical expression is automati-cally selected for the operation, depending on the position of the insertion point and the

operation involved. We will refer to these as automatic selections. You can also force other selections by selecting mathematics with the mouse. We will refer to the latter as user selections.

Understanding Automatic Selections

When you place the insertion point in a mathematical expression and choose an opera-tion from the Compute menu, the automatic selecopera-tion depends primarily on the com-mand you choose. It also depends on the location of the mathematics, such as in-line, in a matrix, or in a display. The following two possibilities occur for mathematical objects that are typed in-line:

Selection of an expression, that part of the mathematics containing the insertion point that is enclosed between a combination of text and the class of symbols—such as =,

<, or —known as binary relations. (Click on the Symbol Panels toolbar to see the full selection of binary relations.)

Selection of the entire mathematical object, such as an equation or inequality.

Examples in the following two sections illustrate situations where these two types of selections occur.

Operations that Select an Expression

The majority of operations select an expression enclosed between text and binary opera-tions. Place the insertion point anywhere in the left side of the equation 2x + 3x = 1 + 4 except to the left of the 2, and choose Evaluate.

I Evaluate

2x + 3x = 5x = 1 + 4

The expression = 5x is inserted immediately after the expression 2x+3x. This time, only the expression on the left side of the equation was selected for evaluation. Since the result of the evaluation was equal to the original expression, the result was placed next to the expression, preceded by an equals sign. The insertion point is placed at the right end of the result so that you can select another operation to apply to the result without moving the insertion point.

Other commands, including Evaluate Numerically, Simplify, Combine, Factor, and Expand, make similar selections under similar conditions.

Operations that Select an Equation or Inequality

Place the insertion point anywhere within the equation 2x + 3x = 1 and click the Solve button on the Compute toolbar or, from the Solve submenu, choose Exact.

I Solve + Exact

2x + 3x = 1, Solution is: 15

3x + 5 5x 3, Solution is: [4; 1)

In these cases, the entire mathematical object—that is, the equation or inequality—

was selected. The other choices on the Solve submenu and the operation Check Equal-ity also select the entire mathematical object.

If the mathematics is not appropriate for the operation, no action is taken or no solution is found. For example, applying one of the Solve commands to x = y = z causes a syntax error, because of the pair of equals signs. You receive the message “No solution found.” For other inappropriate mathematics, you may see an error message, hear a beep, or see no action, depending on the Error Noti cation setting. You can change this setting in the Engine Setup dialog on the Tools menu (see page 15).

Selections Inside Displays and Matrices

Operations may behave somewhat differently when mathematics is entered in a display or in a matrix. If you place the insertion point inside a display or matrix, the automatic selection is the entire array of entries, for any operation. Some operations apply to a matrix, and others to the entries of a matrix or contents of a display. If the operation is not appropriate for either a matrix or its entries or for all the contents of a display, you may receive a report of a syntax error.

Inside a display, the automatic selection is all the mathematics, and the result is generally returned outside the display. To select mathematics in a display, place the insertion point anywhere inside the display, and choose a command that operates on expressions or equations.

When you click or apply Evaluate with the insertion point in the left side of the displayed equation

2x + 3x = 3 + 5

you get the result : 5x = 8 in-line outside the display. Because the automatic selection includes all of the mathematics, this action evaluates both sides of the equation.

A multiple line display is useful for solving systems of equations, or equations with initial value conditions.

I Solve + Exact

5x + 2y = 3

6x y = 5

, Solution is: x = 1317; y = 177

You can use a matrix to arrange mathematical expressions in a rectangular array. To create a matrix, choose Matrix from the Insert menu or click , set the number of rows and columns, and choose OK. If you see nothing on your screen, choose View and turn on Hidden Lines or Input Boxes. Type a number or mathematical expression in the input boxes of the matrix.

When you click or apply Evaluate to a matrix of expressions, all the expres-sions will be evaluated and the result will be returned as a matrix. Evaluate Numeri-cally, Simplify, Factor, and choices from the Combine submenu behave similarly.

I Evaluate (or Simplify)

A table is not a mathematical object, and the behavior for mathematics inside a table is somewhat different than for mathematics in a matrix or display. If you have mathematics in a table, placing the insertion point in the mathematics will automatically select all of the mathematics in the cell that contains the insertion point. For example, Evaluate will select an equation if one is present, rather than just an expression. The result of the operation will appear in the cell.

Understanding User Selections

You can restrict the computation to a selection you have made and so override the auto-matic choice. Recall that you can select a piece of matheauto-matics by holding down the left mouse button while moving the mouse; your selection is the information that appears on the screen in reversed colors.

There are two options for applying operations to your selection—operating on a selection displays the result of the operation but leaves the selection intact, and replacing a selection replaces the selection with the result of the operation. Following are two examples illustrating the behavior of the system when operating on a selection. The option of replacing a selection is referred to as computing in place, and examples are shown in the next section.

I To operate on a user selection

1. Use the mouse or pressSHIFT+ARROWto select an expression.

2. Applying a command to the expression.

Example Use the mouse or pressSHIFT +ARROWto select 2 + 3 in the expression 2 + 3 x. From the Compute menu, choose Evaluate. The answer appears to the right of the expression, following a colon (:).

2 + 3 x : 5

Use the mouse or press SHIFT + ARROW to select (x + y)3 within the expression (x + y)3(7x 13y)3+ sin2x. From the Compute menu, choose Expand. The answer appears to the right of the whole expression, following a colon.

(x + y)3(7x 13y)3+ sin2x : x3+ 3x2y + 3xy2+ y3

In general, the result of applying an operation to a user selection is not equal to the entire original expression, so the result is placed at the end of the mathematics, separated by something in text (in this case, a colon). You can then use the word-processing capabilities of your system to put the result where you want it in your document.

I To replace a user selection

1. Use the mouse or pressSHIFT+ARROWto select an expression.

2. Press and holdCTRLwhile applying a command to the expression.

or

For the command Evaluate, pressCTRL+SHIFT+E.

The system replaces the selected expression with the output of the command. This is an in-place computation, as described in the following section.

相關文件