Reading this question on Math.SE, I tried the following Mathematica instructions

In[1]:= i1 = Integrate[1/Sqrt[1 + t^4], {t, 0, 1}];
        i2 = Integrate[Sec[u]^2/Sqrt[1 + Tan[u]^4], {u, 0, \[Pi]/4}];
        FullSimplify[i1 == i2]
        FullSimplify[i1 == i2] // N
Out[3]= Sqrt[\[Pi]] EllipticK[1/2] == 4 Gamma[5/4]^2
Out[4]= True

so, given that the two integrals are the same, apart from a change of variable, I ask: why Mathematica does not know?


Use FunctionExpand


(* "12.1.1 for Mac OS X x86 (64-bit) (June 19, 2020)" *)


i1 = Integrate[1/Sqrt[1 + t^4], {t, 0, 1}]

(* (2 Gamma[5/4]^2)/Sqrt[π] *)

i2 = Integrate[Sec[u]^2/Sqrt[1 + Tan[u]^4], {u, 0, π/4}]

(* 1/2 EllipticK[1/2] *)

i1 == i2 // FunctionExpand // FullSimplify

(* True *)
| improve this answer | |
  • 1
    $\begingroup$ I didn't know about FunctionExpand. Help page says: FunctionExpand is automatically called by FullSimplify, so why it is needed? $\endgroup$ – enzotib Aug 3 at 17:23
  • 2
    $\begingroup$ Presumably, FullSimplify's algorithms did not recognize this as a situation for which FunctionExpand was appropriate or, if it took that path, it concluded that it was getting worse rather than better before getting to the desired result. In any event, explicitly specifying FunctionExpand helped it find the right path. In general, you cannot assume that FullSimplify tried all possible approaches and when you are not getting the result that you expect, you should try and help it. The See Also section of documentation (for FullSimplify in this case) can provide useful hints. $\endgroup$ – Bob Hanlon Aug 3 at 17:38

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.