The math optional, made finite.

← 2025 Paper 2

UPSC Maths 2025 Paper 2 Q8b — Solution

15 marks · Section B

Question

Find the constant pp and error term for the quadrature formula x0x1f(x)dx=h2(f0+f1)+ph2(f0f1)\displaystyle\int_{x_0}^{x_1} f(x)\,dx = \dfrac{h}{2}(f_0 + f_1) + ph^2(f_0' - f_1') where x0+h=x1x_0 + h = x_1, f0=f(x0)f_0 = f(x_0), f1=f(x1)f_1 = f(x_1) and prime (') represents derivative with respect to xx. Hence deduce the composite rule for integrating abf(x)dx\displaystyle\int_a^b f(x)\,dx, a=x0<x1<<xN=ba = x_0 < x_1 < \cdots < x_N = b.

Technique

Use the method of undetermined coefficients: expand both sides in powers of hh about x0x_0 and choose pp to maximise the order of accuracy; the first non-vanishing residual gives the error term. This is the corrected trapezoidal (Euler–Maclaurin) rule.

Solution

Taylor expansion of both sides

Expand ff about x0x_0. Write f(k)f(k)(x0)f^{(k)} \equiv f^{(k)}(x_0). With x1=x0+hx_1 = x_0 + h: x0x0+hfdx=fh+fh22+fh36+fh424+f(4)h5120+\int_{x_0}^{x_0+h} f\,dx = f h + \frac{f' h^2}{2} + \frac{f'' h^3}{6} + \frac{f''' h^4}{24} + \frac{f^{(4)} h^5}{120} + \cdots

Right-hand side pieces: f0=f,f1=f+fh+f2h2+f6h3+f(4)24h4+,f_0 = f,\qquad f_1 = f + f'h + \tfrac{f''}{2}h^2 + \tfrac{f'''}{6}h^3 + \tfrac{f^{(4)}}{24}h^4 + \cdots, f0=f,f1=f+fh+f2h2+f(4)6h3+f_0' = f',\qquad f_1' = f' + f''h + \tfrac{f'''}{2}h^2 + \tfrac{f^{(4)}}{6}h^3 + \cdots

Then h2(f0+f1)=fh+f2h2+f4h3+f12h4+f(4)48h5+,\frac{h}{2}(f_0 + f_1) = fh + \frac{f'}{2}h^2 + \frac{f''}{4}h^3 + \frac{f'''}{12}h^4 + \frac{f^{(4)}}{48}h^5 + \cdots, ph2(f0f1)=ph2(fhf2h2f(4)6h3)=pfh3p2fh4p6f(4)h5ph^2(f_0' - f_1') = ph^2\Big(-f''h - \tfrac{f'''}{2}h^2 - \tfrac{f^{(4)}}{6}h^3 - \cdots\Big) = -pf''h^3 - \tfrac{p}{2}f'''h^4 - \tfrac{p}{6}f^{(4)}h^5 - \cdots

Subtract to get the error

E=x0x1fdxRHS.E = \int_{x_0}^{x_1}f\,dx - \text{RHS}. Term-by-term (the hh and h2h^2 terms cancel exactly): E=(1614+p)fh3+(124112+p2)fh4+(1120148+p6)f(4)h5+E = \Big(\tfrac{1}{6} - \tfrac14 + p\Big)f''h^3 + \Big(\tfrac{1}{24} - \tfrac{1}{12} + \tfrac{p}{2}\Big)f'''h^4 + \Big(\tfrac{1}{120} - \tfrac{1}{48} + \tfrac{p}{6}\Big)f^{(4)}h^5 + \cdots

Choose pp to kill the h3h^3 term: 1614+p=0    p=1416=112.\frac16 - \frac14 + p = 0 \implies p = \frac14 - \frac16 = \frac{1}{12}.

p=112.\boxed{p = \frac{1}{12}.}

With p=112p = \tfrac{1}{12}, the h4h^4 coefficient becomes 124112+124=0\tfrac{1}{24} - \tfrac{1}{12} + \tfrac{1}{24} = 0 — it also vanishes. The first surviving term is the h5h^5 term: 1120148+172=615+10720=1720.\frac{1}{120} - \frac{1}{48} + \frac{1}{72} = \frac{6 - 15 + 10}{720} = \frac{1}{720}.

So the leading error is E=h5720f(4)(ξ),ξ(x0,x1),E = \frac{h^5}{720}f^{(4)}(\xi),\qquad \xi \in (x_0,x_1), via the mean-value form of the remainder.

Single-interval formula

x0x1fdx=h2(f0+f1)+h212(f0f1)+h5720f(4)(ξ).\int_{x_0}^{x_1} f\,dx = \frac{h}{2}(f_0 + f_1) + \frac{h^2}{12}(f_0' - f_1') + \frac{h^5}{720}f^{(4)}(\xi).

Composite rule on [a,b][a,b]

Partition [a,b][a,b] into NN equal subintervals of width h=(ba)/Nh = (b-a)/N, nodes xi=a+ihx_i = a + ih. Sum the single-interval rule: abfdx=i=0N1[h2(fi+fi+1)+h212(fifi+1)]+i=0N1h5720f(4)(ξi).\int_a^b f\,dx = \sum_{i=0}^{N-1}\left[\frac{h}{2}(f_i + f_{i+1}) + \frac{h^2}{12}(f_i' - f_{i+1}')\right] + \sum_{i=0}^{N-1}\frac{h^5}{720}f^{(4)}(\xi_i).

The trapezoidal sum telescopes, and the derivative correction telescopes (fifi+1f_i' - f_{i+1}' sums to f0fNf_0' - f_N'): abfdx=h[12f0+f1+f2++fN1+12fN]+h212(f(a)f(b))+EN,\boxed{\int_a^b f\,dx = h\Big[\tfrac12 f_0 + f_1 + f_2 + \cdots + f_{N-1} + \tfrac12 f_N\Big] + \frac{h^2}{12}\big(f'(a) - f'(b)\big) + E_N,} with total error EN=i=0N1h5720f(4)(ξi)=(ba)h4720f(4)(η),η(a,b)E_N = \sum_{i=0}^{N-1}\frac{h^5}{720}f^{(4)}(\xi_i) = \frac{(b-a)h^4}{720}f^{(4)}(\eta),\quad \eta\in(a,b) (using Nh=baNh = b-a and the intermediate-value theorem).

This is the corrected (end-corrected) trapezoidal rule — the leading Euler–Maclaurin term; it raises the trapezoidal accuracy from O(h2)O(h^2) to O(h4)O(h^4) globally.

Answer

p=112p = \dfrac{1}{12}. Single-panel error h5720f(4)(ξ)\dfrac{h^5}{720}f^{(4)}(\xi). Composite rule: abfdx=h[12f0+i=1N1fi+12fN]+h212(f(a)f(b))+(ba)h4720f(4)(η).\int_a^b f\,dx = h\Big[\tfrac12 f_0 + \textstyle\sum_{i=1}^{N-1} f_i + \tfrac12 f_N\Big] + \frac{h^2}{12}\big(f'(a)-f'(b)\big) + \frac{(b-a)h^4}{720}f^{(4)}(\eta).

We've mapped all 13 years of this exam. Get new solutions, tools, and guides as we release them — free.