← 2017 Paper 2
UPSC 2017 Maths Optional Paper 2 Q7b — Step-by-Step Solution 20 marks · Section B
Simpson's 1/3 and 3/8 rules · Numerical Analysis · asked 5× in 13 yrs · Read the full method →
Question
Derive the formula
∫ a b y d x = 3 h 8 [ ( y 0 + y n ) + 3 ( y 1 + y 2 + y 4 + y 5 + ⋯ + y n − 1 ) + 2 ( y 3 + y 6 + ⋯ + y n − 3 ) ] . \int_a^b y\,dx=\frac{3h}{8}\big[(y_0+y_n)+3(y_1+y_2+y_4+y_5+\cdots+y_{n-1})+2(y_3+y_6+\cdots+y_{n-3})\big]. ∫ a b y d x = 8 3 h [ ( y 0 + y n ) + 3 ( y 1 + y 2 + y 4 + y 5 + ⋯ + y n − 1 ) + 2 ( y 3 + y 6 + ⋯ + y n − 3 ) ] .
Is there any restriction on n n n ? State that condition. What is the error bound in the case of Simpson’s 3 8 \dfrac38 8 3 rule?
Technique
Fit a cubic over four nodes via Newton’s forward-difference formula, integrate u ∈ [ 0 , 3 ] u\in[0,3] u ∈ [ 0 , 3 ] to get the single-panel 3 h 8 ( y 0 + 3 y 1 + 3 y 2 + y 3 ) \tfrac{3h}{8}(y_0+3y_1+3y_2+y_3) 8 3 h ( y 0 + 3 y 1 + 3 y 2 + y 3 ) ; sum panels (shared nodes get weight 2, interior 3, ends 1); error from the cubic-interpolation remainder.
Solution
Setup. Divide [ a , b ] [a,b] [ a , b ] into n n n equal sub-intervals of width h = b − a n h=\dfrac{b-a}{n} h = n b − a , with nodes x i = a + i h x_i=a+ih x i = a + ih and ordinates y i = y ( x i ) y_i=y(x_i) y i = y ( x i ) , i = 0 , 1 , … , n i=0,1,\ldots,n i = 0 , 1 , … , n .
Step 1 — Simpson’s 3 / 8 3/8 3/8 rule on one group of three sub-intervals
Over four consecutive nodes x 0 , x 1 , x 2 , x 3 x_0,x_1,x_2,x_3 x 0 , x 1 , x 2 , x 3 (three sub-intervals), fit a cubic through ( x i , y i ) (x_i,y_i) ( x i , y i ) and integrate. Using the Newton forward-difference cubic and integrating from x 0 x_0 x 0 to x 3 x_3 x 3 (i.e. u = 0 u=0 u = 0 to 3 3 3 , x = x 0 + u h x=x_0+uh x = x 0 + u h ):
∫ x 0 x 3 y d x = h ∫ 0 3 ( y 0 + u Δ y 0 + u ( u − 1 ) 2 Δ 2 y 0 + u ( u − 1 ) ( u − 2 ) 6 Δ 3 y 0 ) d u . \int_{x_0}^{x_3}y\,dx=h\int_0^3\Big(y_0+u\Delta y_0+\tfrac{u(u-1)}{2}\Delta^2y_0+\tfrac{u(u-1)(u-2)}{6}\Delta^3y_0\Big)du. ∫ x 0 x 3 y d x = h ∫ 0 3 ( y 0 + u Δ y 0 + 2 u ( u − 1 ) Δ 2 y 0 + 6 u ( u − 1 ) ( u − 2 ) Δ 3 y 0 ) d u .
Evaluating the integrals (∫ 0 3 u d u = 9 2 \int_0^3 u\,du=\tfrac92 ∫ 0 3 u d u = 2 9 , ∫ 0 3 u ( u − 1 ) d u = 9 2 \int_0^3 u(u-1)\,du=\tfrac92 ∫ 0 3 u ( u − 1 ) d u = 2 9 , ∫ 0 3 u ( u − 1 ) ( u − 2 ) d u = 9 4 \int_0^3 u(u-1)(u-2)\,du=\tfrac94 ∫ 0 3 u ( u − 1 ) ( u − 2 ) d u = 4 9 ):
∫ x 0 x 3 y d x = h ( 3 y 0 + 9 2 Δ y 0 + 9 4 Δ 2 y 0 + 3 8 Δ 3 y 0 ) . \int_{x_0}^{x_3}y\,dx=h\Big(3y_0+\tfrac92\Delta y_0+\tfrac94\Delta^2y_0+\tfrac38\Delta^3y_0\Big). ∫ x 0 x 3 y d x = h ( 3 y 0 + 2 9 Δ y 0 + 4 9 Δ 2 y 0 + 8 3 Δ 3 y 0 ) .
Substituting Δ y 0 = y 1 − y 0 \Delta y_0=y_1-y_0 Δ y 0 = y 1 − y 0 , Δ 2 y 0 = y 2 − 2 y 1 + y 0 \Delta^2y_0=y_2-2y_1+y_0 Δ 2 y 0 = y 2 − 2 y 1 + y 0 , Δ 3 y 0 = y 3 − 3 y 2 + 3 y 1 − y 0 \Delta^3y_0=y_3-3y_2+3y_1-y_0 Δ 3 y 0 = y 3 − 3 y 2 + 3 y 1 − y 0 and collecting:
∫ x 0 x 3 y d x = 3 h 8 ( y 0 + 3 y 1 + 3 y 2 + y 3 ) . \boxed{\;\int_{x_0}^{x_3}y\,dx=\frac{3h}{8}\big(y_0+3y_1+3y_2+y_3\big).\;} ∫ x 0 x 3 y d x = 8 3 h ( y 0 + 3 y 1 + 3 y 2 + y 3 ) .
This is Simpson’s 3 / 8 3/8 3/8 rule for one group.
Step 2 — Composite rule: add the groups
Apply the rule to each successive group of three sub-intervals: ( x 0 , x 1 , x 2 , x 3 ) (x_0,x_1,x_2,x_3) ( x 0 , x 1 , x 2 , x 3 ) , ( x 3 , x 4 , x 5 , x 6 ) (x_3,x_4,x_5,x_6) ( x 3 , x 4 , x 5 , x 6 ) , …, ( x n − 3 , … , x n ) (x_{n-3},\ldots,x_n) ( x n − 3 , … , x n ) :
∫ a b y d x = 3 h 8 [ ( y 0 + 3 y 1 + 3 y 2 + y 3 ) + ( y 3 + 3 y 4 + 3 y 5 + y 6 ) + ⋯ ] . \int_a^b y\,dx=\frac{3h}{8}\Big[(y_0+3y_1+3y_2+y_3)+(y_3+3y_4+3y_5+y_6)+\cdots\Big]. ∫ a b y d x = 8 3 h [ ( y 0 + 3 y 1 + 3 y 2 + y 3 ) + ( y 3 + 3 y 4 + 3 y 5 + y 6 ) + ⋯ ] .
The interior group-boundary ordinates y 3 , y 6 , … , y n − 3 y_3,y_6,\ldots,y_{n-3} y 3 , y 6 , … , y n − 3 are shared between two groups, so each gets weight 1 + 1 = 2 1+1=2 1 + 1 = 2 ; the ordinates strictly inside a group (y 1 , y 2 , y 4 , y 5 , … y_1,y_2,y_4,y_5,\ldots y 1 , y 2 , y 4 , y 5 , … ) get weight 3 3 3 ; the two ends y 0 , y n y_0,y_n y 0 , y n get weight 1 1 1 :
∫ a b y d x = 3 h 8 [ ( y 0 + y n ) + 3 ( y 1 + y 2 + y 4 + y 5 + ⋯ + y n − 1 ) + 2 ( y 3 + y 6 + ⋯ + y n − 3 ) ] , \int_a^b y\,dx=\frac{3h}{8}\Big[(y_0+y_n)+3(y_1+y_2+y_4+y_5+\cdots+y_{n-1})+2(y_3+y_6+\cdots+y_{n-3})\Big], ∫ a b y d x = 8 3 h [ ( y 0 + y n ) + 3 ( y 1 + y 2 + y 4 + y 5 + ⋯ + y n − 1 ) + 2 ( y 3 + y 6 + ⋯ + y n − 3 ) ] ,
which is the required formula.
Step 3 — Restriction on n n n
Each application consumes three sub-intervals, so the total number of sub-intervals must be a multiple of 3 3 3 :
n must be a multiple of 3 ( n = 3 k ) . \boxed{\;n\ \text{must be a multiple of }3\quad(n=3k).\;} n must be a multiple of 3 ( n = 3 k ) .
Step 4 — Error bound
For a single group of three sub-intervals the error term is
E group = − 3 h 5 80 f ( 4 ) ( ξ ) , x 0 < ξ < x 3 . E_{\text{group}}=-\frac{3h^5}{80}\,f^{(4)}(\xi),\qquad x_0<\xi<x_3. E group = − 80 3 h 5 f ( 4 ) ( ξ ) , x 0 < ξ < x 3 .
Summing over the k = n / 3 k=n/3 k = n /3 groups gives the composite error
E = − 3 h 5 80 ∑ j = 1 k f ( 4 ) ( ξ j ) = − ( b − a ) h 4 80 f ( 4 ) ( ξ ˉ ) , a < ξ ˉ < b , E=-\frac{3h^5}{80}\sum_{j=1}^{k}f^{(4)}(\xi_j)=-\frac{(b-a)\,h^4}{80}\,f^{(4)}(\bar\xi),\qquad a<\bar\xi<b, E = − 80 3 h 5 j = 1 ∑ k f ( 4 ) ( ξ j ) = − 80 ( b − a ) h 4 f ( 4 ) ( ξ ˉ ) , a < ξ ˉ < b ,
using k h = b − a 3 kh=\dfrac{b-a}{3} k h = 3 b − a . Hence the error bound:
Answer
∣ E ∣ ≤ ( b − a ) h 4 80 max a ≤ x ≤ b ∣ f ( 4 ) ( x ) ∣ . \boxed{\;|E|\le\frac{(b-a)h^4}{80}\,\max_{a\le x\le b}\big|f^{(4)}(x)\big|.\;} ∣ E ∣ ≤ 80 ( b − a ) h 4 a ≤ x ≤ b max f ( 4 ) ( x ) .