title: Mathematica integral with many singularities
body: <p>What's the best way of getting Mathematica 7 or 8 to do the integral</p>
  
  <pre><code>NIntegrate[Exp[-x]/Sin[Pi x], {x, 0, 50}]
  </code></pre>
  
  <p>There are poles at every integer - and we want the Cauchy principle value.
  The idea is to get a good approximation for the integral from 0 to infinity.</p>
  
  <p>With <code>Integrate</code> there is the option <code>PrincipleValue -&gt; True</code>.</p>
  
  <p>With <code>NIntegrate</code> I can give it the option <code>Exclusions -&gt; (Sin[Pi x] == 0)</code>, or manually give it the poles by</p>
  
  <pre><code>NIntegrate[Exp[-x]/Sin[Pi x], Evaluate[{x, 0, Sequence@@Range[50], 50}]]
  </code></pre>
  
  <p>The original command and the above two <code>NIntegrate</code> tricks give the result <code>60980 +/- 10</code>. But they all spit out errors. What is the best way of getting a quick reliable result for this integral without Mathematica wanting to give errors?</p>