1349. Knowing that $I=\int_{1}^{2} \frac{d x}{x}=\ln 2$, compute approximately the value of $\ln 2$ using the rectangle and trapezoidal formulas (for $n=10$). Estimate the absolute error of the obtained results.
Solution. The interval [1, 2] is divided into 10 equal parts, and we construct a table of values of the integrand function $y=\frac{1}{x}$

$$
\begin{array}{llll}
x_{0}=1,0 & y_{0}=1,0000 & x_{6}=1,6 & y_{6}=0,6250 \\
x_{1}=1,1 & y_{1}=0,9091 & x_{7}=1,7 & y_{7}=0,5882 \\
x_{2}=1,2 & y_{2}=0,8333 & x_{8}=1,8 & y_{8}=0,5556 \\
x_{3}=1,3 & y_{3}=0,7692 & x_{9}=1,9 & y_{9}=0,5263 \\
x_{4}=1,4 & y_{4}=0,7143 & x_{10}=2,0 & y_{10}=0,5000 \\
x_{5}=1,5 & y_{5}=0,6667 & h=\frac{b-a}{n}=\frac{2-1}{10}=\frac{1}{10} .
\end{array}
$$

By the rectangle formula (2)

$$
I \approx h \sum_{i=0}^{9} y_{i}=\frac{1}{10}\left(y_{0}+\ldots+y_{9}\right)=\frac{1}{10} \cdot 7,1877 \approx 0,7188
$$

By the rectangle formula (2

$$
I=h \sum_{i=1}^{10} y_{i}=\frac{1}{10}\left(y_{1}+\ldots+y_{10}\right)=\frac{1}{10} \cdot 6,6877 \approx 0,6688
$$

Estimate the absolute error using formula (3). Find the derivative $y^{\prime}=\left(\frac{1}{x}\right)^{\prime}=-\frac{1}{x^{2}}$. From this, it is clear that the maximum value of $\left|y^{\prime}\right|=\frac{1}{x^{2}}$ in the interval $[1,2]$ is $\left|y^{\prime}(1)\right|=1$. Therefore, $\Delta(10) \leqslant \frac{(2-1)^{2}}{10} \cdot 1=0,1$.

By the trapezoidal formula (4)

$$
\begin{aligned}
I \approx h\left(\frac{y_{0}+y_{10}}{2}+\sum_{i=1}^{9} y_{i}\right)= & \frac{1}{10}\left(\frac{1+0,5}{2}+6,1877\right)=\frac{1}{10} \cdot 6,9377 \approx \\
& \approx 0,6938
\end{aligned}
$$

Estimate the absolute error using formula (5). Find the second derivative $y^{\prime \prime}=\left(-\frac{1}{x^{2}}\right)^{\prime}=\frac{2}{x^{3}}$. The maximum value of $\left|y^{\prime \prime}\right|$ in the interval $[1,2]$ is $\left|y^{\prime \prime}(1)\right|=\frac{2}{1^{3}}=2$. Therefore,

$$
\Delta(10) \leqslant \frac{(2-1)^{3}}{12 \cdot 10^{2}} \cdot 2=\frac{1}{600}=0,0017
$$

In Bradis tables, the value $\ln 2 \approx 0,6931$ is given, which is close to the one obtained by the trapezoidal formula.

Calculate the integrals using the Newton-Leibniz formula and approximate formulas for rectangles and trapezoids, find the absolute and relative errors of the results obtained by approximate formulas:

$\begin{array}{ll}\text { 1350. } \int_{-1}^{5}\left(x^{2}-2\right) d x & (n=6) . \\ \text { 1351. } \int_{0}^{4} V^{\prime} \bar{x} d x & (n=8) .\end{array}$[^11]

Approximately calculate the following integrals using the trapezoidal formula, which cannot be found in a closed form using elementary functions: