The GenerateConditions->True
option of the Integrate
command is useful
and works properly in most cases. However, there are cases when this command
works improperly. Here is one of these: the result of
Integrate[1/(1 - Cos[x]), {x, a, b}, Assumptions -> {a, b} \[Element] Reals, GenerateConditions -> True]
ConditionalExpression[Cot[a/2] - Cot[b/2], a^2 < a b || a b > b^2]
is not correct if the integration range includes a zero of Cos[x]-1
.
The result of
Integrate[1/(1 - Cos[x]), {x, Pi/4, b}, Assumptions -> {b} \[Element] Reals, GenerateConditions -> True]
-Cot[b/2] + Cot[\[Pi]/8]
is not better. The same issue in 12.3.1 on Windows 10 with Integrate[1/(Sqrt[3] - 2*Cos[x]), {x, a, b}, Assumptions -> {a, b} \[Element] Reals, GenerateConditions -> True]
etc.
Is there a workaround?