Simpson's Rule Integration
Introduction to Numerical Integration
Numerical Integration: A collection of algorithms employed to approximate definite integrals, particularly advantageous in scenarios where analytical integration is either complex or impractical.
- Applications in Physics:
- Estimating the area under velocity-time graphs to calculate distance.
- Relevance in Engineering:
- Essential in design and analysis of complex shapes and functions.
Importance of Numerical Integration
- Scenarios for Application:
- Complex Boundary Conditions: Common in structural engineering where direct integration may not be feasible.
- Empirical Data Analysis: For instance, using numerical methods to accurately forecast energy consumption.
Example: Numerical integration allows for the mathematical modelling of empirical data, which is beneficial for planning resources in the energy sector.
Functions Suited for Numerical Methods
- Suitable Functions:
- Discontinuous Functions: Effectively handled using graphical methods to enhance comprehension.
- Rapidly Changing Slopes: Such functions are accurately integrated using specific numerical techniques designed for these variations.
- Function Smoothness: Is a critical factor in selecting the most appropriate numerical techniques.
Visualising Area Approximation
-
Geometric Representation:
Rectangles and trapezoids provide basic approximations.
Simpson's Rule uses parabolic sections for enhanced accuracy.
-
Worked Example:
- An acceleration curve, a(t)=t2, can be integrated over time using Simpson's Rule to practically demonstrate changes in velocity.
Simpson's Rule: Formula and Derivation
Simpson's Rule Formula
Simpson's Rule: A numerical technique for approximating definite integrals essential when exact solutions are unattainable, and precision in real-world applications is vital.
Basic Formula:
S=3h[f(x0)+4f(x1)+f(x2)]
Composite Formula:
S=3h[f(x0)+4∑i=1,3,5…n−1f(xi)+2∑i=2,4,6…n−2f(xi)+f(xn)]
- h: Step size, defined as (x2−x0)/2
- x_0, x_2: Endpoint values of the interval.
- f(x_0), f(x_1), f(x_2): Function values at the respective nodal points.
Example Calculation:
- Consider x0=0, x1=1, and x2=2 with h=1 for f(x)=x2. Then:
S=31[02+4(1)2+22]=31[0+4+4]=38
Derivation of Simpson's Rule
To derive Simpson's Rule, approximate a given interval by a quadratic polynomial ax2+bx+c:
- For the interval [x0,x2], the function is modelled as a parabola.
- Evaluate ∫x0x2(ax2+bx+c)dx.
- Integrate separately: ∫ax2dx, ∫bxdx, and ∫cdx.
- Replace terms with function values f(x0), f(x1), f(x2).
- Visual Diagram:

Examples Using Simpson's Rule
Step-by-step Example with Polynomial Function
Consider the polynomial function f(x)=x2+3x+2.
- Interval Selection: Divide the interval into three equal parts for simplification.
- Calculation Step-by-step:
- Calculate f(x) at each point:
- f(0)=02+3×0+2=2
- f(1)=12+3×1+2=6
- f(2)=22+3×2+2=12
- Apply Simpson's Rule:
∫02(x2+3x+2)dx≈62−0[f(0)+4f(1)+f(2)]=62[2+4(6)+12]=62[2+24+12]=62[38]=676≈12.67
- Graphical Representation:

Example with Trigonometric Function
Applying Simpson's Rule to f(x)=sin(x):
- Interval Impact: The periodic nature of a sine wave requires careful interval selection for optimal accuracy.
- Detailed Calculation Steps:
-
Compute over the interval [0,π], selecting segments like 0, 2π, and π.
-
Evaluate the sine function at these points and apply Simpson's Rule.
f(0)=sin(0)=0
f(2π)=sin(2π)=1
f(π)=sin(π)=0
∫0πsin(x)dx≈6π−0[f(0)+4f(2π)+f(π)]=6π[0+4(1)+0]=64π=32π≈2.094
Graphical Aid: 
Example with Exponential Function
Consider f(x)=ex:
- Calculation Steps:
- On the interval [0,1], select points 0, 0.5, and 1.
- Compute e0=1, e0.5≈1.649, and e1≈2.718.
- Apply Simpson's Rule:
∫01exdx≈61−0[f(0)+4f(0.5)+f(1)]=61[1+4(1.649)+2.718]=61[1+6.596+2.718]=610.314≈1.719
Graphical Breakdown: 
Simpson's Rule: Error Analysis
- Error Term:
- Formula:
- E=−180n4(b−a)5f(4)(ξ)
- Dependency on Fourth Derivative: Indicates how the curve's nature affects accuracy.
- Analogy: Like a road curvature affecting driving difficulty, the fourth derivative measures function 'bend.'
-
Factors Affecting Error:
- Step Size and Subintervals:
- Smaller steps imply lower errors.
- Doubling n changes error by approximately a factor of 16.
- Function Behaviour:
- Smoother curves generally lead to smaller errors.

Comparison with Other Numerical Methods
Overview of Methods
Key Strategies and Tips
-
Understanding Key Assumptions:
- Continuity: Ensure the function is continuous for accurate application of Simpson's Rule.
- Even Segmentation: Maintain even intervals.
-
Common Pitfalls:
- Errors in proper interval segmentation.
- Misapplication of formulae and arithmetic mistakes.
-
Time Management Techniques:
- Allocate sufficient time for setup and verification of integrals.
-
Worked Example:
Problem: Use Simpson's Rule to approximate the integral of f(x)=x2 from 0 to 4 with n=2 subintervals.
- Step 1: Divide [0,4] into segments, giving points at x0=0, x1=2, and x2=4.
- Step 2: Calculate function values: f(0)=0, f(2)=4, and f(4)=16.
- Step 3: Apply Simpson's Rule:
∫04x2dx≈64−0[f(0)+4f(2)+f(4)]
64[0+4(4)+16]
64[0+16+16]
- Practice Exercise:
- Approximate ∫03x3dx using Simpson's Rule with 3 subintervals.
- Solution:
- Step 1: Divide the interval [0,3] into three equal parts giving x0=0, x1=1, x2=2, and x3=3.
- Step 2: Calculate function values: f(0)=0, f(1)=1, f(2)=8, and f(3)=27.
- Step 3: Apply composite Simpson's Rule:
∫03x3dx≈3(3)3−0[f(0)+4f(1)+2f(2)+f(3)]
=93[0+4(1)+2(8)+27]
=93[0+4+16+27]
=93[47]=9141=15.67
- Exact value is ∫03x3dx=434=481=20.25, so our approximation is reasonably close.
By mastering Simpson's Rule and understanding its advantages compared to other methods, students will be well-equipped to tackle numerical integration problems in their examinations.