TI-M: Calculator Envy


[Prev][Next][Index][Thread]

TI-M: Calculator Envy




Yes, my friends, I am suffering from Calculator Envy... and you're not 
going to like it... yes, I'm envious of *gulp* the Hewlett Packard HP38G's 
(or is that HP38's ?).

Here in Australia, high school students are given the option of using a 
TI-83(+), an HP38 or a Casio thingamajigg... naturally, I went for the best 
of the choices - the TI-83.

But, it seems everyone else has this neat function on their HP38's. It's 
called PolyRoot.

For instance, let's say we want to find the root of:
y=3x^4 + 2x^3 - 7x^2 + x - 5

Looking at the co-efficients of that polynomial, we have 3, 2, -7, 1 and -5 
in order.

On the HP's you type in the command "PolyRoot(3,2,-7,1,-5) and it will 
return all possible roots of the function.

The closest I can get to that is the Solver on the TI-83, but that only 
gives one root, and you'll never know if maybe - just maybe - there is 
another root out there that you don't know of.

Anyway, my question for you all: Does anybody know an algorithm that'd work 
so I could make a program to do a similar job on my TI-83? (only needs to 
be in TI-BASIC, no fancy ASM stuff) ?


This is what I have attempted:
The solve function: Solve(expression, variable, guess, [{upper, lower}] )

let's use expression 0=x^2 -1  (ie, obvious roots of x = 1 , x = -1 )
Step 1: solve(X^2 - 1 , X , -1e99 , { -1e99 , 1e99 } )
Calculator finds an answer (HOPEFULLY -1)
Step 2: solve(X^2 - 1 , X , -1 , { -1 , 1e99 } )
Calculator finds an answer (HOPEFULLY 1)
Step 3: solve(X^2 - 1 , X , 1 , { 1 , 1e99 } )
Calculator finds no answer.

Problem 1: When the calculator finds no more answers, it returns an error 
message, even though this is the result I *want*. I can't work around the 
error message, and my program halts there
Problem 2: The first answer (where I was ecpecting the '-1' above) turned 
out to give +1 :( DESPITE the fact that my "guess" value of -1e99 is far 
closer to -1 than it is to +1... hrmph!


If it helps anyone else at all out there thinking over this one, The HP38 
function looks something like this:
[note: I don't have a HP38, so, it's VERY hard for me to remember this]

for solving 0=X^2 - 5X + 4  (which will give roots X=4, X=1)

POLYROOT ( [ [ 1 , -5 , 4 ] ] )
Response:   [ 4  1 ]

I may have the brackets wrong around there - but, I KNOW it involved the 
square-like brackets - the ones that imply matrices. My impression is that 
whatever algorithm the HP38's are using, it involves matrices - and, 
unfortunately, I'm not very strong with matrix operations. Little help?

thanx for any help ppl

Tony




Follow-Ups: