# Integrate[Sqrt[(1 - Cos[t])/(Cos[a] - Cos[t])], {t, a, Pi}, Assumptions -> 0 < a < Pi] gives a Complex Expression rather than Pi

Integrate[Sqrt[(1 - Cos[t])/(Cos[a] - Cos[t])], {t, a, Pi}, Assumptions -> 0 < a < Pi] gives a Complex Expression rather than Pi which is what I expect.

The integral arises in the Tautochrone problem, i.e. this is the integral above the line "(2):" on the page https://proofwiki.org/wiki/Cycloid_has_Tautochrone_Property

I assume the expression is Complex because Mathematica assumes the expression inside the Sqrt is negative at some points but I don't think that is true.

I understand that the integrand has a singularity at t = a making the denominator 0 but I was hoping Mathematica could do the Integration. It doesn't complain about the singularity.

I am using Mathematica 12.1

Assumptions are not always applied as constraints. (Took a bit extra massaging to get the result of Integrate into its fully simplified form under the assumptions.)

res = Integrate[Sqrt[(1 - Cos[t])/(Cos[a] - Cos[t])],
{t, a, Pi},
Assumptions -> 0 < a < Pi]
(*
-I (-1)^Floor[(π + Arg[-1 + Cos[a]])/(
2 π)] (Log[2] + 2 Log[Cos[a/2]] - Log[-1 - Cos[a]])
*)

Assuming[0 < a < Pi,
PiecewiseExpand[FullSimplify[res],
Method -> {"ConditionSimplifier" ->
(Reduce[# && \$Assumptions, ##2] &)}]
]

(*  Pi  *)
• +1 Add the redundant assumption that Cos[a] < 1, i.e., Assuming[0 < a < Pi && Cos[a] < 1, Integrate[Sqrt[(1 - Cos[t])/(Cos[a] - Cos[t])], {t, a, Pi}] // FullSimplify] Sep 20, 2022 at 13:18
• @BobHanlon Thanks. I thought of that (Cos[a] < 1), which appears in the output of FullSimplify[]; but I wanted to see if I could get Mathematica to deduce it. I don't know why it took such an effort to get it to do that. Simplify[] or FullSimplify[] (with the assumption 0 < a < Pi) ought to be enough, imo. Sep 20, 2022 at 13:21
• I agree, that is why I refer to it as a redundant assumption. Sep 20, 2022 at 13:23
• @BobHanlon I noticed and understood "redundant". I was explaining why I didn't use Cos[a] < 1. I also realize it simplifies the code. Still, for whatever reason, I was stubbornly focused on taming Mma. Sep 20, 2022 at 13:24
• Wow, that was fast! Thanks Michael and Bob! This is a great site! Sep 20, 2022 at 15:01

$$a$$ needs to be between 0 and Pi/2 so that Cos[a] remain positive in order to simplify the sqrt which comes into play using the substitution made in the page.

Starting from

Then using Mathematica

Integrate[Sin[1/2*t]/Sqrt[Cos[1/2*a]^2 - Cos[1/2*t]^2], {t, a, Pi},
Assumptions -> 0 < a < Pi/2]

• Thanks Naseer but I wanted a solution for my original integral as I want Mathematica to do as much work as possible. Sep 20, 2022 at 15:05