Numerical integration

chauhansp198 8,677 views 22 slides Mar 07, 2016
Slide 1
Slide 1 of 22
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22

About This Presentation

,integration ,numerical integration ,trapezoidal rule ,simpson’s rule


Slide Content

Numerical
Integration

Integration is an important in Physics.
Used to determine the rate of growth in bacteria or to find the
distance given the velocity (s = ∫vdt) as well as many other
uses.

The most familiar practical (probably the 1
st
usage) use of
integration is to calculate the area.
Integration

Integration
Generally we use formulae to determine the integral of
a function:
 F(x) can be found if its antiderivative, f(x) is known.
() () ()aFbFdxxf
b
a
-=ò

Integration
when the antiderivative is unknown we are required to
determine f(x) numerically.
To determine the definite integral we find the area
between the curve and the x-axis.
This is the principle of numerical integration.

Integration
Figure shows the area under a
curve using the midpoints

Integration
There are various integration methods: Trapezoid,
Simpson’s, etc.
We’ll be looking in detail at the Trapezoid and variants
of the Simpson’s method.

Trapezoidal Rule

Trapezoidal Rule
is an improvement on the midpoint implementation.
the midpoints is inaccurate in that there are pieces of
the “boxes” above and below the curve (over and under
estimates).

Trapezoidal Rule
Instead the curve is approximated using a sequence of
straight lines, “slanted” to match the curve.
f
i
f
i+1

Trapezoidal Rule
Clearly the area of one rectangular strip from x
i
to x
i+1
is
given by
Generally is used. h is the width of a
strip.
( )( )
iiii xxff -+=D
++ 11 I
) x- (x ½ h
i1i+=
1...

Trapezoidal Rule
The composite Trapezium rule is obtained by applying the
equation .1 over all the intervals of interest.
Thus,
,if the interval h is the same for each strip.
( )
n1-n2102 f 2f 2f 2f f I ++¼+++=D
h

Trapezoidal Rule
Note that each internal point is counted and therefore
has a weight h, while end points are counted once and
have a weight of h/2.
()
)f 2f
2f 2f (fdx xf
n1-n
2102
x
x
n
0
++¼+
++=ò
h

Trapezoidal Rule
Given the data in the following table use the trapezoid rule to
estimate the integral from x = 1.8 to x = 3.4. The data in the
table are for e
x
and the true value is 23.9144.

Trapezoidal Rule
As an exercise show that the approximation given by the
trapezium rule gives 23.9944.

Simpson’s Rule

Simpson’s Rule
The midpoint rule was first improved upon by the
trapezium rule.
A further improvement is the Simpson's rule.
Instead of approximating the curve by a straight line,
we approximate it by a quadratic or cubic function.

Simpson’s Rule
Diagram showing approximation
using Simpson’s Rule.

Simpson’s Rule
There are two variations of the rule: Simpson’s 1/3 rule
and Simpson’s 3/8 rule.

Simpson’s Rule
The formula for the Simpson’s 1/3,
() ( )
n1-n32103
x
x
f 4f 4f 2f 4f fdx xf
n
0
++¼++++=ò
h

Simpson’s Rule
The integration is over pairs of intervals and requires
that total number of intervals be even of the total
number of points N be odd.

Simpson’s Rule
The formula for the Simpson’s 3/8,
() ( )
n1-n32108
3
x
x
f 3f 2f 3f 3f fdx xf
n
0
++¼++++=ò
h
If the number of strips is divisible by three we can use the 3/8
rule.

Thank You