Monday, January 25, 2010

Using wiggle to calculate values of a polynomial

Today's calculator-ridden generation, given

`\qquad\qquad\qquad p(x)  =  3 x^3  +  4 x^2  +  2 x  +  5`

and asked to calculate `p(2)`, run off and calculate

`\qquad\qquad\qquad p(2)  =  3 (2)^3  +  4 (2)^2  +  2 (2)  +  5.`

The calculation in that form requires two powers, three multiplications, and three additions.  It is usually more efficient to calculate the equivalent wiggle expression

`\qquad\qquad\qquad p(2)  =  3_{2}4_{2}2_{2}5,`

which requires only three multiplications and three additions.  Although succinctly written in wiggle notation, this is actually an old trick known as nested multiplication.  One of the vagaries of the usual curriculum is that this trick is rarely taught to newbies; even many oldbies are unfamiliar with it, and they will have met it under the name synthetic division, where it is used only for the much less common purpose of evaluating the remainder when dividing a polynomial by a monomial.

The convenience is not limited to calculations with positive whole numbers.  We need to be careful to represent missing powers by zeroes in the wiggle expression.

It is also time to introduce a more surgical way to negate :  let an overbar negate whatever is under it.

For example, let's find `q(-1.5)`, where

`\qquad\qquad\qquad q(x)  =  3.1  x^3  -  2.2  x  +  5.7,`
`\qquad\qquad\qquad\qquad =  3.1_{x}0_{x}\bar{2.2}_{x}5.7.`

Then

`\qquad\qquad\qquad  q(-1.5)  =  3.1_{\bar{1.5}}0_{\bar{1.5}}\bar{2.2}_{\bar{1.5}}5.7,`
`\qquad\qquad\qquad\qquad  = (\bar{4.65} + 0)_{\bar{1.5}}\bar{2.2}_{\bar{1.5}}5.7,`
`\qquad\qquad\qquad\qquad  = (6.975 - 2.2)_{\bar{1.5}}5.7,`
`\qquad\qquad\qquad\qquad  = (\bar{7.1625} + 5.7),`
`\qquad\qquad\qquad\qquad  = -1.4625`

With a little practice, one can get to the point when one can stare at an expression like


`\qquad\qquad\qquad q(x)  =  3.1  x^3  -  2.2  x  +  5.7,`

think 

`\qquad\qquad\qquad\qquad q(x) =  3.1_{x}0_{x}\bar{2.2}_{x}5.7.`

and calculate `q(x)` for a succession of values of `x`, and so prepare a table of values for making a plot.

No comments:

Post a Comment