HP 40gs HP 39gs_40gs_Mastering The Graphing Calculator_English_E_F2224-90010.p - Page 180
LINEAR?(<expression>, <var.name>)
UPC - 882780045217
View all HP 40gs manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 180 highlights
LINEAR?(,) 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. Eg. Suppose we use the expression AX 2 − B + 4 If X is the variable and A and B are both constants (say A=4, B=5) then the expression AX 2 − B + 4 would become 4X 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 the variable, then the expression AX 2 − B + 4 would become A× 62 − 5 + 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(,) This function uses the quadratic formula x = −b ± b2 − 4ac to give both 2a 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 equation such as Px2 + Qx − 5 = 0 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. Eg. Solve x2 − 4x − 5 = 0 Use QUAD(X2-4X-5,X) Answer:(4+S1*6)/2 It is now up to you to interpret this algebraically as: x = 4±6 2 = 4 + 6 or 4 − 6 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