## hp-support-head-portlet

Actions- ${title}

Loading...

HP Customer Support - Knowledge Base

## hp-contact-secondary-navigation-portlet

Actions- ${title}

Loading...

## hp-share-print-widget-portlet

Actions- ${title}

Loading...

## hp-concentra-wrapper-portlet

Actions- ${title}

Loading...

# HP 40gs Graphing Calculator - Collecting and Expanding Terms

## COLLECT and EXPAND commands in the Algebra menu

The menu key, in the calculator’s CAS, displays commands for manipulation of algebraic expressions. Among these commands are two to collect or expand terms in an algebraic expression. To see this, press , then press the menu key labeled to select the Computer Algebra System. If the result of a previous CAS operation is displayed, use the key or to delete it. Then press the menu to select the list of Algebra commands, as shown in Figure 1. The commands shown include COLLECT and EXPAND, which are described in this learning module. The FACTOR command is similar to COLLECT, but it is not exactly the same and is described in a separate module.

**Figure : COLLECT command**

The examples in this module are shown as they work with the CAS modes at their original (default) settings; for details see the module on understanding CAS modes.

## Practice using the COLLECT command

With the screen showing the display in Figure 1, press the menu key to put the COLLECT command in the CAS display. If COLLECT is not highlighted, use the and keys to highlight COLLECT, then press the menu key. The COLLECT command will be placed in the CAS display, followed by parentheses, ready for an expression to be typed. If a previous CAS result was highlighted previously, COMMAND will be acting on it. If no previous result was highlighted, COLLECT( ) will be in the display on its own.

### Example 1

Collect like terms in the expression 2xxx + 5xx + 7xxx + πx²

### Solution

With COLLECT( ) highlighted on the screen after the keypresses described above, first press so that only the
parentheses are highlighted. Then type the above expression by pressing these keys:

Press to highlight the whole expression, and the COLLECT command, as in Figure 2:

**Figure : COLLECT command**

To complete the calculation, press and the calculator will collect terms and will display the result:

### Result

**Figure : Answer**

The calculator displays the expression with terms collected as in Figure 3.

## Practice using the EXPAND command

EXPAND expands an expression, and also simplifies it.

### Example 2

Expand the expression that is the result of example 1.

### Solution

With the expression highlighted, as shown in Figure 3, press the menu key, then press twice, so that the
EXPAND command is highlighted. Then press to activate the command and have it act on the highlighted
expression, as shown in Figure 4.

**Figure : EXPAND command**

Again, to complete the calculation, press and the calculator will display the result:

### Result

**Figure : Answer**

The calculator displays the expanded expression as in Figure 5.

Clearly, the calculator does not know that the 9 was the result of adding 2 and 7, so the expanded result is not identical to the original. Repeated use of EXPAND and COLLECT can therefore be used, as in examples 1 and 2, to simplify expressions.

Note that the term containing the symbolic constant π is not combined with the number 5.

## More about expanding and collecting terms

EXPAND not only expands an expression, but also simplifies it. COLLECT not only collects terms of the same power; it also factors an expression over integers. For example COLLECT(X²-4) gives the result (X-2)(X+2). COLLECT can be used with pure integers too, for example COLLECT(999) gives the result 3³ 37 For information on factoring symbolic expressions over non-integer numbers, see the module on the FACTOR command.

The CAS will simplify some terms even without the use of COLLECT. For example typing the expression from example 1, without applying COLLECT to it, highlighting the whole expression, and pressing simplifies xx to x² and xxx to x³.

EXPAND and COLLECT can be applied to only some of the terms in an expression, for example 3x² + COLLECT(2x² + x³ + x²) can be used to collect only the terms inside the parentheses, if the expression including COLLECT, but not 3x² is highlighted and is pressed.

## hp-feedback-input-portlet

Actions- ${title}

Loading...

## hp-feedback-banner-portlet

Actions- ${title}

Loading...

## hp-country-locator-portlet

Actions- ${title}

Loading...

Country/Region:
Serbia

## hp-detect-load-my-device-portlet

Actions- ${title}

Loading...

## hp-hero-support-search

Actions- ${title}

Loading...