Building expressions MathCad Help

our can create many mathematical expressions by simply typing in a stream of characters. Certain characters, like letters and digits, make up parts of names and numbers. Other characters, like * and +, represent “operators.” For example, if you type the characters This chapter describes the mechanics of creating mathematical expressions and making changes in existing mathematical expressions. The following sections make up this chapter: Building expressions How to create mathematical expressions in a straightforward way by just typing a stream of characters. How to create expressions by exploiting their structure. Editing an existing expression Inserting and deleting operators, changing the names of variables, using Cut, Delete, Paste, and Copy to streamline your editing. How to add a line break to a lengthy expression. Rearranging your worksheet How to move one or more expressions to another part of your worksheet.

Figure 3-1: An expression and its computed value.

Figure 3-1: An expression and its computed value.

You can type many of these operators by clicking on the appropriate button in the various operator palettes. Each button on the Math Palette, described on page 11, calls up one of these operator palettes. Most of the operators used in this chapter are on the arithmetic palette which you can open by clicking on the left-most button (the one with .!t calculator on it). For example, instead of typing 5 A 2, type 5, click on the button labeled xY on the arithmetic palette, and type 2 in the placeholder. On the surface, Mathcad’s equation editor seems very much like a simple text editor, but there’s more to it than this. Mathematical expressions have a well-defined structure and Mathcad’s equation editor is designed specifically to work within that structure. In Mathcad, mathematical expressions are not so much typed in as they are built. Mathcad automatically assembles the various parts that make up an expression using the rules of precedence and some additional rules that simplify entering denominators, exponents, and expressions in radicals. For example, when you type / to create a fraction, Mathcad stays in the denominator until you explicitly tell it to leave by clicking on the fraction bar. This means that the characters 3/4 + 5 A 2 generate what you see in Figure 3-1 rather than

Typing in names and numbers

When you type in names or numbers, Mathcad behaves very much like a standard word processor. As you type, you’ll see the characters you type appear behind a vertical editing line. The left and right arrow keys move this vertical editing line to the left or to the right a character at a time, just as they would in a word processor. There are, however, two important differences. As it moves to the right, the vertical editing line leaves behind a trail. This Iabcdell trail is a “horizontal editing line.” Its importance will become apparent in the next section when you begin working with operators.
• Unless the equation you’ve clicked in already has an operator in it, pressing [Space] will turn the math region into a text region. It is not possible to turn a text region back into a math region. Typing in operators Operators are symbols like “+” and “-” that link variables and numbers together to form expressions. The variables and numbers linked together by operators are called “operands.” For example, in an expression like: the operands for the “+” are x and y. The operands for the exponent operator are a and the expression x + y . The key to working with operators is learning to specify what variable or expression is to become an operand. There are two ways to do this:

• You can type the operator first and fill in the placeholders with operands, or Ii You can leam how to use the editing lines to specify what variable or expression you want to turn into an operand. The first method feels more like you’re building a skeleton and filling in the details later. You may find this method easier to use when you’re either building very complicated expressions, or when you’re working with operators like summation and integration which require many operands and lack a natural typing order. The second method feels more like straight typing and can be much faster when expressions are simple. In practice, you may find yourself switching back and forth as the need arises.

Press A to create the exponent operator.
You’ll see two placeholders. Ira
• Click in the lower placeholder and type a
• Click in the upper placeholder Type +.

• Click in the remaining placeholders and I
type x and y. lax+1
To use the editing lines to create the expression aX + Y , proceed as follows:
• Type a. The line beneath the a indicates that a will become the first operand of whatever operator you type next.
• Press 1\ to create the exponent operator.
As promised, a becomes the first per and of the exponent. The editing lines now surround another placeholder.
• Type x+y in this placeholder to com- I plate the expression.


Posted on November 20, 2015 in Editing Equations

Share the Story

Back to Top
Share This