← 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

abydx=3h8[(y0+yn)+3(y1+y2+y4+y5++yn1)+2(y3+y6++yn3)].\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].

Is there any restriction on nn? State that condition. What is the error bound in the case of Simpson’s 38\dfrac38 rule?

Technique

Fit a cubic over four nodes via Newton’s forward-difference formula, integrate u[0,3]u\in[0,3] to get the single-panel 3h8(y0+3y1+3y2+y3)\tfrac{3h}{8}(y_0+3y_1+3y_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] into nn equal sub-intervals of width h=banh=\dfrac{b-a}{n}, with nodes xi=a+ihx_i=a+ih and ordinates yi=y(xi)y_i=y(x_i), i=0,1,,ni=0,1,\ldots,n.

Step 1 — Simpson’s 3/83/8 rule on one group of three sub-intervals

Over four consecutive nodes x0,x1,x2,x3x_0,x_1,x_2,x_3 (three sub-intervals), fit a cubic through (xi,yi)(x_i,y_i) and integrate. Using the Newton forward-difference cubic and integrating from x0x_0 to x3x_3 (i.e. u=0u=0 to 33, x=x0+uhx=x_0+uh):

x0x3ydx=h03(y0+uΔy0+u(u1)2Δ2y0+u(u1)(u2)6Δ3y0)du.\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.

Evaluating the integrals (03udu=92\int_0^3 u\,du=\tfrac92, 03u(u1)du=92\int_0^3 u(u-1)\,du=\tfrac92, 03u(u1)(u2)du=94\int_0^3 u(u-1)(u-2)\,du=\tfrac94):

x0x3ydx=h(3y0+92Δy0+94Δ2y0+38Δ3y0).\int_{x_0}^{x_3}y\,dx=h\Big(3y_0+\tfrac92\Delta y_0+\tfrac94\Delta^2y_0+\tfrac38\Delta^3y_0\Big).

Substituting Δy0=y1y0\Delta y_0=y_1-y_0, Δ2y0=y22y1+y0\Delta^2y_0=y_2-2y_1+y_0, Δ3y0=y33y2+3y1y0\Delta^3y_0=y_3-3y_2+3y_1-y_0 and collecting:

  x0x3ydx=3h8(y0+3y1+3y2+y3).  \boxed{\;\int_{x_0}^{x_3}y\,dx=\frac{3h}{8}\big(y_0+3y_1+3y_2+y_3\big).\;}

This is Simpson’s 3/83/8 rule for one group.

Step 2 — Composite rule: add the groups

Apply the rule to each successive group of three sub-intervals: (x0,x1,x2,x3)(x_0,x_1,x_2,x_3), (x3,x4,x5,x6)(x_3,x_4,x_5,x_6), …, (xn3,,xn)(x_{n-3},\ldots,x_n):

abydx=3h8[(y0+3y1+3y2+y3)+(y3+3y4+3y5+y6)+].\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].

The interior group-boundary ordinates y3,y6,,yn3y_3,y_6,\ldots,y_{n-3} are shared between two groups, so each gets weight 1+1=21+1=2; the ordinates strictly inside a group (y1,y2,y4,y5,y_1,y_2,y_4,y_5,\ldots) get weight 33; the two ends y0,yny_0,y_n get weight 11:

abydx=3h8[(y0+yn)+3(y1+y2+y4+y5++yn1)+2(y3+y6++yn3)],\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],

which is the required formula.

Step 3 — Restriction on nn

Each application consumes three sub-intervals, so the total number of sub-intervals must be a multiple of 33:

  n must be a multiple of 3(n=3k).  \boxed{\;n\ \text{must be a multiple of }3\quad(n=3k).\;}

Step 4 — Error bound

For a single group of three sub-intervals the error term is

Egroup=3h580f(4)(ξ),x0<ξ<x3.E_{\text{group}}=-\frac{3h^5}{80}\,f^{(4)}(\xi),\qquad x_0<\xi<x_3.

Summing over the k=n/3k=n/3 groups gives the composite error

E=3h580j=1kf(4)(ξj)=(ba)h480f(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,

using kh=ba3kh=\dfrac{b-a}{3}. Hence the error bound:

Answer

  E(ba)h480maxaxbf(4)(x).  \boxed{\;|E|\le\frac{(b-a)h^4}{80}\,\max_{a\le x\le b}\big|f^{(4)}(x)\big|.\;}
We post more of this — worked solutions, CSAT trap breakdowns, guide chapters — a few times a week on Telegram. Free, no sign-in. Join

This solution is part of the Maths Coverage Map — 13 years, mapped. Get the take-away PDF free.