HP Forums
How to simplify result from domain function - 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: How to simplify result from domain function (/thread-14594.html)



How to simplify result from domain function - teerasak - 03-02-2020 07:58 AM

I use domain() function to find the domain of function Sqrt(x^2-9)/(x-3)

The calculator returns result [x<=-3 x>=3 and x <>3]

When simplify, it is expected to have [x<=-3 x>3], but the calculator returns result [x<=-3 x>=3]

[Image: pic1.png]

How can we have correct simplified answer?


RE: How to simplify result from domain function - Albert Chan - 03-02-2020 12:47 PM

The bug probably not from simplify, but x≠3

XCas> purge(x)
XCas> x >= 3      // returns x ≥ 3, as expected
XCas> x != 3       // returns true ???

XCas> [(x <= -3), (x >= 3) and (x != 3)]       // dropped "and true", returns [x <= -3, x >= 3]


RE: How to simplify result from domain function - parisse - 03-02-2020 01:18 PM

It's unfortunately unavoidable. x!=3 will return true, because in this test x is considered to be a variable, and a variable is not the same as an integer.


RE: How to simplify result from domain function - teerasak - 03-03-2020 05:46 AM

I see. So the calculator treats x>=3, x<>3 as logical comparison rather than a set of number.

Any representation of the set x>=3?


RE: How to simplify result from domain function - parisse - 03-03-2020 06:06 AM

There is an internal representation, used by assume/about, but no user commands.


RE: How to simplify result from domain function - compsystems - 03-03-2020 05:18 PM

A new command to graph interval is very important, for example to graph the solution [x≤-3, (x≥3) AND (x≠3)] the following instruction is required

F1(X):=PIECEWISE( X≤-3, 0, (X≥3) AND (X≠3), 0 ) [enter] [plot]


RE: How to simplify result from domain function - CyberAngel - 03-03-2020 08:55 PM

(03-03-2020 06:06 AM)parisse Wrote:  There is an internal representation, used by assume/about, but no user commands.

Any way of adding an exported command or function?
Would it be useful in the described cases?
– –
VPN


RE: How to simplify result from domain function - parisse - 03-04-2020 08:10 PM

No, there is no support for the internal representation of assume in user commands.


RE: How to simplify result from domain function - CyberAngel - 03-04-2020 09:02 PM

(03-04-2020 08:10 PM)parisse Wrote:  No, there is no support for the internal representation of assume in user commands.

I know there isn't at the moment
but
would it be useful
if you would ADD such a support?

Is it possible to add new keywords?
like this: "set { x<3 x>3 }"
VPN


RE: How to simplify result from domain function - parisse - 03-05-2020 06:31 AM

There is nothing planned. I have myself no idea how to handle properly these kinds of objects.


RE: How to simplify result from domain function - CyberAngel - 03-05-2020 07:54 AM

(03-05-2020 06:31 AM)parisse Wrote:  There is nothing planned. I have myself no idea how to handle properly these kinds of objects.

okay
Users just have to careful and
also know – not just the math
but also the limitations of their tools.
– –
VPN