1348. Calculate the integral $\int_{0}^{6}\left(x^{2}+3\right) d \bar{x}$ using the Newton-Leibniz formula and approximate formulas of rectangles and trapezoids, dividing the interval of integration into 6 equal parts $(n=6)$. Find the absolute and relative errors of the results obtained by the approximate formulas.
Solution. By the Newton-Leibniz formula

$$
I=\int_{0}^{6}\left(x^{2}+3\right) d x=\left.\left(\frac{x^{3}}{3}+3 x\right)\right|_{0} ^{6}=90
$$

The interval $[0,6]$ is divided into 6 equal parts, and we construct a table of values of the integrand function $y=x^{2}+3$ :

$$
\begin{array}{lllr}
x_{0}=0 & y_{0}=3 & x_{4}=4 & y_{4}=19 \\
x_{1}=1 & y_{1}=4 & x_{5}=5 & y_{5}=28 \\
x_{2}=2 & y_{2}=7 & x_{6}=6 & y_{6}=39 \\
x_{3}=3 & y_{3}=12 & h=\frac{b-a}{n}=\frac{6-0}{6}=
\end{array}
$$

By the rectangle formula (2)

$$
I \approx \sum_{i=0}^{5} y_{i}=y_{0}+y_{1}+y_{2}+y_{3}+y_{4}+y_{5}=73
$$

Absolute error $\Delta=90-73=17$. Relative error $\delta=\frac{17}{90} \approx 0.189=18.9 \%$.

By the rectangle formula ( $2^{\prime}$ )

$$
I \approx \sum_{i=1}^{6} y_{i}=y_{1}+y_{2}+y_{3}+y_{4}+y_{5}+y_{6}=109
$$

Absolute error $\Delta=109-90=19$. Relative error $\delta=\frac{19}{90} \approx 0.211=21.1 \%$.

By the trapezoidal formula

$$
\begin{gathered}
I \approx \frac{y_{0}+y_{b}}{2}+\sum_{i=1}^{5} y_{i}=\frac{3+39}{2}+70=91 \\
\Delta=91-90=1 ; \quad \delta=\frac{1}{90}=0.011=1.1 \%
\end{gathered}
$$