Integration error with NIntegrate in mma8

What happens here (Mathematica version 8.x):

NIntegrate[Log[1/2 + Sqrt[1/4 - 1/(4 x^2)]]/x, {x, 1, Infinity}] --> -0.171007 Integrate[Log[1/2 + Sqrt[1/4 - 1/(4 x^2)]]/x, {x, 1, Infinity}] // N --> 0.171007 

The value of NIntegrate[] correct. I ran into problems with the PrincipalValue choices before a) they were fixed in mma8 and b) this integral does not have, or at least should not have poles in the field of integration.

EDIT: Thanks to people offering solutions to this problem, a common solution would be, for example, to use NIntegrate exclusively. However, I am interested to know why this is happening, and therefore this error is predictable.

+4
source share
1 answer

This is a mistake in Integrate , I'm afraid. As a workaround, make the change of variables x->u^(-1/2) :

 In[12]:= Log[1/2 + Sqrt[1/4 - 1/(4*x^2)]]/x Dt[x]/Dt[u] /. x -> 1/Sqrt[u] Out[12]= Log[1/2 + Sqrt[1/4 - u/4]]/(2 u) 

Then

 In[14]:= Integrate[%, {u, 1, 0}] Out[14]= 1/24 (-\[Pi]^2 + Log[8] Log[16]) In[15]:= N[%] Out[15]= -0.171007 

This is consistent with NIntegrate .

+5
source

All Articles