Numerical Method: Approximating an Integral Let:
I $ = \int_0^{1000} \dfrac{e^{-10x} \sin(x)}{x} dx $
Evaluate I to within $\pm 10^{-5}$ 

I've broken down the problem to simply evaluating the integral from zero to one (by way of the accuracy required and using a comparison), after that, however, I've no clue how to approach this -  I know I could manually take derivatives and somehow discern the taylor series of the integrand, but this is a bad function to derive multiple times. Using a trapezoidal approximation would take way too many sub-intervals - is there another approach to this?
 A: First, notice that the expression to be integrated rapidly decreases as x increases. So, you only have to integrate from 0 to some $a$.
You can determine an upper bound for remaining part of the integral by excluding oscillating factor $\sin(x)$ and evaluating $\int_a^{1000}\frac{\exp(-10x)}{x}dx$ (it will require Ei function evaluation - from tables or somehow). Then take good enough $a$ so that this upper bound is less than specified tolerance of $10^{-5}$ and use any usual method such as trapezoid or rectangle approximation to evaluate $\int_0^a\frac{\exp(-10x)\sin(x)}{x}dx$.
From my checks it appeared sufficient to have $a=1$.
A: Let $$I(y)=\int_0^y\frac{e^{-10x}\sin x}{x}\,\mathrm dx.$$
Then for $y>0$ we have
$$ \left|I(y)-I(\infty)\right|<\frac1y\int_y^\infty e^{-10x}\,\mathrm dx=\frac{e^{-10y}}{10y}.$$
Therefore $|I(1000)-I(1)|\le |I(1000)-I(\infty)|+|I(1)-I(\infty)|\approx 4.54\cdot 10^{-6}$
allows us to merely calculate $I(1)$ if we keep the numerical error below $5\cdot 10^{-6}$.
Note that $0<\frac{\sin x}{x}\le 1$ for $0\le x\le 1$ and  $g(x):=\frac{\sin x}{x}$ is strictly decreasing.
Therefore, if $0=x_0<x_1<\ldots <x_n=1$, then 
$$ \sum_{k=1}^n g(x_{k})\int_{x_{k-1}}^{x_k}e^{-10x}\,\mathrm dx<I(1)<\sum_{k=1}^n g(x_{k-1})\int_{x_{k-1}}^{x_k}e^{-10x}\,\mathrm dx,$$
i.e. 
$$ \sum_{k=1}^n g(x_k)\frac{e^{-10x_{k-1}}-e^{-10x_{k}}}{10}<I(1)<\sum_{k=1}^n g(x_{k-1})\frac{e^{-10x_{k-1}}-e^{-10x_k}}{10}.$$
We need to keep the difference 
$$ \sum_{k=1}^n (g(x_{k-1})-g(x_k))\frac{e^{-10x_{k-1}}-e^{-10x_{k}}}{10}$$
small, which can be achieved by suitable chice of $x_k$. Note that the sequence can be chosen to grow quite rapidly because of the small eponential factor, except perhaps near $0$. But near $0$, the first factor $g(x_{k-1})-g(x_k)$ is approximately linear in $x_k-x_{k-1}$, for $x_{k-1}=0$ even quadratic.
A: I would try to reduce it more, since when $x \gg 0$, we still have $e^{-10x} \ll 1$, and for small $x$, roughly $\sin x \approx x$ so the integrand becomes $e^{-10x}$, which is trivial to integrate.
