Post Reply 
Solve Bug?
09-28-2017, 11:03 AM
Post: #1
Solve Bug?
Hello to everyone,

I found some time ago an interesting Polynomial on another forum.
It seems to be a bug in the Prime CAS.
Yesterday I updated my HP prime and tested it again to find the roots of it.
On all other calculators I have, like the HP 48 (withe Erable), the 49g, the 50g
there is the same solution, only the prime seems to be a little more creative ;-)

So I like to ask you if you know what the problem is in this case....

Try to find the root of
f(x)= x^4 - 3x^3 - 2.75x^2 + 12x - 5

It doesn't matter if I do it with solve, zeros... exact or approx mode...I always get the answer
2.5 2. -2. 0

0 can't be a root of this polynomial.
The right solution should be
0.5 2.5 2. -2.

Interestingly, when i try it with proot and type -11/4 instead of -2.75 it works.
solve with -11/4 works too.

My HP Prime is on the newest firmware.
So is there anybody who can explain this behavior?
Thank you all in advance!

Best regards
Find all posts by this user
Quote this message in a reply
09-30-2017, 09:31 PM
Post: #2
RE: Solve Bug?
There are older threads about this problem, with solve() sometimes returning wrong results (e.g., an erroneous zero as a solution for polynomials with degenerate roots, or for highly factorizable polynomials). I have found it helpful to

a) test explicitly for the solutions offered, i.e., solve(your polynomial here, x=0) returns 0.5
b) run solve with a bracket for the solutions, i.e solve(your polynomial here, x=-5..5) returns [-2 .5 2 2.5].
Find all posts by this user
Quote this message in a reply
10-03-2017, 09:25 PM (This post was last modified: 10-03-2017 09:27 PM by Tim Wessman.)
Post: #3
RE: Solve Bug?
I haven't checked with the release version, but in my local version I get back:

solve(x^4-3*x^3-2.75*x^2+12*x-5,x) ----> {-2.,0.5,2.,2.5}

So I'm assuming there was a problem fixed in the CAS at some point.

In the meantime, just stick your input into solve(exact(x^4-3*x^3-2.75*x^2+12*x-5),x)) to work around it (will automatically convert to fractions like you noted works fine). The CAS definitely doesn't like working with approximate numbers in general, but it has gotten much, much better then it was in the past.


Although I work for the HP calculator group, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
10-03-2017, 11:05 PM
Post: #4
RE: Solve Bug?
In the meantime . . . ? Now the cat is out of the bag. Thanks, I'll be crossing my fingers!
Find all posts by this user
Quote this message in a reply
Post Reply 

User(s) browsing this thread: 1 Guest(s)