HP Forums
Finding zeros or using Solve() - 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 zeros or using Solve() (/thread-18921.html)



Finding zeros or using Solve() - geepigs - 10-03-2022 03:05 AM

I have a polynomial that I am looking to find the zeros of, and HP prime is only giving me 1 of the two possible solutions and I don't understand why.

The equation is (6x^2-x-1)/6

The roots should be 1/2 and -1/3

When using the 'zeros' function it just returns 1/2

when I use the 'solve' function with the equation set =0 and with respect to x, it also just gives me 1/2. Why is it not giving both solutions?
Any help appreciated thank you.


RE: Finding zeros or using Solve() - Joe Horn - 10-03-2022 03:20 AM

Since it works fine on my Prime, I suspect that either you're doing something wrong (e.g. using uppercase 'X' in CAS instead of lowercase 'x', or doing it in Home instead of in CAS), or your CAS Settings are askew, or the variable 'x' has a value in it (or an ASSUME has limited it to positive values), or your firmware needs updating, et cetera. If you tell us exactly what you did or give us a screen shot, we'll be able to figure out what's going wrong and why.

Suggestion: See if executing del(x) helps.

The following was done using the Virtual Prime, version 2.1.14592 (2021 06 09).

[Image: zeros100.png]


RE: Finding zeros or using Solve() - geepigs - 10-03-2022 03:31 AM

Thanks for the reply. I see the HP prime app for mine works as yours does, but my physical copy of the calculator is still just returning [1/2]

I don't have any value assigned to x, I'm using the button with the t, theta, n on it and it is lower case. I am also doing it in CAS. I don't have any assume functions hanging around, maybe it's a setting as you suggested? I don't know how to post a photo on here


RE: Finding zeros or using Solve() - geepigs - 10-03-2022 03:46 AM

Can I see your CAS settings? I don't know what else it could be. I've tried changing some things in settings but nothing has worked. Thanks


RE: Finding zeros or using Solve() - geepigs - 10-03-2022 03:52 AM

I have the same settings as my Prime app, still doesn't work on my handheld in CAS mode but it works in Home using CAS.zeros. I don't know why. Every single thing I try to do with this calculator is a struggle.


RE: Finding zeros or using Solve() - Steve Simpkin - 10-03-2022 03:59 AM

I tried changing multiple CAS settings in the simulator and could not cause it to produce only one result like you are seeing. I also tried Solve (see screenshot below) and after a warning message (this is not an equation) I pressed ESC and also obtained both answers.

[attachment=11192]


RE: Finding zeros or using Solve() - geepigs - 10-03-2022 04:06 AM

Thank you for replying.
Here's a link to a photo of my calculator's output. Is my calculator just bricked?[Image: YcEZkPa]

https://imgur.com/a/YcEZkPa


RE: Finding zeros or using Solve() - C.Ret - 10-03-2022 06:06 AM

Hi there,

I think Joe Horn is right. There is a constraint imposed on the x variable.

(10-03-2022 03:20 AM)Joe Horn Wrote:  I suspect that either you're doing something wrong (e.g. using uppercase 'X' in CAS instead of lowercase 'x', or doing it in Home instead of in CAS), or your CAS Settings are askew, or the variable 'x' has a value in it (or an ASSUME has limited it to positive values), or your firmware needs updating, etc


The ASSUME and ADDITIONALLY commands allow you to limit the domain for a variable, see what I get by limiting x to strictly positive values:

[attachment=11193]

The ABOUT instruction checks status of a formal variable. It is by far the first thing to check.

If in doubt, check the status or reset your workspace. Or brutally, reset the entire calculator if you are in a hurry; that will save you a lot of stress and hassle.

The PURGE(x) or RESTART statements are designed for this. And as a last resort, if you don't know what else to do, a simple ON-Apps-ESC instantly puts ALL things back in their place.


RE: Finding zeros or using Solve() - geepigs - 10-03-2022 04:24 PM

Thank you so much, resetting it worked. I appreciate all the help


RE: Finding zeros or using Solve() - geepigs - 10-03-2022 04:24 PM

Thank you so much, resetting it worked. I appreciate all the help