Example 1. Using the trapezoidal rule, calculate $\int_{0}^{5} \frac{d x}{\sqrt{x+4}}$ for $n=5$.
Solution. Using formulas (13.6), we find $h, x_{k}, y_{k}: h=1$, $x_{k}=k$,

$$
y_{k}=\frac{1}{\sqrt{x_{k}+4}}
$$

$(k=0,1,2,3,4,5): \quad x_{0}=0, \quad x_{1}=1$,

$x_{2}=2, \quad x_{3}=3, \quad x_{4}=4, \quad x_{5}=5 ;$

$$
y_{0}=\frac{1}{\sqrt{4}}=\frac{1}{2}, \quad y_{1}=\frac{1}{\sqrt{5}} \approx 0.447, \quad y_{2} \approx 0.409, \quad y_{3} \approx 0.377, \quad y_{4} \approx 0.353
$$

$y_{5} \approx \frac{1}{3}$.

Using formula (13.5), we get

$$
\int_{0}^{5} \frac{d x}{\sqrt{x+4}} \approx 1 \cdot(0.250+0.447+0.409+0.377+0.353+0.166)=2.002
$$

Remark. The approximate value of the integral obtained is slightly different from the result found using the Newton-Leibniz formula:

$$
\int_{0}^{5} \frac{d x}{\sqrt{x+4}}=\int_{0}^{5}(x+4)^{-\frac{1}{2}} d(x+4)=\left.2(x+4)^{\frac{1}{2}}\right|_{0} ^{5}=2
$$