HP 50g manual Polynomials, Horner function, Variable, Pcoef function

Models: 50g

1 184
Download 184 pages 36.34 Kb
Page 81
Image 81

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., X3+2X2-3X+1 = (X2+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., X6-1 = (X5-5*X4+25X3-125X2+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 X6-X5-5X4+5X3+4X2-4X.

Page 5-8

Page 81
Image 81
HP 50g manual Polynomials, Horner function, Variable, Pcoef function