HP Prime - Spreadsheet App, CAS Calculus

Introduction, Help

The Spreadsheet App is a powerful application available in the HP Prime.  It can perform many of the functions of spreadsheets but also can perform many of the Math, CAS and Catalog functions within its cells.  As usual, you should check out the online Help before using this feature. .

In the examples below, we will build[1] a named spreadsheet that will allow the user to define expression(s) and the application will automatically perform operations on them.

Example 1 - Build an App “Spreadsheet CALC1” that analyses expressions

Lets build an app that will allow you to input an expression (like 2x3-3x-1) and have the application automatically calculate its derivative, integral and find its zeros.  

We can build a spreadsheet application from scratch by first “saving” a copy of the existing spreadsheet app.  Open the Apps  screen and highlight the Spreadsheet app.  Click Save. then enter the new name of the spreadsheet (name:  Spreadsheet CALC1).  Open the new Spreadsheet CALC app and click on cell B2.  Enter “Expression” and press Enter.  Note - the quotes “  “  are needed if you just want text shown. Now, in cell C2, enter the the expression (), then name it Expr1 as shown

Shift  =  2  Shift   Alpha x  xy  3  -  3  Shift   Alpha x  -  1  press CAS  then  OK 

Format   Name   Expr1  Ok 

The screen should look as shown. Note the CAS is enabled in cell C2 and the cell is outlined due to the Expr1 name given to it .

Now, lets enter cells that will compute the first derivative of the expression in C2 (or Expr1). In cell B4, enter “=(Expr1)’ “.  This is just text that shows the formula you will enter next.  In cell C4, enter the CAS formula [2]

Shift =  ()  Expr1  ‘   press   CAS  then  OK 

which should give the screen below.  You can see the contents of C4 by pressing Show  .

In a similar way, we can add integration and finding zeros for Expr1.  In cells B5 and B6 enter “=int(Expr1,x)” and “CAS.zeros(Expr1)”.  Enter the formulas for the integration and zeros in cells C5 and C6.  The screen should show the additional labels and calculations below

Shift =  int  ()  Expr1  ,  x   press   CAS  then  OK  [3]

Shift =  CAS.zeros  ()  Expr1 press   OK [4] 

At this point, you may want to Format the cells and adjust the row/column sizes.  Here it is polished up somewhat.  Now if you edit the expression in C2 (green), the revised expression will have its derivative, integral and zeros recalculated - cool huh?

Try the following on your own:

  • Edit C2 with a different coefficients or even a different expression.  See new results!
  • Try other CAS, Math or Math palette commands the expression in say cells C7,8,9…
  • Try copying and pasting items from Column C to columns D, E etc.  This may be useful if you want to compare two expressions and calculations
  • Create some named cells that can represent lower/upper limits or guesses.  Refer to  these in numerical calculations - like a definite integral =int(Expr1,x,lower,upper)

[1] Although you can build this completely on the HP Prime calculator, you may want to build on the HP Prime emulator as it is easier to type in characters quickly.  Then highlight and Send from the emulator to the calculator

[2] Entering a single quote (prime symbol) in the calculator can be performed with Shift () then <x to delete one of the quotes.  Wish it were easier...

[3] An alternate method is to use the Toolbox commands: press Toolbox  2  2 to load the command.

[4] Since you entered a CAS command with CAS in the name, then you don't need to enable the CAS  button.  Make sure the there is no dot to the right of the CAS.