# Derivative of a definite integral

Bug introduced in 11.3 or earlier. Fixed in 13.0 or earlier.

The derivation process of a definite integral is as follows:

(* D[Integrate[(1 + t^4)^(-1/2), {t, x^2, x^3}],x] = (3x^2)/Sqrt[1 + x^12]-(2x)/Sqrt[1 + x^8] *)

However, the results obtained by Mathematica are as follows:

f[x_] := Integrate[(1 + t^4)^(-1/2), {t, x^2, x^3}];

Assuming[Element[x,Reals], D[f[x],x]]


（* (-1)^(1/4) (EllipticF[I ArcSinh[(-1)^(1/4) x^2], -1] - EllipticF[I ArcSinh[(-1)^(1/4) x^3], -1]) *）

• (1) You didn't take the derivative in your code. (2) A trick to get the answer quickly is to stop Integrate from evaluating: D[Unevaluated@Integrate[(1 + t^4)^(-1/2), {t, x^2, x^3}], x] Commented Jan 20, 2022 at 2:15
• Thanks! @Michael E2 Commented Jan 20, 2022 at 2:22
• Much slower than @MichaelE2 approach but gives same result: Assuming[Element[x, Reals], Simplify /@ (D[Integrate[(1 + t^4)^(-1/2), {t, x^2, x^3}], x] // Expand)] Commented Jan 20, 2022 at 2:40
• Thanks! @ Bob Hanlon Commented Jan 20, 2022 at 2:45
• Or do frule = f -> Function[t, (1 + t^4)^(-1/2)]; D[Integrate[f[t], {t, x^2, x^3}], x] /. frule  Commented Jan 20, 2022 at 13:36

Your problem is that Integrate evaluated before the derivative could be taken, making the output much more complicated. I think the cleanest approach is to use Inactive, e.g.:

D[Inactive[Integrate][(1+t^4)^(-1/2), {t, x^2, x^3}], x]


-((2 x)/Sqrt[1 + x^8]) + (3 x^2)/Sqrt[1 + x^12]

OK in version 13.0.0 on Windows 10

D[Integrate[(1 + t^4)^(-1/2), {t, x^2, x^3}], x]


ConditionalExpression[(-1)^( 1/4) ((2 (-1)^(3/4) x)/(Sqrt[1 - I x^4] Sqrt[1 + I x^4]) - ( 3 (-1)^(3/4) x^2)/(Sqrt[1 - I x^6] Sqrt[1 + I x^6])), And[ Or[Im[x] >= 0, Re[x^8 (x - Im[x])^4 (-1 + Im[x])^(-4)] >= -1], Or[Re[(1 - x)^(-1) x] < -1, Re[(1 - x)^(-1) x] >= 0, NotElement[(1 - x)^(-1) x, Reals]], Re[x^8] >= -1, Re[x^12] >= -1, Or[Re[x] > 0, NotElement[x, Reals]]]]

Then

FullSimplify[%, Assumptions -> x > 0]


ConditionalExpression[( x (3 x Sqrt[1 + x^8] - 2 Sqrt[1 + x^12]))/Sqrt[(1 + x^8) (1 + x^12)], Or[x Re[(1 - x)^(-1)] < -1, Re[(1 - x)^(-1)] >= 0, NotElement[(1 - x)^(-1), Reals]]]