Problem with Integrate

One gets the intended result with a simple shift of the integration variable of the definite integral

In[87]:= NIntegrate[1/Sqrt[2 (1 + x)^3 + 1], {x, 0, 1}]
Out[87]= 0.376065

In[88]:= $Version
Out[88]= "10.0 for Microsoft Windows (64-bit) (June 29, 2014)"

Let y = x + 1, dy = dx and

In[90]:= NIntegrate[1/Sqrt[2 y^3 + 1], {y, 1, 2}]
Out[90]= 0.376065

In[91]:= Integrate[1/Sqrt[2 y^3 + 1], {y, 1, 2}]
Out[91]= Sqrt[2]*Hypergeometric2F1[1/6, 1/2, 7/6, -1/2] - Hypergeometric2F1[1/6, 1/2, 7/6, -1/16]

In[92]:= % // N
Out[92]= 0.376065

With other words, from 1 to 2 one does not encounter a singularity like the one Daniel mentioned, because

In[117]:= (Integrate[1/Sqrt[2 y^3 + 1], y] /. y -> x + 1) ===  Integrate[1/Sqrt[2 (1 + x)^3 + 1], x]
Out[117]= True

of course.

Dear Udo, thanks for your comments.

But if you try (I am using Mathematica 9)

In[1]:= sol = Integrate[1/Sqrt[2 y^3 + 1], y]

Out[1]= (1/(3^(1/4) Sqrt[1 + 2 y^3]))(-1)^(1/6) 2^(
2/3) Sqrt[(-1)^(5/6) (-1 + (-2)^(1/3) y)] Sqrt[
1 + (-2)^(1/3) y + (-2)^(2/3) y^2]
EllipticF[ArcSin[Sqrt[-(-1)^(5/6) - I (-2)^(1/3) y]/3^(1/4)], (-1)^(
1/3)]

In[2]:= (sol /. y → 2) - (sol /. y → 1) // N

Out[2]= -2.96267 - 1.92762 I

You still have a wrong answer. So, in my opnion, there is a bug in Integrate function.

Yes, for the indefinite integral you’re right; it is still in Version 10.0.0 the case. The difference of valued indefinite integrals does not convert into the Hypergeometric2F1[] form and the bug reappears

In[11]:= N[(ReplaceAll[#, y -> 2] - ReplaceAll[#, y -> 1]) &[Integrate[1/Sqrt[2 y^3 + 1], y]]]
Out[11]= -2.96267 - 1.92762 I

In[15]:= N[FullSimplify[(ReplaceAll[#, y -> 2] - ReplaceAll[#, y -> 1])] &[Integrate[1/Sqrt[2 y^3 + 1], y]]]
Out[15]= -2.96267 - 1.92762 I

In[17]:= (Integrate[1/Sqrt[2 y^3 + 1], y] /. y -> x + 1) === Integrate[1/Sqrt[2 (1 + x)^3 + 1], x]
Out[17]= True

that means this is a bug not about a path singularity, because the indefinite integral does not go along a path. It’s something about turning back to the right leaf. For example, look at this, the derivative does not turn back to the original integrand, but presents an equation of six-th degree instead:

Did somebody notice already that the simple substitution x+1->y, dx->dy, {x,0,1} -> {y,1,2} leads to the correct result?

In fact:

sol2 = Integrate[1/Sqrt[2 y^3 + 1], {y, 1, 2}]

(* Out[27]= Sqrt[2] Hypergeometric2F1[1/6, 1/2, 7/6, -(1/2)] -  Hypergeometric2F1[1/6, 1/2, 7/6, -(1/16)] *)

sol2 // N

(* Out[28]= 0.376065 *)

solN = NIntegrate[1/Sqrt[2 (1 + x)^3 + 1], {x, 0, 1}]

(* Out[39]= 0.376065 *)


$Version

(* Out[40]= "8.0 for Microsoft Windows (64-bit) (October 7, 2011)" *)

Best regards,
Wolfgang

Let me add two remarks

  1. the exact value of the jump position seems to be xj = 2^(2/3) - 1

    N[2^(2/3) - 1, 20]
    (* 0.58740105196819947475 *)

  2. an antiderivative without a jump can be calculated as follows

    ad2F1[x_] = Integrate[1/Sqrt[1 + 2 x^3], {x, 0, t}, Assumptions → t > 0] /. t → 1 + x

    (* Out[116]= (1 + x) Hypergeometric2F1[1/3, 1/2, 4/3, -2 (1 + x)^3] *)

Hence we find a hypergeometric function instead of the “bizarre” elliptic integral.

Proof

D[ad2F1[x], x] // Simplify

(* Out[109]= 1/Sqrt[1 + 2 (1 + x)^3] *)