HP 39gs_40gs_Mastering The Graphing Calculator_English_E_F2224-90010

LINEAR?(<expression>,<var.name>)
This is another of those functions which is probably aimed more at the programmer than at the normal user. It
is designed to test whether a supplied expression is linear or non-linear in the variable you specify, returning
zero for non-linear and 1 for linear.
2
Eg. Suppose we use the expression
AX
B + 4
If X is the variable and A and B are both constants (say A=4, B=5) then
B
the expression
AX
2
−+4 would become 4 X
2
5 + 4 which would be
non-linear. Thus
LINEAR? returns zero (right).
On the other hand, if X were one of the constants (say
X=6) and A were
2
the variable, then the expression
AX −+4 would become B
6
2
5A× +4 or
36A 1
, which is linear. Thus LINEAR? would return
a value of
1 as shown right.
The main use for this is going to be when a programmer does not know
in advance what function the user is going to type in.
QUAD(<expression>,<var.name>)
b
2
−± 4ac b
to give both
This function uses the quadratic formula
x =
2
a
roots of a quadratic, using the ‘
S1’ formal variable to represent the
±
symbol. The quadratic is entered as an expression, and you must
indicate which variable is being solved for, since you could have an
50
equation such as
Px
2
+ Qx = where P and Q were memory values,
and you would need to specify to solve for
X in order to tell the calculator that the active variable was X and
not
P or Q.
4x 5
Eg. Solve
x
2
= 0
Use
QUAD(X2-4X-5,X)
46
±
x =
Answer:
(4+S1*6)/2
2
46 4
6
+
=
or
It is now up to you to interpret this algebraically as:
2 2
=
5 or
1
If you are simply after the roots of the quadratic then it is far better to use the
POLYROOT function (page
298) or to graph the function and use the
tools.
180