0% found this document useful (0 votes)
20 views12 pages

Numerical Integration

The document discusses various techniques for numerical integration, specifically the Trapezoidal Rule and Simpson's Rule. The Trapezoidal Rule approximates the area under a curve using trapezoids, while Simpson's Rule uses parabolic approximations and requires an even number of subintervals. It also outlines the formulas for both methods and compares their accuracy and complexity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views12 pages

Numerical Integration

The document discusses various techniques for numerical integration, specifically the Trapezoidal Rule and Simpson's Rule. The Trapezoidal Rule approximates the area under a curve using trapezoids, while Simpson's Rule uses parabolic approximations and requires an even number of subintervals. It also outlines the formulas for both methods and compares their accuracy and complexity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

CSE011

Unit 2
Numerical Integration
Numerical Integration

• There are several techniques for numerical integration


1. Trapezoidal Rule
2. Simpson’s Rule

• Given a set of tabulated values of the integrand f(x),


determining the value of is called numerical integration.
• Trapezoidal Rule is a rule that
evaluates the area under the
curves by dividing the total
area into smaller trapezoids
rather than using rectangles.
• This integration works by
approximating the region under
the graph of a function as a
trapezoid, and it calculates the
area.
• This rule takes the average of
Let f(x) be a continuous function on the interval
the [a,the
left and b].right
Now sum.
divide the
intervals [a, b] into n equal subintervals with each of width,

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 :

The areas of the remaining three trapezoids are


Find Solution of an equation 2x3-4x+1 using Trapezoidal rule
x1 = 2 and x2 = 4; Step value (h) = 0.5

The value of table for x and y

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₄ + ..)]

a, b is the interval of integration


h = (b – a)/ n
y₀ means the first term and yₙ means last
term.
(y₁ + y₃ + ..) means the sum of odd terms.
(y₂ + y₄ + …) means sum of even terms.
Find the integration of f(x) using Simpson’s
1/3 rule.
x 0 0.1 0.2 0.3 0.4
0.997 0.977 0.860
f(x) 1
5
0.99
6 4
Using Simpson’s 1/3 Rule

ₐ∫ᵇ f (x) dx = h/₃ [(y₀ + yₙ) + 4 (y₁ + y₃ + …) + 2 (y₂ + y₄ + …)]

h = 0.1

ₐ∫ᵇ f (x) dx = 0.1/3 [(1+0.8604)+4×(0.9975+0.9776)+2×(0.99)]

ₐ∫ᵇ f (x) dx = 0.1/3 [(1+0.8604)+4×(1.9751)+2×(0.99)]

ₐ∫ᵇ f (x) dx = 0.39136

Solution of Simpson’s 1/3 rule = 0.39136


Find integration of f(x) using Simpson's 1/3 rule

The value of table for x and y=f(x)

x 1.4 1.6 1.8 2 2.2


y 4.0552 4.953 6.0436 7.3891 9.025
Simpson’s 3/8 rule
• polynomial based on quadratic approximation
• Instead of area of trapezoids, area of parabolas are considered
• In this, each approximation actually covers three of the subintervals instead of
two (like in 1/3rd rule)
• This is why we require the number of subintervals to be even.
ₐ∫ᵇ f (x) dx = [(y₀ + yₙ) + 3(y₁ + y₂ + y₄ + …) + 2(y₃ + y₆ +…)]
a, b is the interval of integration

h = (b – a )/ n

y₀ means the first term and yₙ means the last term.

( y₁ + y₂ + y₄ + … ) means the sum of remaining terms.

( y₃ + y₆ +…) means the multiples of 3.


Simpson's 1/3 rule Method Trapezoidal Method
In Simpson's 1/3 rule Method, we
In trapezoidal method, the boundary
1. approximate only the quadratic
between the ordinates is straight.
polynomial i.e. the parabolic curves.
In Simpson 's 1/3 rule Method , the
In trapezoidal, there is no limitation, it is
2. number of divisions should be even in
applicable for any number of ordinates.
this case.
This method gives an approximate
3. This method gives an accurate results.
result.
The result obtained by Simpson's 1/3 The result obtained by the trapezoidal
rule Method rule are greater or lesser rule are not affected because the
4.
as the curve of the boundary is convex boundary between the ordinates is
or concave towards the baseline. considered straight.
In this method, chances of errors is
5. In this method, chance of errors is less.
more.
Computations are not as complex in Computations are complex in this
6.
this method. method.
The integral function can be calculated
The integral function can be calculated
as = h/3 [(sum of 1st and last
Sr.
Simpson’s 1/3 rule Simpson’s 3/8 rule
No
It approximates function y = f(x) It approximates the function y = f(x)
1. by a parabola i.e. by 2nd order by a parabola i.e. by 3rd order
polynomial. polynomial.
In this, the chances of error are
2. more than Simpson’s 3/8 rule.
In this, the chances of error are less.

The integral function can be The integral function can be calculated


calculated as = h/3 [(sum of 1st as = 3h/8 [(sum of 1st and last
3. and last ordinates) + 4 (sum of ordinates) + 2 (sum of multiple of 3
odd ordinates) + 2 (sum of even ordinates) + 3 (sum of remaining
ordinates)]. ordinates)].
This rule is applied where N is an This rule is applied where N is a
4. even number. multiple of 3.
• Trapezoidal Rule: n=1
• Simpson’s One –third Rule: n=2
• Simpson’s Three –Eighth Rule: n=3

You might also like