TransWikia.com

Mathematica Can Find the Primitive Function But It Cannot Find the Closed Form for Corresponding Definite Integral

Mathematica Asked by Hosein Rahnama on March 11, 2021

Consider the following function

f = 1/2 (-3 + 4 u) Sqrt[-u (1 + u) (-1 - u + u^2)]

where it is assumed that

phi = (1+Sqrt[5])/2
1 < u < phi

Then I want to find

Integrate[f,{u,1,phi}]

But Mathematica cannot find the exact value of the above definite integral. It gets surprising when I found that it can find the primitive function

Integrate[f,u]

Can someone tell me that why this happens?

One Answer

As noted in the question, the definite integral Integrate[f,{u, 1, phi}] returns unevaluated, although the indefinite integral Integrate[f,u] does not. Nonetheless, the definite integral can be determined with a bit of work. To begin,

s = FullSimplify[Integrate[f, u], 1 < u < phi]
(* 1/2 ((Sqrt[u + 2 u^2 - u^4] (1 + 2 u (-1 + (-1 + u) u)))/(2 u) + 
   (1/(4 (1 + Sqrt[5] - 2 u)))Sqrt[(2 + u - Sqrt[5] u)/(1 + 2 u - u^3)] 
   (Sqrt[(1 + u) (1 + Sqrt[5] + (3 + Sqrt[5]) u)] ((-2 + (-1 + Sqrt[5]) u) 
   EllipticE[ArcSin[Sqrt[1 + Sqrt[5] + 2/u]/(Sqrt[2] 5^(1/4))], 
       1/2 (5 + Sqrt[5])] + (1 + Sqrt[5] - 2 u) 
   EllipticF[ArcSin[Sqrt[1 + Sqrt[5] + 2/u]/(Sqrt[2] 5^(1/4))], 
       1/2 (5 + Sqrt[5])]) - 4 Sqrt[-(1 + Sqrt[5] - 2 u) (-1 - 2 u + u^3)]
   EllipticPi[1/2 (5 - Sqrt[5]), ArcSin[Sqrt[1 + Sqrt[5] + 2/u]/(Sqrt[2] 5^(1/4))], 
   1/2 (5 + Sqrt[5])])) *)

Plotting s shows that it is well-behaved over the region of interest.

Plot[Evaluate[ReIm[s]], {u, 1, phi}]

enter image description here

Hence, the definite integral is simply s at phi minus s at 1. Unfortunately, s /. u -> phi returns Power::infy: Infinite expression 1/0 encountered. >>. (This is because several of the terms in s evaluate to 0/0 at u -> phi.) Moreover, extending the Plot beyond phi shows that s is discontinuous there. Although it is impossible to know precisely why the definite integral of f returns unevaluated, it seems likely that one or both of these issues prevents the definite integral from returning evaluated.

There are a number of ways, however, to evaluate s at phi. For instance,

s /. ArcSin[z_] :> Simplify[ArcSin[z] /. u -> phi];

which evaluates ArcSin to Pi/2 and simplifies the elliptic integrals, followed by

Limit[%, u -> phi, Direction -> 1] // FullSimplify
(* 1/8 (Sqrt[2 (1 + Sqrt[5])] EllipticK[1/2 (5 + Sqrt[5])] - 
   Sqrt[2 (-1 + Sqrt[5])] (EllipticE[1/2 (5 + Sqrt[5])] + 
   2 EllipticPi[1/2 (5 - Sqrt[5]), 1/2 (5 + Sqrt[5])])) *)

Note that Direction -> 1 is necessary to handle the discontinuity mentioned above. (The seemingly simpler Limit[s, u -> phi, Direction -> 1] // FullSimplify returns unevaluated, and Series[s, {u, phi, 0}] runs for hours without returning.)

Evaluating s at the lower limit of integration works without these difficulties.

Simplify[s /. u -> 1]
(* (1/(8 Sqrt[2]))(-4 + (1/(-1 + Sqrt[5])) 2 Sqrt[1 + Sqrt[5]] ((-3 + Sqrt[5]) 
   EllipticE[ArcSin[Sqrt[3 + Sqrt[5]]/(Sqrt[2] 5^(1/4))], 1/2 (5 + Sqrt[5])] + 
   (-1 + Sqrt[5]) EllipticF[ArcSin[Sqrt[3 + Sqrt[5]]/(Sqrt[2] 5^(1/4))], 
   1/2 (5 + Sqrt[5])]) - 4 Sqrt[-1 + Sqrt[5]]
   EllipticPi[1/2 (5 - Sqrt[5]), ArcSin[Sqrt[3 + Sqrt[5]]/(Sqrt[2] 5^(1/4))], 
   1/2 (5 + Sqrt[5])]) *)

Evaluating the two expressions numerically (with N) returns values equal to the endpoint values in the Plot above, confirming the accuracy of the analysis. Taking the difference of these two expressions yields an analytical expression for the definite integral. Of course,

N[%% - %] // N // Chop
(* 0.773512 *)

yields the same value as NIntegrate[f, {u, 1, phi}] // Chop.

Correct answer by bbgodfrey on March 11, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP