Consider the built-in function
FunctionDomain to find a domain of a composite function f(f(x)) where f(x)=1/x.
f[x_]:=1/x FunctionDomain[Composition[f, f][x], x] FunctionDomain[1/(1/x), x]
The output is
True in both cases.
Apparently Mathematica simplifies the argument before applying the
FunctionDomain. That's why it gives mathematically incorrect output (x=0 should be excluded).
Composition[f,f][x]=f(f(x)) = 1/(1/x)= x. And the domain of x is all real numbers.
In case when
Hold function is applied to
1/(1/x) the output is x < 0 || x > 0 as it should be.
x < 0 || x > 0
Hold is applied to
Composition[f, f][x] The result is completely different.
FunctionDomain[Hold[Composition[f, f][x]], x] returns the input as output.
Why doesn't it work? What am I missing?