Non-finite function value with integrate() R although solution exists
<p>I would like to calculate the following integral in R:</p>

<pre><code>print(integrate(function(x){((1.-x)^2)/(abs(1.-x))^(1/3)},lower = 0, upper = 1.6, abs.tol = 1E-7)$value)
</code></pre>

<p>And I get this error: </p>

<blockquote>
  <p>Error in integrate(function(x) { : non-finite function value</p>
</blockquote>

<p>However, when I integrate up to 1.600001 or 1.599999, it works and yields 0.4710365 and 0.4710357.</p>

<p>But there is nothing special with this function at the point 1.6... So it should be some strange numerical problem in R.</p>

<p>Any ideas?</p>