HP Forums

Full Version: [CAS] find domain for function?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

is there a function / command to find the domain, for whitch a function is defined?

Examples:

f(x) = x/(x-1) should result in x<>1
f(x) = ln(x) should result in x > 0

regards Wolfgang
Just bring it on top again!

@parisse: Is there no such command?

regards Wolfgang
There is not. He feels it is not a useful thing to have.
A graph would serve the same purpose as such a command, and would be more useful from a pedagogical point of view.
BTW, The 50G has TABVAR, which returns the domain and poles for some functions (reducible to a rational expression), but I never found that particularly useful either. Easier to just graph the function!
Xcas has the singular function, it does not return exactly the domain (for example singular(ln(x)) returns [0]), but it gives some informations about.
As for polynomials functions there is no problem, their domain is R.
For fractional functions 1/f(x) we can solve f(x)=0 and the roots are the ones to be excluded from R.
For irrational functions sqrt(f(x)), solving f(x)>=0 is enough.
In many cases in order to find the domain of a function we need to set a system:
y=sqrt(log(x^2-8*x+8)), solve({x^2-8*x+8>0,log(x^2-8*x+8)>=0}) and that's all !!!
Domain found !!!!!
Algebraically, not graphically B-) ^_^
Best,

Aries ;-)
Perhaps with past release of firmware, it could not do so.

With the latest release (2018 10 16), I found domain command which can be used to find domain:

For example, to find domain of f(x) = 1/(x-1), simply use:
domain(1/(x-1),x)
it will return x<>1

I'm just thinking howto find range of this function. Perhaps the following command can help:

domain(solve(y=1/(x-1),x),y)
it will return y<>0
Not all functions are invertible in their domain, y=x^2 is non-invertible in its domain.
What if f(x) is non-invertible ?
A function f is invertible if and only if it's injective, that is whenever f(x)=f(y), x=y.
In certain cases restricting domain of f(x) could make it invertible.
Best,

Aries Wink
@ Aries

You can use domain(solve(y=x^2,x),y). The calculator will give result y>=0

However, this may not work with implicit function e.g abs(x) + abs(y) = 4
(11-14-2019 11:20 AM)teerasak Wrote: [ -> ]@ Aries

You can use domain(solve(y=x^2,x),y). The calculator will give result y>=0

However, this may not work with implicit function e.g abs(x) + abs(y) = 4

Would it help to set:
assume(x>=0)
assume(y>=0)
As for the image (range) of f it's supposed to work with implicit functions as well but I suggest drawing a sketch or looking for maximum and minimum of y or even analysing f.
Best,

Aries Wink
hello,

Doesn't tabvar solve your problem?

Cyrille
Well, of course it does Wink
Best,

Aries Smile
tabvar is one of my favorite items on the HP 50g, and on the Prime!
Reference URL's