# A curious integration problem : the antiderivative is known but not the definite integral?

Working this problem on Mathematics Stack Exchange, I face the problem of computing $$I(t)=\int_{0}^{t}\frac{a \sin ^2(k)+b}{\sqrt{\left(a \sin ^2(k)+b\right)^2+\sin ^2(k)}}\,dk$$ where $$(a,b)$$ are positive constants $$( 0 and $$0.

Mathematica produces almost instantly the antiderivative in terms of elliptic integrals of the first and third kinds. However, no result for the definite integral (all above assumptions being provided).

$$I(0)=0$$ is immediately returned but asking for $$I\left(\frac{\pi }{2}\right)$$ Mathematica runs for even (I let my computer running $$14$$ hours for no result.

I suppose that the problem comes from the fact that the argument of the elliptic integrals is proportional to $$\tan(k)$$.

So, my question : is there any way to obtain the limit ?

    Integrate[(a Sin[t]^2 +b)/((a Sin[t]^2+b)^2+Sin[t]^2)^(1/2),{t,0,Pi/2}]

• Please provide Mathematica code. This will increase chance to get helpful answers! Commented Apr 26, 2023 at 8:26

$Version (*"12.2.0 for Microsoft Windows (64-bit) (December 12, 2020)"*)  The definite integral evaluates to int = Values@DSolve[{f'[k] == (a Sin[k]^2 + b)/Sqrt[(a Sin[k]^2 + b)^2 + Sin[k]^2 ], f[0] == 0}, f, k][[1, 1]]  Unfortunately Asymptotic[int[k],k->Pi/2] doesn't evaluate. With the help of substitution Tan[k]->tank subst = Join[{Tan[k] -> tank},Table[Cos[i k] -> (Cos[i k] /. k -> ArcTan[tank] // TrigExpand), {i,1,4}]] // Simplify;  we get asymptotic of k->Pi/2  Asymptotic[int[k] /. subst, tank -> Infinity] //Simplify[#, Assumptions -> {tank > 0, 0 < b < a/4}] &  • Thank you very much. I arrived to the point where I obtained (with your code)$-\frac{2 \sqrt{b^2}}{b \text{uk}}$but I do not understand the next step. What do I do with this result to go to the final answer. I may look stupid but I am blind and my screen teller does not work properly (I have to get a new one). Would the result be independent of$a$and$b\$ ? Thanks agaib (please help me more !!). Cheers :-) Commented Apr 26, 2023 at 10:36
• Sorry, in the first version of my answer I evaluateted int[Pi]. See my modified answer! Commented Apr 26, 2023 at 10:43
• This is superb ! Thanks so much. Commented Apr 26, 2023 at 11:11
• @ClaudeLeibovici Hope it helps! Commented Apr 26, 2023 at 11:19
• Much more than that. I shall update my answer on MSE Commented Apr 26, 2023 at 12:01

The limit is given by a rather complicated function of a and b containing complete Elliptic functions as:

(b*((b*(-1 + Sqrt[1 + 4*a*b]) + a*(1 + Sqrt[1 + 4*a*b]))*
EllipticK[(2*Sqrt[1 + 4*a*b])/(1 + 2*b*(a + b) +
Sqrt[1 + 4*a*b])] + b*(1 + 2*a*(a + b) - Sqrt[1 + 4*a*b])*
EllipticPi[(1 + 2*a*(a + b)+Sqrt[1 + 4*a*b])/(2*(1 + (a + b)^2)),
(2*Sqrt[1 + 4*a*b])/(1 + 2*b*(a + b) + Sqrt[1 + 4*a*b])]))/
(a*(1 + 2*b*(a + b) + Sqrt[1 + 4*a*b])*
Sqrt[b*(a + b) + (1/2)*(1 + Sqrt[1 + 4*a*b])])


I obtained it by transforming the imaginary argument of the incomplete elliptic functions returned by Mathematica into real form as well as applying a transformation for imaginary moduli (negative values in Mathematica speak)

• Superb ! Thank you so much. Commented Apr 26, 2023 at 12:07
• When I think about my ridiculous asymptotics !! If you have time to waste, ask Mathematica for it : a pure monster !! Commented Apr 26, 2023 at 12:49
• @Andreas It would be very helpful if you show the solution steps which led to your result! Commented Apr 26, 2023 at 16:56
• They go like EllipticF[Izz, kk^2] -> IEllipticF[ArcTan[Sinh[zz]], 1 - kk^2] and EllipticF[zz, -kk] -> EllipticF[ArcTan[Sqrt[1 + kk]*Tan[zz]], kk/(1 + kk)]/Sqrt[1 + kk] Commented Apr 26, 2023 at 17:03
• @Andreas In addition case  {b -> 1, a -> 0} should evaluate to EllipticK[-1] but your formula gives Indeterminate! Commented Apr 26, 2023 at 17:08