Skip to content

Numerical Integration

Mathematics · FE Reference Handbook section

Mathematics
1 formulas
10 exam-style examples
~47 min
All Mathematics lectures

Handbook notes for this section

Definitions and conditions exactly as the handbook states them.

  • Three of the more common numerical integration algorithms used to evaluate the integral

Core formulas for this FE topic

Definitions, applicability, units, assumptions and worked examples for each relation.

Worked exam-style examples

The four ways this section is written on the real exam — thoughts first, then equations, then substitution.

Example 1
Definite integral — Numerical Integration

Evaluate ∫₀^5 (5x² + 1x) dx.

Given

  • Integrand 5x² + 1x

  • Limits 0 to 5

Find

The definite integral

Start with the thinking

  • Antidifferentiate term by term, then apply the limits.
  • The lower limit of zero kills the second evaluation.

Step-by-step solution

  1. Antiderivative

    F(x)=(5/3)x3+(1/2)x2F(x) = (5/3)x^{3} + (1/2)x^{2}
  2. Upper limit

    F(5)=(5/3)(125)+(1/2)(25)F(5) = (5/3)(125) + (1/2)(25)
  3. Evaluate

    F(5)=208.3+12.500=220.8F(5) = 208.3 + 12.500 = 220.8
  4. Lower limit

    F(0)=0F(0) = 0
  5. Result

    ∫=220.8\int = 220.8
Answer:

220.8

Why the other options are there

  • 130.0 (integrand evaluated instead of integrated)
  • 44.17 (average value reported)

Reference: FE Reference Handbook — Mathematics → Numerical Integration

Example 2
Newton's algorithm applied to a square root — Numerical Integration

Use Newton's algorithm on f(x) = x² − 8 with a starting value x₀ = 2 to obtain two improved estimates of √8, then report the error after the second iteration.

Given

  • f(x)=x2−8f(x) = x^{2} - 8
  • x0=2x_{0} = 2

Find

x₁, x₂ and the absolute error |x₂ − √N|

Start with the thinking

  • Newton's algorithm is x_{k+1} = x_k − f(x_k)/f′(x_k); for f = x² − N it collapses to the averaging form.
  • Convergence is quadratic, so two iterations already give several correct digits.

Step-by-step solution

  1. Formula

    xk+1=xk−f(xk)/f′(xk)=½(xk+N/xk)x_{k+1} = x_k - f(x_k)/f'(x_k) = ½(x_k + N/x_k)
  2. Iteration 1

    x1=½(2+8/2)=3.00000x_{1} = ½(2 + 8/2) = 3.00000
  3. Iteration 2

    x2=½(3.00000+8/3.00000)=2.83333x_{2} = ½(3.00000 + 8/3.00000) = 2.83333
  4. Exact value — √8 = 2.82843

  5. Error — |x₂ − √8| = 0.004906

Answer:
x2=2.83333witherror0.004906x_{2} = 2.83333 with error 0.004906

Why the other options are there

  • 4.0000 (single division, no averaging)
  • 6.0000 (forgot to divide by f′)

Reference: FE Reference Handbook — Mathematics → Numerical Integration

Example 3
Trapezoidal rule versus the exact integral — Numerical Integration

Estimate ∫₀^6 (x² + 1) dx with the trapezoidal rule using n = 4 equal intervals, then compare with the exact value and report the percentage error.

Given

  • f(x)=x2+1f(x) = x^{2} + 1
  • a=0,b=6a = 0, b = 6
  • n=4n = 4

Find

Trapezoidal estimate, exact value, and percent error

Start with the thinking

  • The trapezoidal rule weights interior ordinates by 2 and the two end ordinates by 1.
  • For a convex function the trapezoidal rule over-estimates the true area.

Step-by-step solution

  1. Step size

    h=(b−a)/n=(6−0)/4=1.5000h = (b - a)/n = (6 - 0)/4 = 1.5000
  2. Formula — I ≈ (h/2)[f(a) + 2Σf(xᵢ) + f(b)]

  3. Ordinates — f(0) = 1.000, interior sum Σf(xᵢ) = 34.5000, f(6) = 37.000

  4. Substituting

    I≈(1.5000/2)[107.0]=80.2500I \approx (1.5000/2)[107.0] = 80.2500
  5. Exact

    ∫=b3/3+b=78.0000\int = b^{3}/3 + b = 78.0000
  6. Error

    ∣I−exact∣/exact=2.885|I - exact|/exact = 2.885%
Answer:

Trapezoidal I ≈ 80.250 versus exact 78.000 (2.88% high)

Why the other options are there

  • 160.5 (dropped the ½)
  • 28.500 (single trapezoid)

Reference: FE Reference Handbook — Mathematics → Numerical Integration

Example 4
Definite integral — Numerical Integration (2)

Evaluate ∫₀^2 (6x² + 2x) dx.

Given

  • Integrand 6x² + 2x

  • Limits 0 to 2

Find

The definite integral

Start with the thinking

  • Antidifferentiate term by term, then apply the limits.
  • The lower limit of zero kills the second evaluation.

Step-by-step solution

  1. Antiderivative

    F(x)=(6/3)x3+(2/2)x2F(x) = (6/3)x^{3} + (2/2)x^{2}
  2. Upper limit

    F(2)=(6/3)(8)+(2/2)(4)F(2) = (6/3)(8) + (2/2)(4)
  3. Evaluate

    F(2)=16.000+4.000=20.000F(2) = 16.000 + 4.000 = 20.000
  4. Lower limit

    F(0)=0F(0) = 0
  5. Result

    ∫=20.000\int = 20.000
Answer:

20.000

Why the other options are there

  • 28.00 (integrand evaluated instead of integrated)
  • 10.00 (average value reported)

Reference: FE Reference Handbook — Mathematics → Numerical Integration

Example 5
Newton's algorithm applied to a square root — Numerical Integration (2)

Use Newton's algorithm on f(x) = x² − 8 with a starting value x₀ = 5 to obtain two improved estimates of √8, then report the error after the second iteration.

Given

  • f(x)=x2−8f(x) = x^{2} - 8
  • x0=5x_{0} = 5

Find

x₁, x₂ and the absolute error |x₂ − √N|

Start with the thinking

  • Newton's algorithm is x_{k+1} = x_k − f(x_k)/f′(x_k); for f = x² − N it collapses to the averaging form.
  • Convergence is quadratic, so two iterations already give several correct digits.

Step-by-step solution

  1. Formula

    xk+1=xk−f(xk)/f′(xk)=½(xk+N/xk)x_{k+1} = x_k - f(x_k)/f'(x_k) = ½(x_k + N/x_k)
  2. Iteration 1

    x1=½(5+8/5)=3.30000x_{1} = ½(5 + 8/5) = 3.30000
  3. Iteration 2

    x2=½(3.30000+8/3.30000)=2.86212x_{2} = ½(3.30000 + 8/3.30000) = 2.86212
  4. Exact value — √8 = 2.82843

  5. Error — |x₂ − √8| = 0.033694

Answer:
x2=2.86212witherror0.033694x_{2} = 2.86212 with error 0.033694

Why the other options are there

  • 1.6000 (single division, no averaging)
  • -12.0000 (forgot to divide by f′)

Reference: FE Reference Handbook — Mathematics → Numerical Integration

Example 6
Trapezoidal rule versus the exact integral — Numerical Integration (2)

Estimate ∫₀^7 (x² + 1) dx with the trapezoidal rule using n = 4 equal intervals, then compare with the exact value and report the percentage error.

Given

  • f(x)=x2+1f(x) = x^{2} + 1
  • a=0,b=7a = 0, b = 7
  • n=4n = 4

Find

Trapezoidal estimate, exact value, and percent error

Start with the thinking

  • The trapezoidal rule weights interior ordinates by 2 and the two end ordinates by 1.
  • For a convex function the trapezoidal rule over-estimates the true area.

Step-by-step solution

  1. Step size

    h=(b−a)/n=(7−0)/4=1.7500h = (b - a)/n = (7 - 0)/4 = 1.7500
  2. Formula — I ≈ (h/2)[f(a) + 2Σf(xᵢ) + f(b)]

  3. Ordinates — f(0) = 1.000, interior sum Σf(xᵢ) = 45.8750, f(7) = 50.000

  4. Substituting

    I≈(1.7500/2)[142.8]=124.9I \approx (1.7500/2)[142.8] = 124.9
  5. Exact

    ∫=b3/3+b=121.3\int = b^{3}/3 + b = 121.3
  6. Error

    ∣I−exact∣/exact=2.945|I - exact|/exact = 2.945%
Answer:

Trapezoidal I ≈ 124.9 versus exact 121.3 (2.94% high)

Why the other options are there

  • 249.8 (dropped the ½)
  • 44.625 (single trapezoid)

Reference: FE Reference Handbook — Mathematics → Numerical Integration

Example 7
Definite integral — Numerical Integration (3)

Evaluate ∫₀^5 (6x² + 5x) dx.

Given

  • Integrand 6x² + 5x

  • Limits 0 to 5

Find

The definite integral

Start with the thinking

  • Antidifferentiate term by term, then apply the limits.
  • The lower limit of zero kills the second evaluation.

Step-by-step solution

  1. Antiderivative

    F(x)=(6/3)x3+(5/2)x2F(x) = (6/3)x^{3} + (5/2)x^{2}
  2. Upper limit

    F(5)=(6/3)(125)+(5/2)(25)F(5) = (6/3)(125) + (5/2)(25)
  3. Evaluate

    F(5)=250.0+62.500=312.5F(5) = 250.0 + 62.500 = 312.5
  4. Lower limit

    F(0)=0F(0) = 0
  5. Result

    ∫=312.5\int = 312.5
Answer:

312.5

Why the other options are there

  • 175.0 (integrand evaluated instead of integrated)
  • 62.50 (average value reported)

Reference: FE Reference Handbook — Mathematics → Numerical Integration

Example 8
Newton's algorithm applied to a square root — Numerical Integration (3)

Use Newton's algorithm on f(x) = x² − 6 with a starting value x₀ = 4 to obtain two improved estimates of √6, then report the error after the second iteration.

Given

  • f(x)=x2−6f(x) = x^{2} - 6
  • x0=4x_{0} = 4

Find

x₁, x₂ and the absolute error |x₂ − √N|

Start with the thinking

  • Newton's algorithm is x_{k+1} = x_k − f(x_k)/f′(x_k); for f = x² − N it collapses to the averaging form.
  • Convergence is quadratic, so two iterations already give several correct digits.

Step-by-step solution

  1. Formula

    xk+1=xk−f(xk)/f′(xk)=½(xk+N/xk)x_{k+1} = x_k - f(x_k)/f'(x_k) = ½(x_k + N/x_k)
  2. Iteration 1

    x1=½(4+6/4)=2.75000x_{1} = ½(4 + 6/4) = 2.75000
  3. Iteration 2

    x2=½(2.75000+6/2.75000)=2.46591x_{2} = ½(2.75000 + 6/2.75000) = 2.46591
  4. Exact value — √6 = 2.44949

  5. Error — |x₂ − √6| = 0.016419

Answer:
x2=2.46591witherror0.016419x_{2} = 2.46591 with error 0.016419

Why the other options are there

  • 1.5000 (single division, no averaging)
  • -6.0000 (forgot to divide by f′)

Reference: FE Reference Handbook — Mathematics → Numerical Integration

Example 9
Trapezoidal rule versus the exact integral — Numerical Integration (3)

Estimate ∫₀^6 (x² + 1) dx with the trapezoidal rule using n = 8 equal intervals, then compare with the exact value and report the percentage error.

Given

  • f(x)=x2+1f(x) = x^{2} + 1
  • a=0,b=6a = 0, b = 6
  • n=8n = 8

Find

Trapezoidal estimate, exact value, and percent error

Start with the thinking

  • The trapezoidal rule weights interior ordinates by 2 and the two end ordinates by 1.
  • For a convex function the trapezoidal rule over-estimates the true area.

Step-by-step solution

  1. Step size

    h=(b−a)/n=(6−0)/8=0.7500h = (b - a)/n = (6 - 0)/8 = 0.7500
  2. Formula — I ≈ (h/2)[f(a) + 2Σf(xᵢ) + f(b)]

  3. Ordinates — f(0) = 1.000, interior sum Σf(xᵢ) = 85.7500, f(6) = 37.000

  4. Substituting

    I≈(0.7500/2)[209.5]=78.5625I \approx (0.7500/2)[209.5] = 78.5625
  5. Exact

    ∫=b3/3+b=78.0000\int = b^{3}/3 + b = 78.0000
  6. Error

    ∣I−exact∣/exact=0.721|I - exact|/exact = 0.721%
Answer:

Trapezoidal I ≈ 78.563 versus exact 78.000 (0.72% high)

Why the other options are there

  • 157.1 (dropped the ½)
  • 14.250 (single trapezoid)

Reference: FE Reference Handbook — Mathematics → Numerical Integration

Example 10
Definite integral — Numerical Integration (4)

Evaluate ∫₀^4 (2x² + 5x) dx.

Given

  • Integrand 2x² + 5x

  • Limits 0 to 4

Find

The definite integral

Start with the thinking

  • Antidifferentiate term by term, then apply the limits.
  • The lower limit of zero kills the second evaluation.

Step-by-step solution

  1. Antiderivative

    F(x)=(2/3)x3+(5/2)x2F(x) = (2/3)x^{3} + (5/2)x^{2}
  2. Upper limit

    F(4)=(2/3)(64)+(5/2)(16)F(4) = (2/3)(64) + (5/2)(16)
  3. Evaluate

    F(4)=42.667+40.000=82.667F(4) = 42.667 + 40.000 = 82.667
  4. Lower limit

    F(0)=0F(0) = 0
  5. Result

    ∫=82.667\int = 82.667
Answer:

82.667

Why the other options are there

  • 52.00 (integrand evaluated instead of integrated)
  • 20.67 (average value reported)

Reference: FE Reference Handbook — Mathematics → Numerical Integration

© 2026 Dr. Steve Efe. Civil Engineering Capstone Studio. All rights reserved.