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?


The integral

Integrate[1/(1 - Cos[x]), {x, 0, 2 Pi}  ]
(*... does not converge on {0,2 \[Pi]}*)

does not converge.

That's why you have to restrict your assumptions for example to 0<a<b<2Pi !

  • 1
    $\begingroup$ You open an opened door. Thank you anyway. Could you present an automatic way to this end? TIA. $\endgroup$
    – user64494
    Sep 15 '21 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.