1

The following integral:Integrate[Exp[-2/3 Log[1 + x^3]], {x, 0, 1}] is evaluating to an imaginary number. Its closed-form expression should be (2^(-2/3) Gamma[1/3] Gamma[7/6])/Sqrt[\[Pi]]

How can I get Mathematica to produce this expression? (I need a closed form at another point, where I can't guess the actual value.)

pre-kidney
  • 693
  • 3
  • 9

2 Answers2

5

You're getting an imaginary number because you're using integers.

Integrate[Exp[-2./3. Log[1. + x^3.]], {x, 0, 1}]

(* 0.883319 *)

Also:

Integrate[Exp[-a Log[1 + x^3]], {x, 0, 1}]

(* Hypergeometric2F1[1/3, a, 4/3, -1] *)

You can then replace a by $2/3$:

Hypergeometric2F1[1/3, a, 4/3, -1] /. a -> 2/3

$\frac{\Gamma \left(\frac{1}{3}\right) \Gamma \left(\frac{4}{3}\right)}{2 \Gamma \left(\frac{2}{3}\right)}$

David G. Stork
  • 41,180
  • 3
  • 34
  • 96
3

We can see why this happens looking at the indefinte integral:

 indef = Integrate[Exp[-2/3 Log[1 + x^3]], x] 

analytic expression involving Hypergeometric2F1

This expression changes character and picks up an imaginary component right at 1:

 Plot[{ Re[indef ], Im[indef ]}, {x, 0, 1.3}]

enter image description here

Evaluating the definite integral using the left value at 1 we get the correct result:

 ( indef /. x -> 0.9999 ) - ( indef /. x -> 0 ) // Chop

0.883256

now we can get there like this as well:

 Integrate[Exp[-2/3 Log[1 + x^3]], {x, 0, 1 - 10^-8}] // N // Chop
george2079
  • 38,913
  • 1
  • 43
  • 110