Using the CASExamples and Help

In addition to the examples in this Command Reference, the built-in CAS help provides examples of CAS operations.

If an operation is selected from the operations catalog, …µ, and if help is available, then pressing the

!HELP key shows help information. Pressing the %OK% menu key copies the operation to the command line, ready for use.

If an operation is selected from the CASCMD list, ILCASCMD, the same help information is available,

but instead of %OK%, there is an !ECHO key to copy the name and example to the command line. Evaluating the example and comparing it with the result shown in the help text is a quick way to check if the CAS settings are correct.

Compatibility with Other Calculators

Some CAS operations replace similar operations that were available on older HP calculators. The older operation names have been kept on the HP 50g, HP 49g+, and HP 48gII so that programs written for the older calculators will work on the new models without being rewritten. This means that some commands and functions have more than one name; these are indicated as such within the Command Reference in Chapter 3.

The older models whose programs can be run on the HP 50g, HP 49g+, and HP 48gII are the HP 28C and HP 28S, the HP 48S and the HP 48SX, and the HP 48G, HP 48GX and HP 48G+. These models only had the RPL programming language, so programs written for them should be used in RPN mode. The HP 49G is a more recent model which does have the CAS, and Algebraic mode, so programs written for it in either RPL or in Algebraic mode can be used on the HP 50g, HP 49g+, and HP 48gII. The CAS of the HP 50g, HP 49g+, and HP 48gII is also very similar to the CAS of the HP 40G and HP 40gs models, so programs and books written for them may be helpful.

Extending the CAS

Users can extend the CAS by writing their own functions or commands. Functions can be written as UDFs (User Defined Functions); see the description of DEFINE in Chapter 3 of the calculator User’s Guide and the descriptions of DEFINE and DEF in the Command Reference in Chapter 3 of this reference. The pattern matching commands ↑MATCH and ↓MATCH allow the user to write programs to edit algebraic expressions. Here is an example of an RPL program using ↑MATCH to replace the square root of a square of a symbol with the symbol itself. The wildcard &A means that any symbol or expression squared can be replaced. The conditional expression &A≥0 means that the replacement is only carried out if the square root is not of a negative value.

«{ 'ƒ(&A^2)' &A '&AŠ0' } ↑MATCH »

Dealing with unexpected CAS results or messages

If a CAS operation gives an unexpected result or message, check the list of points given in the section on CAS settings. Some problems can be caused by unexpected settings, so it can be helpful to reset all CAS settings to their

default values, with the CASCFG command, or with the !RESET key in the CAS settings menu.

Computer Algebra System 4-3