Why the function ‘FunctionDomain’ in some cases doesn’t give an explicit answer?
Here some cases:
1)
In: FunctionDomain[{(Tan[x] + 1)/Tan[x], 0 <= x <= Pi}, x]
Out: x/Pi \[NotElement] Integers && 1/2 + x/Pi \[NotElement] Integers && 0 <= x <= \[Pi]
but the answer would be
0<=x<Pi/4 || Pi/4<x<Pi/2 || Pi/2<x<<=Pi
In: FunctionDomain[{(Tan[x] + 1)/Tan[x], 0 <= x <= Pi}, x]
Out: x/Pi \[NotElement] Integers && 1/2 + x/Pi \[NotElement] Integers && 0 <= x <= Pi
but the answer would be: 0<x<Pi
In this case the answer is ok:
In: FunctionDomain[{(Sin[x] + 1)/(Sin[x] - 1), 0 <= x <= 2 Pi}, x]
Out: 0 <= x < Pi/2 || Pi/2 < x <= 2 Pi
For some reason, Mathematica 11 can do these
Reduce[x \[Element] Integers && 0 <= x <= 1]
Reduce[x/9 \[Element] Integers && 0 <= x <= 9]
but not these:
Reduce[x/10 \[Element] Integers && 0 <= x <= 10]
Reduce[x/\[Pi] \[Element] Integers && 0 <= x <= \[Pi]]
Thanks.
The same behavior… is it a bug? I’m tryng to correct this with another function..It seems to work fine but I’m noy sure if I don’t exactly how Mathematica gives the answer.
Strictly speaking, I would not call it a bug, because the output is correct. It is surely a shortcoming, which makes Reduce and FunctionDomain less useful, as you said. It very curious that the behaviour is so different going from a parameter 9 to a parameter 10. The command Solve does not suffer from this problem:
Reduce[x/10 \[Element] Integers && 0 <= x <= 10]
Solve[x/10 \[Element] Integers && 0 <= x <= 10]
The following
Reduce[Not[(Tan[x] + 1)/Tan[x] \[Element] Reals] &&
0 <= x <= Pi, x, Reals]
gives False, which I find objectionable.