Example 4.34. Compute the integral $\int_{0}^{1} \frac{\sin t}{t} d t$ with accuracy $\varepsilon=10^{-4}$.
Solution. Note from the previous that

$$
\sin t=\sum_{n=0}^{\infty}(-1)^{n} \frac{t^{2 n+1}}{(2 n+1)!}, t \in \mathbb{R}
$$

From this it follows that

$$
\frac{\sin t}{t}=\sum_{n=0}^{\infty}(-1)^{n} \frac{t^{2 n}}{(2 n+1)!}
$$

Apply the theorem of term-by-term integration (Theorem 4.25) to the last series:

$$
\begin{gathered}
\int_{0}^{1} \frac{\sin t}{t} d t=\int_{0}^{1}\left(\sum_{n=0}^{\infty}(-1)^{n} \frac{t^{2 n}}{(2 n+1)!}\right) d t= \\
=\left.\sum_{n=0}^{\infty}(-1)^{n} \frac{t^{2 n+1}}{(2 n+1)!(2 n+1)}\right|_{0} ^{1}=\sum_{n=0}^{\infty}(-1)^{n} \frac{1}{(2 n+1)!(2 n+1)}
\end{gathered}
$$

According to Theorem 4.16 (Leibniz's criterion), the absolute error of the integral is expressed by the inequality

$$
\left|\int_{0}^{1} \frac{\sin t}{t} d t-\sum_{k=0}^{n}(-1)^{k} \frac{1}{(2 k+1)!(2 k+1)}\right|<\frac{1}{(2 n+3)!(2 n+3)}
$$

Direct calculation for $n=2$ gives

$$
\frac{1}{(2 n+3)!(2 n+3)}=\frac{1}{7!\cdot 7}<3 \cdot 10^{-5}<10^{-4}
$$

Thus, with the given accuracy, the required integral is

$$
\int_{0}^{1} \frac{\sin t}{t} d t=1-\frac{1}{3!\cdot 3} \approx 0.9444
$$