Professional Documents
Culture Documents
DIFFERENTIATION
CHAPTER-FIVE
Chapter objectives
• Learn about some methods for numerical
integration and differentiation.
• Recognize the differing effects of data error on
the processes of numerical integration and
differentiation.
INTEGRATION AND DIFFERENTIATION
• Integration and differentiation are the key concepts presented in the
first two calculus courses and they are fundamental to solving many
engineering and science problems. While many of these problems
can be solved analytically, there are also many problems that require
numerical integration or numerical differentiation techniques.
NUMERICAL INTEGRATION
• The integral of a function for can be interpreted as the area under
the curve of between , as shown in Figure 5.1. Denoting this area as
A, the integral is written as
Definitions:-
Integrand:-
Lower limit of integration is
Upper limit of integration is
Variable of integration is
o Numerical integration, called quadrature, involves methods for
estimating the value of a definite integral. In these methods, the
function ) is estimated or approximated by another function, chosen
so that the area under is easy to compute.
o The better the estimate of by the better the estimate of the integral
of
INTEGRATION AND DIFFERENTIATION
Two of the most common numerical integration techniques estimate with a set
of piecewise linear functions or with a set of piecewise parabolic functions.
If the function is estimated with piecewise linear functions, the area of the
trapezoids that compose the area under the piecewise linear functions is the
approximation to the desired integral, and the method is known as the
trapezoidal rule.
If the function is estimated with piecewise quadratic functions, the technique is
called Simpson’s rule.
Trapezoidal Rule
In the trapezoidal rule for integration, the interval [a, b] is divided into n equal
subintervals and the curve is approximated byon each subinterval as a straight line
connecting the values Of at the ends of each subinterval. The integral A is the sum
of the approximate integrals on each subinterval. The width of each subinterval is
𝑏 −𝑎
The range of values of on the interval
∆ 𝑥=is
𝑛
INTEGRATION AND DIFFERENTIATION
The approximation of on sub interval is shown in Figure 5.2. The approximating
curve is represented by the dashed line. The approximate area of over this
subinterval is that of the trapezoid under
The full integral is then approximated by adding the integral over every subinterval.
(Multiple application of the trapezoidal rule)
or
Recall from geometry that the formula for computing the area of a trapezoid is the height times
the average of the bases (Fig. 21.5a). In our case, the concept is the same but the trapezoid is
on its side (Fig. 21.5b). Therefore, the integral estimate can be represented as
or
where, for the trapezoidal rule, the average height is the average of the function
values at the end points, or
INTEGRATION AND DIFFERENTIATION
Example:-5.1.Using the trapezoidal rule with n=4 , estimate the value of the following
definite integral. And Compare with the exact value and compute the percent error.
f(x3)
3.0625
f(x2)
2.25
f(x)
f(x1)
1.5625
f(xo)
1
0
0 0.25 0.5 0.75 1 1.25 1.5 1.75 2
x
Numerical integration
Then by substituting the values in the trapezoidal rule formula
Then
then
Then using Trapizoidal rule
And the exact solution is found from the definite integral ln(2)=0.6931
The mat lab Trapz (xi,yi) gives 0.6956, the error decreases with increasing n.
Simpson’s Rule
• Simpson’s Rule approximates the function to be integrated with piecewise
quadratic functions,
• Let the curve of Figure 5.3 be represented by the parabola
The curve passes through the three points and . Then, by (parabola equation) we
have:
Since each segment has width , to apply Simpson’s rule of numerical integration, the
number of subdivisions must be even. This restriction does not apply to the trapezoidal
rule of numerical integration. The value of h for simpson’s Rule of integration is found
from.
Cont.…
• Using Simpson’s rule with 4 subdivisions n=4 , compute the
approximate value of