enter image description here

The result of Integrate + Limit agrees with that of NIntegrate. But Integrate + N seems give the wrong result, since the integrand is positive.

This integral is a quite standard elliptic integral. Is it a severe bug of Integrate? Any workaround?

see also

Buggy behavior of EllipticE[0,k] with arbitrary precision input

Buggy behavior of EllipticK with arbitrary precision input and $MinPrecision

  • 2
    $\begingroup$ Apparently a bug in Limit and not Integrate per se. In[3]:= InputForm[ii = Integrate[1/Sqrt[1-x^2+x^4],{x,0,t},Assumptions->t>0]] Out[3]//InputForm= -((-1)^(1/6)*Sqrt[1 - (-1)^(1/3)*t^2]* Sqrt[(1 + (-1)^(2/3)*t^2)/(1 - t^2 + t^4)]* EllipticF[I*ArcSinh[(-1)^(1/3)*t], (-1)^(2/3)]) In[4]:= InputForm[lii = Limit[ii, t->Infinity]] Out[4]//InputForm= (-1)^(1/6)*(Im[EllipticK[(3 - I*Sqrt[3])/2]] - I*Re[EllipticK[(3 - I*Sqrt[3])/2]]) In[5]:= N[lii] Out[5]= 0. - 1.68575 I $\endgroup$ Aug 6, 2023 at 17:11
  • 2
    $\begingroup$ ... which in turn is due to a Series glitch. In[9]:= nss = Normal[Series[ii, {t,Infinity,0}, Assumptions->t>1000]] 2/3 2/3 Out[9]= -((-1) EllipticK[1 - (-1) ]) In[10]:= N[nss] -16 Out[10]= -2.22045 10 - 1.68575 I $\endgroup$ Aug 6, 2023 at 17:14

1 Answer 1


As shown by @Daniel Lichtblau, this is due to bug of Limit, see also tutorial/SomeNotesOnInternalImplementation#7441:

Definite integrals that involve no singularities are mostly done by taking limits of the indefinite integrals.

Many other definite integrals are done using Marichev[Dash]Adamchik Mellin transform methods. The results are often initially expressed in terms of Meijer G functions, which are converted into hypergeometric functions using Slater's theorem and then simplified.

Hence a simple workaround is to pull Infinity back to finite position, e.g. $x=\tan t$,


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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