702. Using Simpson's formula, calculate the approximate value of the integral $\int_{0} \cos x d x$ with an accuracy of 0.00001.
Solution. First, we determine the number $n$ of parts into which the integration interval $\left[0, \frac{\pi}{2}\right]$ should be divided to achieve the required accuracy of the computation.

Assuming the error $\delta(n)$ of Simpson's formula is less than $10^{-5}$, we have

$$
\frac{(b-a)^{5}}{180 n^{4}} y_{H L}^{(4)}5 \pi \sqrt[4]{\frac{\pi}{36}}=8.5
$$

Next, assuming $n=10$ (the nearest even number greater than 8.5), we determine the division points $x_{i}$ and the corresponding values $y_{i}$ of the integrand function $y:=\cos x$ (with one extra decimal place, $\pi \approx 3.141592$):

$$
\begin{array}{ll}
x_{0}=0.000000 & y_{0}=1.000000 \\
x_{1}=0.157080 & y_{1}=0.987688 \\
x_{2}=0.314159 & y_{2}=0.951057 \\
x_{3}=0.471239 & y_{3}=0.891007 \\
x_{4}=0.628318 & y_{4}=0.809017 \\
x_{5}=0.785398 & y_{5}=0.707107 \\
x_{8}=0.942478 & y_{6}=0.587785 \\
x_{7}=1.099557 & y_{7}=0.453991 \\
x_{8}=1.256637 & y_{8}=0.309017 \\
x_{9}=1.413716 & y_{9}=0.156435 \\
x_{10}=1.570796 & y_{10}=0.000000
\end{array}
$$

Substituting into Simpson's formula, we obtain the desired value of the integral with an accuracy of $10^{-6}$:

$$
\int_{0}^{\frac{\pi}{2}} \cos x d x \approx 0.0523599(1+4 \cdot 3.196228+2 \cdot 2.656876) \approx 1.00000
$$

This solution demonstrates that for computing an integral with a given accuracy, when the analytical expression of the integrand function is known, one can determine in advance the necessary number of divisions of the integration interval, which would ensure the required accuracy, based on the specified inequalities for estimating the error of approximate formulas.

However, in many cases, the analytical expression of the integrand function is such that it is difficult to find the maximum value over the entire integration interval for the first, second, or fourth-order derivatives, which are contained in the inequalities determining the errors of the rectangle, trapezoidal, or Simpson's formulas. Therefore, in computational practice, other criteria are often used for estimating the error of approximate integration, which can be found in specialized manuals on approximate computations.