← 2018 Paper 2
UPSC 2018 Maths Optional Paper 2 Q7b — Step-by-Step Solution
15 marks · Section B
Gaussian quadrature · Numerical Analysis · asked 3× in 13 yrs · Read the full method →
Question
Find the values of the constants a,b,c such that the quadrature formula
∫0hf(x)dx=h[af(0)+bf(3h)+cf(h)]
is exact for polynomials of as high degree as possible, and hence find the order of the truncation error.
Technique
Method of undetermined coefficients — exactness on 1,x,x2; check x3 for the first failure; error constant from the leading non-exact monomial, E∝h4f′′′.
Solution
Setup. Three free parameters a,b,c ⇒ impose exactness on f=1,x,x2 (three conditions). The method of undetermined coefficients: require equality for each monomial.
Step 1 — Exactness conditions
For f(x)=1: ∫0h1dx=h, RHS =h(a+b+c):
a+b+c=1.
For f(x)=x: ∫0hxdx=2h2, RHS =h(a⋅0+b⋅3h+c⋅h)=h2(3b+c):
3b+c=21.
For f(x)=x2: ∫0hx2dx=3h3, RHS =h(b⋅9h2+c⋅h2)=h3(9b+c):
9b+c=31.
Step 2 — Solve the linear system
Subtract the third from the second: 3b−9b=21−31, i.e. 92b=61⇒b=43.
Then c=21−3b=21−41=41. And a=1−b−c=1−43−41=0.
a=0,b=43,c=41.
So the rule is ∫0hfdx≈h[43f(3h)+41f(h)].
Step 3 — Highest degree of exactness
Test f(x)=x3:
∫0hx3dx=4h4,RHS=h[43(3h)3+41h3]=h4[4⋅273+41]=h4[361+41]=185h4.
These differ (41=185), so the rule is exact for polynomials of degree ≤2 but not degree 3.
Step 4 — Truncation error
The error E=∫0hfdx−h[43f(3h)+41f(h)] vanishes for degree ≤2, so the leading term is proportional to f′′′. Using the monomial x3 (f′′′=6):
E[x3]=4h4−185h4=369h4−10h4=−36h4.
Writing E=Ch4f′′′(ξ) with f′′′=6: C⋅6=−361⇒C=−2161. Hence
Answer
E=−216h4f′′′(ξ),0<ξ<h,i.e. the truncation error is of order O(h4).