39 Gs Math Menu
39 Gs Math Menu
39 Gs Math Menu
hp calculators
The mechanics of accessing the MATH menu is very simple. It is illustrated here using the function POLYFORM from the
Polynomial group, covered in more detail later. Change into the HOME view and then press the MATH button. You will see the
screen on the right. The menu appears first with the Real functions highlighted.
Figure 1
It is possible to use the arrow keys to scroll down to the Polynomial functions but it is far faster to simply press the key labeled with
the letter ‘P’ (on the ‘7’ key). It is not necessary to press the ALPHA key first. You will notice in the screen on the right that there are
two groups of functions beginning with a ‘P’ - Polynomial and Probability. To reach Probability just press the ‘P’ key again or scroll
down.
Figure 2
Once in the correct group, press the right arrow key to move into the list of functions belonging to that group. Once again you have a
choice of using the arrow keys or the button corresponding to the first letter of the function. Pressing the right arrow key again will
move down the functions a ‘page’ at a time. In this case, since every single function in the Polynomial group begins with a ‘P’, and
there is only one ‘page’ of them, there is no difference between the methods. Move the highlight down to POLYFORM and then
press the ENTER key.
Figure 3
Figure 4
You will notice that the first bracket has already been inserted for you. This is the normal practice. Press ON to clear the edit line.
These are the functions which deal with real numbers, rounding, exponents, conversions and so on. Some examples are given below
but you should see the manual for the complete list.
DEG->RAD(degrees)
Figure 5
ROUND(num,dec.pts)
This function is also capable of rounding off to a specified number of significant figures. To do this, simply put a negative sign on the
number of places.
Figure 7
This function is also capable of rounding off to a specified number of significant figures. To do this, simply put a negative sign on the
number of places.
This group, together with the associated Hyperbolic group of functions, covers the less commonly used trigonometry functions which
were not put on the keyboard.
They are used in exactly the same way as the normal SIN, COS and TAN functions, together with their inverse functions of ASIN,
ACOS and ATAN (which are all on the face of the calculator).
Figure 8
A list is the same as a set. It is separated by commas and enclosed with a pair of curly brackets. Eg. {2,5,-2,10,3.75}
The most useful of the functions in the List category is the MAKELIST function. This function produces a list of the length specified
using a rule of your choice. Note: The STO> symbol indicates pressing the STO key.
Eg. 2 MAKELIST(RANDOM,X,1,10,1) produces a set of 10 random numbers. The X in this case serves only as a counter.
Figure 9
The MAKELIST function can also be used to simulate observations on random variables.
For example, suppose we wish to simulate 10 Bernoulli trials with p = 0.75. We can use the fact that a test like (X<4) or (Y>0.2)
returns a value of either 1 (if the test is true) or 0 (if the test is false). Thus MAKELIST(RANDOM<0.75,X,1,10,1) will return a list of
1’s and 0’s corresponding to the simulated Bernoulli trials.
Example 3: Simulate 50 observations on a Binomial random variable with n=20 & p=0.75.
Note: The and the = are both on the keyboard. Each element of the 100 in the list will be the sum of 20 Bernoulli trials. This will be
a relatively slow calculation because it involves evaluating 1000 random numbers (50 x 20).
Example 4: Simulate 100 observations on a normal distribution with Mean =80 and Sigma2=50.
This very extensive group of functions is provided to deal with matrices. One of the most useful is the RREF function which is used to
convert augmented matrices into reduced row echelon form.
The scope of functions and abilities covered in this group is vastly greater than would be required by the average school student or
teacher. Consult the manual for details. Two small examples are given below.
DET(matrix)
" 2 3%
Eg. If A = $ ' then find det(A).
#!1 5&
Figure 10
LQ(matrix)
This function takes an mxn matrix, factors it and returns a list containing three matrices which are (in order):
To separate these matrices for later use, store them into a list variable.
For example LQ(M1) STO> L1 would store the three resulting matrices into list variable L1. In the HOME view you could now enter
L1(1) STO> M2 to store the first of the result matrices into M2 and so on.
RANDOM
Figure 11
Tip: If you enter RANDOM on two calculators taken straight from their boxes the results will be the same “random” set! To stop this
happening you need to seed the internal algorithm with a different value on each calculator. The simplest way to do this is to
type RANDSEED(Time) in the HOME view. Since the internal clock will have a different time for each calculator this will mean
that everyone will get different values. This will need to be re-done if you reset the calculator.
COMB(n,r)
n
This function gives the value of Cr .
Eg. Find the probability of choosing 2 men and 3 women for a
committee of 5 people from a pool of 6 men and 5 women.
Figure 13
Tip: The reason for the single ‘COMB(6,2)’ above the main calculation is to save time. Rather than using the MATH menu for every
entry of the COMB function, you can enter it once and then use it repeatedly, changing the parameters.
x = 1.87m, ! = 0.104m
" ! 2 = 0.010816
Figure 14
As shown right, Pr(height>2m) = 0.1056, or 10.56%.
These functions are all ones which you will use regularly. Some are outlined below.
Returns the coefficients of a polynomial with roots x1, x2 , x3 ,... The roots must be supplied in vector form, which for the
hp39gs means putting them in square brackets.
The function f ( x) above has roots 2, -3 and 1. The screen shot to the right shows the POLYCOEF function giving the required
Figure 15
This is a very powerful polynomial function. It allows algebraic manipulation and expansion of an expression into a polynomial. The
expected parameters for the function are firstly the expression to be expanded, and secondly the variable which is to be the subject.
If the expression contains more than one variable then any others are treated as constants.
3
Eg. 1 Expand (2 x ! 3) ( x !1)2
Result: 8 x5 ! 52 x 4 + 134 x3 !171x 2 + 108 x ! 27
The resulting polynomial is shown both as it appears in the HOME view and as it appears after pressing the SHOW key
Figure 16 Figure 17
The resulting polynomial is shown both as it appears in the HOME view and as it appears after pressing the SHOW key
4
Eg. 2 Expand (3a ! 2b )
This function contains two variables, A and B, which must be
expanded separately. The first expansion, treating A as the
variable, is POLYFORM((3A-2B)^4,A).
Figure 18
Pressing SHOW, it can be seen that the expansion of the expression in terms of A has been done, but the terms involving B are not
fully evaluated.
Figure 19
The solution is to use POLYFORM again. Use the MATH menu to fetch the POLYFORM function to the edit line, then move the
cursor up to the partially evaluated expression that was the result of the previous POLYFORM. Copy it into the edit line, add a
comma, a B and an end bracket. Pressing ENTER will now evaluate the terms involving B.
After pressing ENTER for the second evaluation, the result is shown right (after pressing SHOW).
Figure 20
Figure 22
Figure 23
ABS(real or complex) - found on the keyboard and the MATH menu
When you use ABS on a complex number a + bi, it returns the magnitude
2 2
of the complex number a + b .
Figure 24
SIGN(real or complex)
This function is part of the Real group but is more useful with complex
numbers. Given a vector/complex number (a,b), SIGN will return another
vector/complex number which is a unit vector in the direction of (a, b).
This function returns the argument of the complex number. For example,
as shown right, ARG(4+2i) would be approximately 26.565.
The reason for the double brackets in the screen shot right is that every
function used by the calculator uses brackets (hence the outer pair) but so
too do complex numbers (hence the inner pair). Using ARG(a+bi) avoids this. Figure 26
These functions return the imaginary and real parts of the complex number
supplied. If you enter a + bi then IM((a,b)) = b and RE((a,b)) = a.
Figure 27