1
$\begingroup$

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.)

$\endgroup$
5
$\begingroup$

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)}$

$\endgroup$
2
  • 1
    $\begingroup$ Or use NIntegrate: NIntegrate[Exp[-2/3 Log[1 + x^3]], {x, 0, 1}] gives 0.883319 $\endgroup$
    – Bob Hanlon
    Mar 4 '15 at 17:54
  • $\begingroup$ I need the exact form, not approximate. $\endgroup$
    – pre-kidney
    Mar 10 '15 at 23:27
3
$\begingroup$

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
$\endgroup$

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.