title: Integrate function in R returns error
body: <p>I have a function defined as </p>
  
  <pre><code>tail &lt;- function(x) {585.1961*x^-2.592484}
  </code></pre>
  
  <p>When I tried to get the integral of it from 5000 to Inf, it returns an error:</p>
  
  <pre><code>&gt; integrate(tail, 5000, Inf)
  Error in integrate(tail, 5000, Inf) : the integral is probably divergent
  </code></pre>
  
  <p>However, integrating from 1000 to Inf and from 1000 to 5000 both worked fine:</p>
  
  <pre><code>&gt; integrate(tail, 1000, Inf)
  0.006134318 with absolute error &lt; 2.5e-05
  &gt; integrate(tail, 1000, 5000)
  0.005661634 with absolute error &lt; 4.9e-09
  </code></pre>
  
  <p>Isn't <code>integrate(tail, 5000, Inf)</code> simply equal to <code>integrate(tail, 1000, Inf) - integrate(tail, 1000, 5000)</code>? Why that resulted in a divergent integral?</p>