Find an approximation of the following integral $$\int_{0}^{1}\frac{\sin\left(x\right)}{x}dx$$ With an error less than $10^{-5}$.
This is the first time I've been asked such a question and I don't know how to approximate a definite integral.
From the Taylor series of $\sin(x)$ I know that$$\sin(x)=\sum_{k\ge0}^{ }\frac{\left(-1\right)^{k}x^{2k+1}}{\left(2k+1\right)!}$$
And so for $x \ne 0$ we have that: $$\frac{\sin\left(x\right)}{x}=\sum_{k\ge0}^{ }\frac{\left(-1\right)^{k}x^{2k}}{\left(2k+1\right)!}$$
From here:
$$\int_{0}^{1}\frac{\sin\left(x\right)}{x}=\int_{0}^{1}\sum_{k\ge0}^{ }\frac{\left(-1\right)^{k}x^{2k}}{\left(2k+1\right)!}dx$$
Since $$\int_{0}^{1}\sum_{k\ge0}^{ }\left|\frac{\left(-1\right)^{k}x^{2k}}{\left(2k+1\right)!}\right|dx<\infty$$ So :
$$\int_{0}^{1}\frac{\sin\left(x\right)}{x}=\sum_{k\ge0}^{ }\frac{\left(-1\right)^{k}}{\left(2k+1\right)!}\int_{0}^{1}x^{2k}dx=\sum_{k\ge0}^{ }\frac{\left(-1\right)^{k}}{\left(2k+1\right)!\left(2k+1\right)}\le\sum_{k\ge0}^{ }\frac{\left(-1\right)^{k}}{\left(2k+1\right)!}=\sin\left(1\right)=0.841470984808$$
That was all I knew, but still I can't find the approximatin
Perhaps you can remebr that if you have an decreasing sequence $u_n\geq 0$ such that $\lim u_n=0$ the series $\sum (-1)^k u_k$ converges to a limit $l$ and $\vert l-\sum _{k=1}^n (-1)^k u_k \vert \leq u_{n+1}$
In your case, $\int _0^1 {\sin x \over x} dx=\int _0^1 1- {x^2\over 3!}+ {x^4\over 5!}+ .. dx= 1-{1\over 2\times 2!}+ {1\over 5\times 5!}-{1\over 7\times 7!} +R_7$ with $\vert R_7\vert \leq {1\over 9\times 9!} \leq 10^{-7}$ .
Note that ${1\over 7\times 7!}= 2. 10^{-5}$ so this term cant be neglected.