HP (Hewlett-Packard) HP 50g Calculator User Manual


 
Page 5-8
Polynomials
Polynomials are algebraic expressions consisting of one or more terms
containing decreasing powers of a given variable. For example,
‘X^3+2*X^2-3*X+2’ is a third-order polynomial in X, while ‘SIN(X)^2-2’ is
a second-order polynomial in SIN(X). Functions COLLECT and EXPAND,
shown earlier, can be used on polynomials. Other applications of
polynomial functions are presented next:
The HORNER function
The function HORNER („Þ, POLYNOMIAL, HORNER) produces the
Horner division, or synthetic division, of a polynomial P(X) by the factor (X-
a), i.e., HORNER(P(X),a) = {Q(X), a, P(a)}, where P(X) = Q(X)(X-a)+P(a).
For example,
HORNER(‘X^3+2*X^2-3*X+1’,2) = {X^2+4*X+5 2 11}
i.e., X
3
+2X
2
-3X+1 = (X
2
+4X+5)(X-2)+11. Also,
HORNER(‘X^6-1’,-5)=
{X^5-5*X^4+25*X^3-125*X^2+625*X-3125 -5 15624}
i.e., X
6
-1 = (X
5
-5*X
4
+25X
3
-125X
2
+625X-3125)(X+5)+15624.
The variable VX
Most polynomial examples above were written using variable X. This is
because a variable called VX exists in the calculator’s {HOME CASDIR}
directory that takes, by default, the value of ‘X’. This is the name of the
preferred independent variable for algebraic and calculus applications.
Avoid using the variable VX in your programs or equations, so as to not
get it confused with the CAS’ VX. For additional information on the CAS
variable see Appendix C in the calculator’s user’s guide.
The PCOEF function
Given an array containing the roots of a polynomial, the function PCOEF
generates an array containing the coefficients of the corresponding
polynomial. The coefficients correspond to decreasing order of the
independent variable. For example:
PCOEF([-2, –1, 0 ,1, 1, 2]) = [1. –1. –5. 5. 4. –4. 0.],
which represents the polynomial X
6
-X
5
-5X
4
+5X
3
+4X
2
-4X.
SG49A.book Page 8 Friday, September 16, 2005 1:31 PM