HP Forums
incorrect answer from solve() solving inequality - 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: incorrect answer from solve() solving inequality (/thread-13220.html)



incorrect answer from solve() solving inequality - teerasak - 07-02-2019 08:21 AM

I found the wrong answer when letting HP prime solving inequality:

The calculator gave result where x<=0 which should not be the case as x is under square root, and it cannot be 0 as the denominator will be 0 The rest interval are correct. So the calculator needs to exclude x<=0

[attachment=7423]


RE: incorrect answer from solve() solving inequality - teerasak - 07-02-2019 08:58 AM

I see Wolfram alpha gives similar answer!
[attachment=7424]


RE: incorrect answer from solve() solving inequality - parisse - 07-02-2019 02:32 PM

Even if x is negative, the expression 1/(x+sqrt(x))+1/(x-sqrt(x)) is real valued :
normal(1/(x+sqrt(x))+1/(x-sqrt(x))) returns 2/(x-1)
Therefore the Prime answer is correct, and x=0 is also valid (since the limit at x=0 is -2 and -2<=1).


RE: incorrect answer from solve() solving inequality - teerasak - 07-02-2019 04:46 PM

Thank you, parisse.

For x is negative, it means that each of 1/(x+sqrt(x)), 1/(x-sqrt(x)) to be complex number. If so, that is correct.

For x is zero,

(1/(x+sqrt(x))+1/(x-sqrt(x)))
= (x-sqrt(x) + x + sqrt(x))/(x^2-x)
= (2x)/(x*(x-1))
and this will be equal to 2/(x-1) if x<> 0 (otherwise, it will be 0/0)

So (1/(x+sqrt(x))+1/(x-sqrt(x))) when x=0 should be undefined. However, lim x->0 of (1/(x+sqrt(x))+1/(x-sqrt(x))) is -2.