342. Find the value of the integral sum for the function $y=$ $=x^{2}+1$ when the interval $[1,3]$ is divided into four parts.
Solution. Here $x_{0}=1, x_{1}=1.5, x_{2}=2, x_{3}=2.5, \Delta x=0.5$. We construct the curvilinear trapezoid and the corresponding step figure (Fig. 193).

We determine the values of the function at the partition points: $f\left(x_{0}\right)=f(1)=2$; $f\left(x_{1}\right)=f(1.5)=3.25 ; f\left(x_{2}\right)=f(2)=5 ; f\left(x_{3}\right)=f(2.5)=7.25$.

We find the sum of the products of the function values and the magnitude $\Delta x=0.5$:

$$
\begin{gathered}
S=f\left(x_{0}\right) \Delta x+f\left(x_{1}\right) \Delta x+f\left(x_{2}\right) \Delta x+f\left(x_{3}\right) \Delta x=2 \cdot 0.5+3.25 \cdot 0.5+5 \cdot 0.5+ \\
+7.25 \cdot 0.5=8.75
\end{gathered}
$$