index faq numerical approximations of definite integrals riemann sums numerical approximation of...
TRANSCRIPT
Index FAQ
Numerical Approximations of Definite Integrals
Riemann SumsNumerical Approximation of Definite IntegralsFormulae for ApproximationsProperties of ApproximationsExample
Mika Seppälä: Numerical
IntegrationIndex FAQ
Riemann Sums
Taking more division points or subintervals in the Riemann sums, the approximation of the area of the domain under the graph of f becomes better.
A Riemann sum for the integral of a function f over the interval [a,b] is obtained by first dividing the interval [a,b] into subintervals and then placing a rectangle, as shown below, over each subinterval. The corresponding Riemann sum is the combined area of the green rectangles. The height of the rectangle over some given subinterval is the value of the function f at some point of the subinterval. This point can be chosen freely.
Mika Seppälä: Numerical
IntegrationIndex FAQ
Definite Integrals
1 0 1 -1 1
Let | 0,..., be a decomposition of the interval [ , ] into
subintervals [ , ], i.e. . Let [ , ] .
j
j j n n j j j
D x j n a b
x x a x x x x b x x j
This definition assumes that the limit does not depend on the various choices in the definition of the Riemann sums. This is true if f is continuous on [a,b].
Definitions
1max | 1,2, ,j jD x x j n
Measure of the fineness of the decomposition D of the interval [a,b] into subintervals
2
0
f( ) lim ( ).b
Da Dx dx S f
Definition of the definite integral of the function f over the interval [a,b]3
11
S (f) f( )( )n
D j j jj
x xRiemann sum1
Mika Seppälä: Numerical
IntegrationIndex FAQ
Numerical Approximations of Definite IntegralsIn view of the definition of the definite integral
we may approximate its value by choosing the decomposition D to be a decomposition of the interval [a,b] into subintervals of length (b-a)/n for some positive integer n. The points j can be freely chosen according to any rule from the intervals [xj -1 , xj ] = [a + (i -1)(b - a)/n, a + i (b - a)/n ].
In left rule approximations, j = xj-1.
In mid rule approximations, j = (xj-1+ xj)/2.
In right rule approximations, j = xj.
f( )b
ax dx
Mika Seppälä: Numerical
IntegrationIndex FAQ
Formulae for Approximations
Consider a function f on an interval [ , ], .
Let , and be a positive integer.
a b a b
b ax n
n
The following sums approximate f( ) .b
ax dxDefinitions
1
LEFT( ) f( ( 1) ) n
k
n a k x x1 Left Rule Approximation
1
RIGHT( ) f( ) n
k
n a k x x2 Right Rule Approximation
1
1MID( ) f( ( ) )
2
n
k
n a k x x3 Mid Rule Approximation
Mika Seppälä: Numerical
IntegrationIndex FAQ
Trapezoidal approximations and Simpson’s Formula
Depending on the shape of the function in question, the following approximations are often better approximations than the previously defined approximations:
Definitions Trapezoidal Approximation:
TRAP(n) = (LEFT(n)+RIGHT(n))/2
Simpson’s Approximation: SIMPSON(n)=(2MID(n)+TRAP(n))/3.
Mika Seppälä: Numerical
IntegrationIndex FAQ
Properties of ApproximationsIf the function f is increasing:
LEFT( ) f( ) and RIGHT( ) f( )b b
a an x dx n x dx
If f is strictly increasing – like in the above picture – then the above inequalities are also strict. If f is decreasing, then the direction of the above inequalities must be changed.
Property
This property follows directly from the definitions as illustrated in the above pictures. For an increasing positive function every LEFT(n) is the combined area of rectangles included in the area of the domain bounded by the graph of f. Hence we have the first inequality which also holds if the values of f are not always positive.
Mika Seppälä: Numerical
IntegrationIndex FAQ
Properties of Approximations
For any function
LEFT( ) RIGHT( ) ( ) ( ) .b a
n n f a f bn
If f is increasing, then LEFT( ) f( ) RIGHT( ).b
an x dx n
These estimates show that the approximations can be made as precise as needed simply by increasing the number n of subintervals.
This implies that for montone functions (either increasing or decreasing),
LEFT( ) f( ) ( ) ( )
and RIGHT( ) f( ) ( ) ( ) .
b
a
b
a
b an x dx f a f b
nb a
n x dx f a f bn
Error Estimates
If f is decreasing the above inequalities have to be reversed.
This follows directly from the definitions.
Mika Seppälä: Numerical
IntegrationIndex FAQ
Properties of Midpoint Approximations
MID( ) f( ) TRAPb
an x dx n
A function which is concave up has the property that its graph lies above any tangent line. This observation leads to the following estimate valid for functions that are concave up.
The second inequality follows from the fact that if the graph of a function is concave up, then the graph lies below a secant line between the points of intersection.
The approximations MID(n) give the combined area of rectangles like the one in the picture on the right. The area of the blue rectangle is the same as the area of the blue triangle on the right. Since the triangle is included in the area bounded by the graph of f, the first inequality of the above property follows.
Property
Mika Seppälä: Numerical
IntegrationIndex FAQ
Example 1/3
Problem
22
2
0
Approximate the value of the integral e . Estimate errors.x
dx
Solution The function to be integrated is decreasing in the interval of integration. Hence we have
22
2
0
RIGHT e LEFTx
n dx n
for any n. For n = 10, we get (compute using Maple)
22
2
0
RIGHT 10 1.1089 e LEFT 10 1.2819x
dx
The errors of RIGHT(n) or of LEFT(n) estimates are < 0.1729.
Mika Seppälä: Numerical
IntegrationIndex FAQ
Example 2/3
Problem
22
2
0
Approximate the value of the integral e . Estimate errors.x
dx
Solution In this case the Trapezoidal Approximation and Simpson’s Approximation give better estimates.
2
2
2 2
2 22
e
1 e 0 1
x
xd
x xdx
To be able to apply these estimates correctly we first need to figure out the direction of concavity of the graph of the integrand.
By looking at the sign of the second derivative we conclude that the graph of the integrand is concave down in the interval [-1,1] and concave up otherwise.
Mika Seppälä: Numerical
IntegrationIndex FAQ
Example 3/3
Problem
22
2
0
Approximate the value of the integral e . Estimate errors.x
dx
Solution
21
2
0
1.1957 e 1.1966x
dx
Computing again with Maple for n = 10 we get
Since the graph of the integrand is concave down in the interval [-1,1] and concave up otherwise we have
2
2
2 x
2
0
2 x
2
0
TRAP , 0,1 SIMPSON , 1,2 e
and e SIMPSON , 0,1 TRAP , 1,2
n n dx
dx n n
TRAP(n, [1,2]) here means that we apply the trapezoidal method in the interval [1,2]. The other terms have similar meanings.