Numerical Integration
Numerical Integration
Unit 2
Numerical Integration
Numerical Integration
Such that
We assume that the length of each subinterval is given by . First,
recall that the area of a trapezoid with a height of and bases of
length b1 and b2 is given by
We see that the first trapezoid has a height and parallel bases of
length f(x0) and f(x1).
Thus, the area of the first trapezoid :
x 2 2.5 3 3.5 4
y=f(x) 9 22.25 43 72.75 113
Using Trapezoidal Rule
Simpson’s ¹/₃ rule
• polynomial based on quadratic approximation
• Instead of area of trapezoids, area of parabolas are considered
• In this, each approximation actually covers two of the subintervals.
• This is why we require the number of subintervals to be even.
ₐ∫ᵇ f (x) dx = h/3 [(y₀ + yₙ) + 4 (y₁ + y₃ + ..) + 2(y₂ + y₄ + ..)]
h = 0.1
h = (b – a )/ n