# On inconsistency in Integrate command

Posted 9 years ago
4503 Views
|
4 Replies
|
4 Total Likes
|
 It seems there exists an inconsistency in the integration algorithms. For example, if you do Integrate[x/(x^2+1),{x,-Infinity, Infinity}], you get 0, but if you compute Integrate[1/Log[x],{x,0,2}], you get divergence.
4 Replies
Sort By:
Posted 9 years ago
 Here comes annother gereral rule:One always should have a rough idea about the function which is integrated.In the case of 1/Log[x] there is a pole at x=1. So the integral has to be understood as "Cauchy principal value": In[10]:= Integrate[1/Log[x], {x, 0, 2}, PrincipalValue -> True] Out[10]= LogIntegral[2] In[11]:= % // N Out[11]= 1.04516 then it works perfect!Cheers Henrik In[13]:= $Version Out[13]= "10.0 for Linux x86 (32-bit) (September 10, 2014)"  Posted 9 years ago  In[4]:= Integrate[x/(x^2 + 1), {x, -b, b}] Out[4]= 0 which is what I expect due to the symmetry of the integrand under sign change.I guess that integral goes to infinity - infinity as b goes to infinity. In[5]:=$Version Out[5]= "10.0 for Microsoft Windows (64-bit) (December 4, 2014)" 
Posted 9 years ago
 General rule: indicate version of software.
Posted 9 years ago
 For example, if you do Integrate[x/(x^2+1),{x,-Infinity, Infinity}], you get 0, but if you compute Integrate[1/Log[x],{x,0,2}], you get divergence. That is not what I get: