A brief note on Numerical Integration . Read it before a test. Try each question at the end before you open its answer.
The three rules Trapezium: T n = h 2 [ ends + 2 × inner ] T_n = \tfrac{h}{2}[\text{ends} + 2 \times \text{inner}] T n = 2 h [ ends + 2 × inner ] . Mid-ordinate: M n = h × M_n = h \times M n = h × (sum of the mid-ordinates). Simpson, n n n even: S n = h 3 [ ends + 4 × odd + 2 × even ] S_n = \tfrac{h}{3}[\text{ends} + 4 \times \text{odd} + 2 \times \text{even}] S n = 3 h [ ends + 4 × odd + 2 × even ] . Errors Shape: for f ′ ′ > 0 f'' > 0 f ′′ > 0 , T T T is too big and M M M too small. Trapezium bound: ( b − a ) h 2 K 12 \dfrac{(b - a)h^2 K}{12} 12 ( b − a ) h 2 K , with ∣ f ′ ′ ∣ ≤ K |f''| \le K ∣ f ′′ ∣ ≤ K . Halving h h h : T T T and M M M errors fall to a quarter, Simpson's to a sixteenth. Simpson is exact for cubics. Richardson: 4 T 2 n − T n 3 = S 2 n = 2 M n + T n 3 \dfrac{4T_{2n} - T_n}{3} = S_{2n} = \dfrac{2M_n + T_n}{3} 3 4 T 2 n − T n = S 2 n = 3 2 M n + T n . Hyperbolic substitutions x 2 + a 2 \sqrt{x^2 + a^2} x 2 + a 2 : put x = a sinh u x = a\sinh u x = a sinh u . x 2 − a 2 \sqrt{x^2 - a^2} x 2 − a 2 : put x = a cosh u x = a\cosh u x = a cosh u . First result: ∫ d x x 2 + a 2 = sinh − 1 x a + C \int\dfrac{dx}{\sqrt{x^2 + a^2}} = \sinh^{-1}\dfrac{x}{a} + C ∫ x 2 + a 2 d x = sinh − 1 a x + C . Second result: ∫ d x x 2 − a 2 = cosh − 1 x a + C \int\dfrac{dx}{\sqrt{x^2 - a^2}} = \cosh^{-1}\dfrac{x}{a} + C ∫ x 2 − a 2 d x = cosh − 1 a x + C . A first-degree term: complete the square first. A worked example Estimate ∫ 0 1 d x 1 + x \int_0^1\dfrac{dx}{1 + x} ∫ 0 1 1 + x d x by Simpson's rule with 2 2 2 strips.
Ordinates. 1 1 1 , 2 3 \tfrac{2}{3} 3 2 , 1 2 \tfrac{1}{2} 2 1 , with h = 1 2 h = \tfrac{1}{2} h = 2 1 . Rule. 1 6 ( 1 + 8 3 + 1 2 ) = 25 36 ≈ 0.6944 \tfrac{1}{6}\left(1 + \tfrac{8}{3} + \tfrac{1}{2}\right) = \tfrac{25}{36} \approx 0.6944 6 1 ( 1 + 3 8 + 2 1 ) = 36 25 ≈ 0.6944 . Compare. The exact value is ln 2 \ln 2 ln 2 , so the error is about 0.0013 0.0013 0.0013 . Practice with new numbers
A program to try The program prints the three rules side by side for ∫ 0 1 1 + x 3 d x \int_0^1 \sqrt{1 + x^3}\,dx ∫ 0 1 1 + x 3 d x , an integral with no simple antiderivative.
Read it first. Then run it. Which column settles first?
1. Change the function to x ** 3. Which column is exact from the start?
Mistakes to avoid Simpson with an odd number of strips. h 2 \tfrac{h}{2} 2 h in Simpson's rule in place of h 3 \tfrac{h}{3} 3 h . The wrong family: plus under the root means sinh. Old limits after a shift or a substitution. Check yourself Find T 2 T_2 T 2 for ∫ 0 2 x 2 d x \int_0^2 x^2\,dx ∫ 0 2 x 2 d x . Stuck? Show a hint Show the answerWhy is Simpson's rule exact for x 3 x^3 x 3 ? Stuck? Show a hint Show the answerWith T 4 = 0.70 T_4 = 0.70 T 4 = 0.70 and T 8 = 0.69 T_8 = 0.69 T 8 = 0.69 , give Richardson's estimate. Stuck? Show a hint Show the answerFind ∫ d x x 2 + 49 \int\dfrac{dx}{\sqrt{x^2 + 49}} ∫ x 2 + 49 d x . Stuck? Show a hint Show the answerWhich substitution suits x 2 − 16 \sqrt{x^2 - 16} x 2 − 16 ? Stuck? Show a hint Show the answerSources OpenStax, Calculus Volume 2 , Section 3.6, Numerical Integration.