中点法则比梯形法则更准确。它是通过找到绘制到曲线的矩形的中点来工作的。中点法则为
∫ a b f ( x ) d x ≈= h [ f ( x 1 ) + f ( x 2 ) + … + f ( x n ) ] {\displaystyle \int _{a}^{b}f\left(x\right)\,dx\approx =h\left[f\left(x_{1}\right)+f\left(x_{2}\right)+\ldots +f\left(x_{n}\right)\right]}
其中: h = b − a n {\displaystyle h={\frac {b-a}{n}}} n 是条带的数量。
并且 x i = 1 2 [ ( a + { i − 1 } h ) + ( a + i h ) ] {\displaystyle x_{i}={\frac {1}{2}}\left[\left(a+\left\{i-1\right\}h\right)+\left(a+ih\right)\right]}
使用中点法则求解 ∫ 1 5 x 2 + 2 x d x {\displaystyle \int _{1}^{5}x^{2}+2x\ dx} ,使用 4 个条带。
首先,我们计算 h。
h = 5 − 1 4 = 1 1 = 1 {\displaystyle h={\frac {5-1}{4}}={\frac {1}{1}}=1}
现在我们开始设置中点法则。
∫ 1 5 x 2 + 2 x d x ≈ 1 [ f ( x 1 ) + f ( x 2 ) + f ( x 3 ) + f ( x 4 ) ] {\displaystyle \int _{1}^{5}x^{2}+2x\ dx\approx 1\left[f\left(x_{1}\right)+f\left(x_{2}\right)+f\left(x_{3}\right)+f\left(x_{4}\right)\right]}
x 1 = 1 2 [ ( 1 + { 1 − 1 } 1 ) + ( 1 + 1 × 1 ) ] = 1 2 [ ( 1 ) + ( 2 ) ] = 1.5 {\displaystyle x_{1}={\frac {1}{2}}\left[\left(1+\left\{1-1\right\}1\right)+\left(1+1\times 1\right)\right]={\frac {1}{2}}\left[\left(1\right)+\left(2\right)\right]=1.5}
x 2 = 1 2 [ ( 1 + { 2 − 1 } 1 ) + ( 1 + 2 × 1 ) ] = 1 2 [ ( 2 ) + ( 3 ) ] = 2.5 {\displaystyle x_{2}={\frac {1}{2}}\left[\left(1+\left\{2-1\right\}1\right)+\left(1+2\times 1\right)\right]={\frac {1}{2}}\left[\left(2\right)+\left(3\right)\right]=2.5}
x 3 = 1 2 [ ( 1 + { 3 − 1 } 1 ) + ( 1 + 3 × 1 ) ] = 1 2 [ ( 3 ) + ( 4 ) ] = 3.5 {\displaystyle x_{3}={\frac {1}{2}}\left[\left(1+\left\{3-1\right\}1\right)+\left(1+3\times 1\right)\right]={\frac {1}{2}}\left[\left(3\right)+\left(4\right)\right]=3.5}
x 4 = 1 2 [ ( 1 + { 4 − 1 } 1 ) + ( 1 + 4 × 1 ) ] = 1 2 [ ( 4 ) + ( 5 ) ] = 4.5 {\displaystyle x_{4}={\frac {1}{2}}\left[\left(1+\left\{4-1\right\}1\right)+\left(1+4\times 1\right)\right]={\frac {1}{2}}\left[\left(4\right)+\left(5\right)\right]=4.5}
∫ 1 5 x 2 + 2 x d x ≈ 1 [ f ( 1.5 ) + f ( 2.5 ) + f ( 3.5 ) + f ( 4.5 ) ] {\displaystyle \int _{1}^{5}x^{2}+2x\ dx\approx 1\left[f\left(1.5\right)+f\left(2.5\right)+f\left(3.5\right)+f\left(4.5\right)\right]}
现在我们需要求解 f(n)
∫ 1 5 x 2 + 2 x d x ≈ 1 [ 5.25 + 11.3 + 19.3 + 29.3 ] {\displaystyle \int _{1}^{5}x^{2}+2x\ dx\approx 1\left[5.25+11.3+19.3+29.3\right]}
∫ 1 5 x 2 + 2 x d x ≈ 65 {\displaystyle \int _{1}^{5}x^{2}+2x\ dx\approx 65}
正如你所见,中点法则的结果更接近真实值 65 1 3 {\displaystyle 65{\frac {1}{3}}} ,比梯形法则好,但比辛普森法则差。