Skip to content

FunctionDomain ​

The set of real x where f (an expression in the single real variable x) is defined, as a condition in x.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageFunctionDomain!
FunctionDomain(f, x)the domain of f as a function of the real variable x, expressed as an inequality or a disjunction of inequalities.
Typed signatures
TypePackageApplies
(expression, symbol) -> expressionanalyticalways

Domain: Elementary functions

Details
  • Built on one shared classifier for an elementary real expression in a single variable — see FunctionMonotonicity, FunctionRange, and the rest of the Function* family, which all reduce the expression the same way before answering their own question.
  • Covers: polynomials and rational functions (division by zero, denominator degree <= 2 or a bare power like xnx^n); Sqrt of an affine or quadratic argument (an even root, requiring the radicand >= 0); Ln/Log of an affine argument; and Exp, Sin, Cos, Tan of an affine argument (domain all of R\mathbb R, except Tan -- see below).
  • Declines (leaves the call unevaluated) rather than answer: a second free variable; a denominator or radicand of degree above 2 with more than one term; Log of anything but an affine argument; and Tan, whose true domain excludes a countably infinite set of points (x≠π/2+kπx \ne \pi/2 + k\pi) that this file's interval vocabulary cannot express as a finite union of intervals.

Examples

3 more kept as data, checked against the oracles
Basic #

A polynomial is defined everywhere

live ↗
InFunctionDomain(x2,x)\mathrm{FunctionDomain}(x^2, x)OutTrue\mathrm{True}

Known value · Wolfram 15.0.0, hand cross-checked

Division by zero excludes the origin

live ↗
InFunctionDomain(1x,x)\mathrm{FunctionDomain}(\frac{1}{x}, x)Outx<0∨0<xx\lt0∨0\lt x

Known value · Wolfram 15.0.0, hand cross-checked

Scope #

A rational function with two real poles

live ↗
InFunctionDomain(1x2−1,x)\mathrm{FunctionDomain}(\frac{1}{x^2-1}, x)Outx<−1∨−1<x<1∨1<xx\lt-1∨-1\lt x\lt1∨1\lt x

Known value · Wolfram 15.0.0, hand cross-checked

An even root needs a nonnegative radicand

live ↗
InFunctionDomain(x2−1,x)\mathrm{FunctionDomain}(\sqrt{x^2-1}, x)Outx≤−1∨1≤xx≤-1∨1≤x

Known value · Wolfram 15.0.0, hand cross-checked

A natural log needs a positive argument

live ↗
InFunctionDomain(ln⁡(2−x),x)\mathrm{FunctionDomain}(\ln(2-x), x)Outx<2x\lt2

Known value · Wolfram 15.0.0, hand cross-checked

Possible issues #

Tan's excluded set isn't a finite union of intervals, so this stays unevaluated rather than guess

live ↗
InFunctionDomain(tan⁡(x),x)\mathrm{FunctionDomain}(\tan(x), x)OutFunctionDomain(tan⁡(x),x)\mathrm{FunctionDomain}(\tan(x), x)

Known value · Wolfram 15.0.0, hand cross-checked

About
Examples9
Checked againstWolfram Language 7 agree2 differ
CrosswalkWolfram Language