Function: math[domain] - determines the domain of a real-valued function
Calling Sequence:
domain(fn);
domain(fn, 'singularity');
Parameters:
fn - a function in one real
Description:
domain determines the real domain on which the function f is defined. Functions including logarithms or roots are evaluated, as well. f must not contain parameters.
The result is a RealRange expression or a sequence of RealRange expressions. Further possible results are 'real' if RealRange(-infinity, infinity) or a numerical value a if f is defined at a.
By default, domain does not evaluate discontinuities. They are returned as a set if the option 'singularity' (or 'sing' for short) is given as a second argument.
See math/domainx for an improved version of this function.
This function is part of the math package, and so can be used only after performing the command with(math) or with(math, domain).
Examples:
> with(math, domain):
> f := x -> (0.3*x^3-0.3*x^2-2.5*x+2.5)/abs(x-1);
> domain(f(x));
> f := x -> 3/2*sqrt(abs(x^2-1));
> domain(f(x));
> f := x -> sqrt(x^3+4*x^2+4*x);
> domain(f(x));
> f := x -> sqrt(x^3-4*x);
> domain(f(x));
> domain(ln(x));
See Also:
convert/range , math/fnull , math/extrema , math/inflection .
Version History:
Version 1.0 as of December 30, 1997