HP Forums
Finding roots of polynomial - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Finding roots of polynomial (/thread-18083.html)



Finding roots of polynomial - WedgeAntilles - 02-26-2022 03:47 PM

Hi there,

I am reading the hp prime user guide.

On page 55, there is an example to find the roots of 2x^2+3x-2.

I do as the manual says, proot(2*x^2+3*x-2) and the hp prime answers []

Inside the braclets there is no info about the 2 roots.

Note: the ^inside the proot(2*x^2+3*x-2) , I dont input it in the hp prime.

What am I doing wrong??

Many thanks,


RE: Finding roots of polynomial - Tim Roche - 02-26-2022 11:01 PM

proot() is expecting an array of coefficients for the input polynomial. So, for your polynomial

proot( [2 3 -2] )

and hp prime's answer
[-2.,0.5]


RE: Finding roots of polynomial - john gustaf stebbins - 02-26-2022 11:22 PM

The example with the polynomial worked for me. Until I assigned a value to x. Now I get an empty matrix for an answer.

Trying to remember how to unassign a variable in CAS. :^(


RE: Finding roots of polynomial - john gustaf stebbins - 02-27-2022 12:18 AM

purge(x)


RE: Finding roots of polynomial - WedgeAntilles - 02-27-2022 08:53 AM

Hi there,

After doing purge(x), it worked fine.

I was begining to think the calc had a bug....

Many thanks!