Skip to content
GATEiit

GATE AE, ME, CE, IN, CH + 10 more · Numerical Methods

Numerical Integration (Trapezoidal and Simpson's Rules)

Numerical integration by trapezoidal, Simpson's 1/3 and Simpson's 3/8 rules: composite weights, interval count constraints, degree of exactness and error bounds for GATE AE.

Before you start

Concept notes

1. Trapezoidal rule: weights, composite rule and error

Partition [a,b] into n equal subintervals of width h=b−an with nodes xk=a+kh and yk=f(xk). Replacing f on each subinterval with a straight chord gives the composite trapezoidal rule (any n≥1 allowed): ∫abf(x) dx≈h2[y0+2(y1+y2+⋯+yn−1)+yn].

  • Degree of precision: 1 (exact for every linear polynomial ax+b).
  • Composite error bound: ∣ET∣≤(b−a)h212max⁡[a,b]∣f′′(x)∣=O(h2).
x0x1x2x3Trapezoidal rule (linear chords, O(h²)) vs Simpson (parabolas, O(h⁴))
Partitioning [a, b] into equal strips h: trapezoidal rule uses linear chords O(h²), whereas Simpson's 1/3 rule fits quadratic parabolas through pairs of strips for O(h⁴) accuracy.

2. Simpson's 1/3 rule: O(h⁴) accuracy and unexpected cubic exactness

Fitting parabolas through consecutive triplets (x0,x1,x2) requires an even number of subintervals n (n=2,4,6,…, i.e., an odd number of data points): ∫abf(x) dx≈h3[y0+4(y1+y3+⋯+yn−1)+2(y2+y4+⋯+yn−2)+yn].

Surprise symmetry bonus: because the cubic error cancels symmetrically around the midpoint x1, Simpson's 1/3 rule is exact for all polynomials up to degree 3 (cubics), not just quadratics.

  • Composite error bound: ∣ES1/3∣≤(b−a)h4180max⁡[a,b]∣f(4)(x)∣=O(h4) (halving h cuts error by 16×).

3. Simpson's 3/8 rule and comparing rules on GATE questions

Fitting cubic polynomials over groups of 3 subintervals requires n to be a multiple of 3 (n=3,6,9,…): ∫x0x3f(x) dx≈3h8(y0+3y1+3y2+y3), with composite pattern 1, 3, 3, 2, 3, 3, 2, ..., 1, also O(h4) and degree of exactness 3.

Rule Subintervals n required Exact up to degree Error order
Trapezoidal Any n≥1 1 (linear) O(h2)
Simpson's 1/3 Even (n=2k) 3 (cubic) O(h4)
Simpson's 3/8 Multiple of 3 (n=3k) 3 (cubic) O(h4)

Formulas to remember

Composite trapezoidal ruleValid for any n ≥ 1
∫abf(x) dx≈h2(y0+2∑i=1n−1yi+yn)
Trapezoidal errorO(h²), exact for degree ≤ 1
ET=−(b−a)h212f′′(ξ)
Composite Simpson's 1/3 ruleRequires n even
∫abf(x) dx≈h3(y0+4∑oddyi+2∑evenyi+yn)
Simpson's 1/3 errorO(h⁴), exact for degree ≤ 3
ES1/3=−(b−a)h4180f(4)(ξ)
Single Simpson's 3/8 ruleRequires n divisible by 3
∫x0x3f(x) dx≈3h8(y0+3y1+3y2+y3)

Common mistakes

  • Checking whether the number of data points is even instead of the number of subintervals n (n=points−1) for Simpson's 1/3 rule.
  • Swapping the weights 4 and 2 on interior ordinates (y1,y3 get 4; y2,y4 get 2, zero-indexed from y0).
  • Writing h8 instead of 3h8 in Simpson's 3/8 rule, or forgetting h2 vs h3.
  • Assuming Simpson's 1/3 is only exact up to degree 2: it integrates every cubic polynomial with zero error.
  • Using trapezoidal step h wrongly when n points are given instead of n intervals (h=(b−a)/n).

Worked examples

Try each step yourself, then reveal the working.

Example 1: Comparing trapezoidal and Simpson's 1/3 on a cubic integral

numerical

Approximate ∫02x3 dx using n=2 subintervals (h=1) with (i) trapezoidal rule and (ii) Simpson's 1/3 rule.

  1. Step 1: Tabulate y at x = 0, 1, 2.

    Try it on paper first.

Example 2: Spanwise wing lift integration with non-polynomial section cl

numerical

Local lift per unit span l(y) (N/m) along a half-wing (0≤y≤4 m) is measured at h=1 m: l(0)=600,l(1)=580,l(2)=500,l(3)=360,l(4)=0. Estimate total half-wing lift using Simpson's 1/3 rule.

  1. Step 1: Verify even subintervals n = 4 (5 data points).

    Try it on paper first.

Example 3: Mixed 1/3 + 3/8 rules when n = 5 subintervals are given

numerical

Evaluate ∫05f(x) dx for f tabulated at x=0,1,2,3,4,5 with values 1,2,4,8,16,32 using Simpson's 1/3 on [0,2] and Simpson's 3/8 on [2,5].

  1. Step 1: Apply Simpson's 1/3 on first 2 intervals [0, 2].

    Try it on paper first.

Example 4: Required step count n from Simpson's 1/3 error bound

numerical

How many even subintervals n guarantee ∣ES1/3∣≤10−4 when integrating ∫02ex dx?

  1. Step 1: Bound max |f⁽⁴⁾(x)| on [0, 2].

    Try it on paper first.

Previous year questions

No official PYQ in our currently live papers is tagged with this exact topic yet. The topic test below uses original GATE-style questions.

Topic test

8 questions: original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE Engineering Mathematics (AE, ME, CE, IN, CH + 10 more) syllabus; being checked by a reviewer. Updated 2026-12-01. Spotted a mistake? Use Report an issue on any question, or contact us.