Differentiation and Integration is the core of Engineering problem solving, and the process is simplified by discretization and In numerical differentiation and integration we will apply this method on it.
2. 5.1. Numerical Differentiation
οDifferentiation gives a measure of the rate at which a quantity changes.
οOne of the well-known fundamental of these rates is the relationship between
position, velocity and acceleration. If the position, x of an object that is moving
along a straight line is known as a function of time, t,
π = π(π‘)
π =
ππ
ππ‘
=
ππ(π‘)
ππ‘
π =
ππ
ππ‘
=
π2π(π‘)
ππ‘
οMany models in engineering and physics are expressed in terms of rated.
ο In electrical
ο In analysing conduction of heat
οDifferentiation is also used for finding maximum and minimum values of functions.
3. The Need for Numerical Differentiation
οThe function to be differentiated can be gives as
οAnalytical Expression or
οA set of discrete-points (tabulated data)
ο When the function is given as a simple mathematical expression, the derivative can be
determined analytically.
ο When analytical differentiation of the expression is difficult (or not possible), or the
function is specified as a set of discrete points, differentiation is done using a numerical
method.
Approaches to Numerical Differentiation
ο Numerical differentiation is carries out on data that are specified as a set of discrete
points.
ο Two approaches can be used to calculate a numerical approximation of the derivative at
one of the points.
1. To use a finite difference approximation of the derivative
2. To Approximate the points with an analytical expression that can be easily differentiated,
and then to calculate the derivative by differentiation the analytical expression.
4. 1. To use a finite difference approximation of the derivative
5. 1. To Approximate the points with an analytical expression that can be easily
differentiated, and then to calculate the derivative by differentiation the analytical
expression. The approximate analytical expression can be derived by using curve
fitting.
2.
6. Finite Difference Approximation of the Derivative
ο The derivative πβ²(π₯) of a function π(π₯) at the point π₯ = π is
defined as:
ππ(π₯)
ππ₯ π₯=π
= πβ² π = lim
π₯βπ
π π₯ β π(π)
π₯ β π
οThe derivative is the value of the slope of tangent line to the
function at π₯ = π.
οThe derivative is obtained by taking a point π₯ near x = π and
calculating the slope of the line that connects the two points.
οThe accuracy of calculating the derivative in this way increases
as point x is closer to point a.
οIn the limit as point x approaches point a, the derivative is the
slope of the line that is tangent to f(x) at x = a.
7. Finite Difference Approximation of the Derivative
ο In finite difference approximations of the derivative, values of the function at different points in
the neighbourhood of the point x = a are used for estimating the slope.
ο It should be remembered that the function that is being differentiated is prescribed by a set of
discrete points (tabulated data).
ο Various finite difference approximation formulas exist. Three such formulas, where the derivative
is calculated from the values of two points, are presented.
ο Forward Difference
ο Backward Difference
ο Central Difference
8. οForward Difference is the slope of the line that connects points
(π₯π, π π₯π and (π₯π+1, π π₯π+1
ππ
ππ₯ π₯=π₯π
=
π π₯π+1 βπ(π₯π)
π₯π+1βπ₯π
9. οBackward Difference is the slope of the line that connects
points (π₯πβ1, π π₯πβ1 and (π₯π, π π₯π
ππ
ππ₯ π₯=π₯π
=
π π₯π βπ(π₯πβ1)
π₯πβπ₯πβ1
10. οCentral Difference is the slope of the line that connects points
(π₯πβ1, π π₯πβ1 and (π₯π+1, π π₯π+1
ππ
ππ₯ π₯=π₯π
=
π π₯π+1 βπ(π₯πβ1)
π₯π+1βπ₯πβ1
11. Finite Difference Formulas Using Taylor Series
Expansion
οThe forward, backward and central difference formulas, as well
as many other finite difference formulas for approximating
derivatives can be derived by using Taylor Series Expansion.
οThe Formulas give estimate of the derivative at a point from
the values of points in its neighbourhood.
οThe number of points used in the calculation varies with the
formula and the points can be ahead, behind, or on both sides of
the point at which the derivative is calculated.
οIt also provides estimate for the truncation error in the
approximation.
12. Finite Difference Formulas of First Derivative
Taylor series of a function at point x
π π₯ = π π₯0 +
1
1!
πβ² π₯0 π₯ β π₯0 +
1
2!
πβ²β² π₯0 π₯ β π₯0
2 + β―
Can be written as
π π₯ = π π₯0 +
1
1!
πβ²
π₯0 β +
1
2!
πβ²β²
π₯0 β2
+ β― +
1
π!
π(π)
π₯0 βπ
Where h = π₯ β π₯0 ,π(π) π₯0 =
ππ(π)
ππ₯(π)
Taylor Approximation or Polynomial
π π₯ = π π₯0 +
1
1!
πβ² π₯0 β +
1
2!
πβ²β² π₯0 β2 + β― +
1
π!
π π π₯0 β2 + π π+1
Where the remainder, π π+1 is given by
π π+1
=
1
(π + 1)!
π π+1
ΞΆ β(π+1)
Where ΞΆ lies between π₯ πππ π₯0 and the approximation is obtained by
truncating the remainder part.
13. Finite Difference Formulas of First Derivative
Based on Taylor series Expansion
Two point Forward difference for first derivative at point π₯π+1 can be approximated.
π π₯π+1 = π π₯π +
1
1!
πβ²
π₯π β +
1
2!
πβ²β²
π₯π β2
+
1
3!
πβ²β²β²
π₯π β3
+
1
4!
π4
π₯π β4
+ β―
Where β = π₯π+1 β π₯π is the spacing between the points.
By using two term Taylor series expansion with remainder
π π₯π+1 = π π₯π + πβ²
π₯π β +
1
2!
πβ²β²
ΞΆ β2
Solving this for πβ² π₯π yields
πβ²
π₯π =
π π₯π+1 β π π₯π
β
β
πβ²β²
ΞΆ
2!
β
Where π‘ππ’ππππ‘πππ πππππ = β
πβ²β² ΞΆ
2!
β = π(β)
Note that the magnitude of truncation error is not really known, but the equation
implies that smaller h gives a smaller error.
πβ² ππ =
π ππ+π β π ππ
π
+ πΆ(π)
14. Finite Difference Formulas of First Derivative
Based on Taylor series Expansion
Two point Backward difference for first derivative at point π₯π+1 can be
approximated.
π π₯πβ1 = π π₯π β
1
1!
πβ²
π₯π β +
1
2!
πβ²β²
π₯π β2
β
1
3!
πβ²β²β²
π₯π β3
+
1
4!
π4
π₯π β4
+ β―
Where β = π₯π β π₯πβ1 is the spacing between the points.
By using two term Taylor series expansion with remainder
π π₯πβ1 = π π₯π β πβ²
π₯π β +
1
2!
πβ²β²
ΞΆ β2
Solving this for πβ² π₯π yields
πβ² π₯π =
π π₯π β π π₯πβ1
β
+
πβ²β² ΞΆ
2!
β
An approximate value of the derivative, can be calculated if the second term on the
right hand side is ignored.
πβ²
ππ =
π ππ β π ππβπ
π
+ πΆ(π)
15. Finite Difference Formulas of First Derivative
Based on Taylor series Expansion
Central Difference for first derivative at point π₯π+1 can be approximated by
subtracting the backward difference from forward difference Taylor series
approximation with three terms and remainder.
π π₯π+1 = π π₯π + πβ²
π₯π β +
1
2!
πβ²β²
π₯π β2
+
1
3!
πβ²β²β²
ΞΆ 1β3
ββ βπΉ
π π₯πβ1 = π π₯π β πβ²
π₯π β +
1
2!
πβ²β²
π₯π β2
β
1
3!
πβ²β²β²
ΞΆ 2β3
ββ βπ΅
Which gives
π π₯π+1 β π π₯πβ1 = 2πβ²
π₯π β +
1
3!
πβ²β²β²
ΞΆ 1β3
+
1
3!
πβ²β²β²
ΞΆ 2β3
Solving this for πβ²
π₯π and ignoring the remainder which is of order β2
, yields
πβ² ππ =
π ππ+π β π ππβπ
ππ
+ πΆ(ππ)
16. Finite Difference Formulas of First Derivative
A comparison of the three differences show that in both forward and
backward difference approximation, truncation error is of order h,
while in the central difference, it is of order ππ
. This shows that the
central difference approximation gives a more accurate approximation
of the derivative.
πβ²
π₯π =
π π₯π+1 β π π₯π
β
+ π(β)
πβ²
π₯π =
π π₯π β π π₯πβ1
β
+ π(β)
πβ² π₯π =
π π₯π+1 β π π₯πβ1
2β
+ π(β2)
17. Three Point Forward & Backward Finite Difference Formulas of First Derivative
οForward difference evaluates the derivative at point π₯π based on π₯π+1 ο is useful for
ππ and all interior point. (can not be used for π₯π)
οBackward difference evaluates the derivative at point π₯π based on π₯πβ1ο is useful for ππ
and all interior point. (can not be used for π₯1)
οCentral difference evaluates the derivative at point π₯π based on π₯π+1 πππ π₯πβ1ο is useful
only for interior points and not for end points ( ππππ ππ).
οAn estimate for the first derivative at the endpoints, with error of O(h2), can be calculated
with three-point forward and backward difference formulas, which are derived next.
18. Three Point Forward Difference
οThe three-point forward difference formula calculates the derivative at point π₯π from the
value at that point and the next two points, ππ+π and ππ+π .
οUsing three terms of Taylor series expansion with remainder
π π₯π+1 = π π₯π + πβ² π₯π β +
π
π!
πβ²β² ππ ππ +
1
3!
πβ²β²β² ΞΆ 1β3 ββ βππ1
π π₯π+2 = π π₯π + πβ²
π₯π 2β +
π
π!
πβ²β²
ππ (ππ)π
+
1
3!
πβ²β²β²
ΞΆ 1(2β)3
ββ βππ2
And the above two equations are combined such that the terms with second derivative
vanish so that the error would be minimum.
ο Multiply ππ1 by 4 and subtract ππ2ο 4 πππ - πππ
4π π₯π+1 β π π₯π+2 = 3π π₯π + 2πβ²
π₯π β +
4
3!
πβ²β²β²
ΞΆ 1β3
β
1
3!
πβ²β²β²
ΞΆ 1(2β)3
Solving for πβ² π₯π
πβ² ππ =
βππ ππ + ππ ππ+π β π ππ+π
ππ
+ πΆ(ππ)
Similarly it can be derived for the Three Point Backward Difference (try it)
πβ² ππ =
π ππβπ β ππ ππβπ + ππ ππ +
ππ
+ πΆ(ππ)
Order of
truncation
error
With less error we
can calculate
derivatives at end
points
19. Finite Difference for the Second Derivative
οSame approach can used to develop finite difference formulas for higher-
order derivatives.
Central Difference
ο Using four terms of Taylor series expansion with remainder (O(h))
π π₯π+1 = π π₯π + πβ² π₯π β +
1
2!
πβ²β² π₯π β2 +
1
3!
πβ²β²β² π₯π β3 +
1
4!
πβ²β²β²β² ΞΆ 1β4
π π₯πβ1 = π π₯π β
1
1!
πβ² π₯π β +
1
2!
πβ²β² π₯π β2 β
1
3!
πβ²β²β² π₯π β3 +
1
4!
πβ²β²β²β² ΞΆ 2β4
οEliminate the first derivatives by adding both equations together.
π π₯π+1 + π π₯πβ1 = 2π π₯π +
2
2!
πβ²β²
π₯π β2
+
1
4!
πβ²β²β²β²
ΞΆ 1β4
+ +
1
4!
πβ²β²β²β²
ΞΆ 2β4
Solving for πβ²β² ππ while neglecting the remainder part
πβ²β² π₯π =
π π₯πβ1 β 2π π₯π + π π₯π+1
β2
+ π(β2)
20. Finite Difference for the Second Derivative
Three point Forward difference
Using three terms of Taylor series expansion with remainder
π π₯π+1 = π π₯π + πβ² ππ π +
1
2!
πβ²β² π₯π β2 +
1
3!
πβ²β²β² ΞΆ 1β3 ββ βππ1
π π₯π+2 = π π₯π + πβ² ππ ππ +
1
2!
πβ²β² π₯π (2β)2+
1
3!
πβ²β²β² ΞΆ 1(2β)3 ββ βππ2
In order to cancel out the first derivative ο 2 πππ β πππ
Then solving for πβ²β²
π₯π yields
πβ²β² π₯π =
π π₯π β 2π π₯π+1 + π π₯π+2
β2
+ π(β)
Not
interested
in πβ²
ππ
21. Finite Difference for the Second Derivative
Three point Backward difference
Using three terms of Taylor series expansion with remainder
π π₯πβ1 = π π₯π β πβ² ππ π +
1
2!
πβ²β² π₯π β2 β
1
3!
πβ²β²β² ΞΆ 1β3 ββ βππ1
π π₯πβ2 = π π₯π β πβ² ππ ππ +
1
2!
πβ²β² π₯π 2β 2 β
1
3!
πβ²β²β² ΞΆ 2(2β)3 ββ βππ2
In order to cancel out the first derivative ο 2 πππ β πππ
Then solving for πβ²β²
π₯π yields
πβ²β² ππ =
π ππβπ β ππ ππβπ + π ππ
ππ
+ πΆ(π)
Not
interested
in πβ²
ππ
22. Example
Calculate the first derivative of a function π π₯ = π₯3, ππ‘ π₯ = 3
using both two point and three point forward difference
method.
Where the points are
a) π₯ = 3 , π₯ = 4 πππ π₯ = 5
b) π₯ = 3, π₯ = 3.25 πππ π₯ = 3.5
Compare the result with the exact value.
25. Numerical Integration
ο Integration is frequently encountered when solving
problems and calculating quantities in engineering and
science.
ο One of the simplest examples for the application of
integration is the calculation of the length of a curve.
When a curve in the x-y plane is given by the equation y
= f(x), the length L of the curve between the points x = a
and x = b is given by:
26. The general form of a definite integral (also called an antiderivative) is:
where f(x), called the integrand, is a function of the
independent variable x, and a and b are the limits
of the integration. The value of the
integral I(f) is a number when a and b are numbers
πΌ π =
π
π
π π₯ ππ₯ βββ β(β)
27. The Need For Numerical Integration
The integrand could be
ο Analytical Expression
ο A set of discrete points ( tabulated data)
Numerical integration is needed
ο when analytical integration is difficult or not possible, and
ο when the integrand is given as a set of discrete points.
28. Overview of Numerical Integration
ο The Numerical evaluation of a single integral deals with estimating the number I(f) that is the integral of a
function f(x) over an interval from a to b.
ο If the integrand is an analytical function, the numerical integration is done using a finite number of points
at which the integrand is evaluated.
ο One strategy is to use only the end points of the interval (a,f(a)) and (b,f(b)).
ο This may not give accurate result specially if the interval is wide and/or the integrand varies significantly within
the interval.
ο Higher accuracy can be achieved using a composite method where [a,b] is divided in to smaller
subintervals.
The integral of each subinterval is calculated, and the results are added together to give the value of
the whole integral.
οIn all cases the numerical integration is done using a set of discrete points for the
integrand.
οWhen the integrand is an analytical function, the location of the points within the
interval [a,b] can be defined by user or defined by the integration method.
οWhen the integrand is a given set of tabulated points, the location of the points is fixed
and cannot be changed.
29. Overview of Numerical Integration
ο Several methods are developed for carrying out numerical integration.
ο In each of this methods, a formula is derived for calculating an approximate value of the integral from
discrete values of the integrand.
ο This methods can be divided in to groups called
ο Open methods
ο Closed methods
Closed Methods
ο In closed methods, the end points of the interval are used in the formula that estimated the value of the
integral.
Example: trapezoidal and Simpsonβs Method
Open Methods
ο In open Methods, the interval of integration extends beyond the range od the endpoints that are actually
used for calculating the values of the integral
Example: Midpoint and Gauss Quadrature Method
30. Newton-Cotes Integration Formulas
ο In numerical Integration methods that use Newton-Cotes integration formulas, the value of the integrand
between the discrete points is estimated using a function that can be easily integrated.
ο The value of the integral is then obtained by integration.
ο When the original integrand is an analytical function, the Newton-Cotes formula replaces is with a simpler
function.
ο When the original integrand is a set of data points, the Newton-Cotes formula interpolates the integrand
between the given points.
ο A different option for integration, once the integrand f(x) is specified as a discrete points, is to use curve-fit
the points with a function F(x) that best fits the points.
ο F(x) is a polynomial or simple function whose antiderivative can be found easily, and the integral is
evaluated using direct analysis.
31. Rectangle and Midpoint Methods
Rectangle Method
ο Simplest of all approximations is to take f(x) over the interval x = [a,b]
f(x) ο as a constant equal to the value of f(x) at either end of the points
πΌ π =
π
π
π π₯ ππ₯ = π π π β π πππΌ π =
π
π
π π₯ ππ₯ = π π π β π
32. Rectangle and Midpoint Methods
Rectangle Method
ο Simplest of all approximations is to take f(x) over the interval x = [a,b]
πΌ π =
π
π
π π₯ ππ₯ = π π π β π πππΌ π =
π
π
π π₯ ππ₯ = π π π β π
When the integrand is assumed to be
ο π π the integral is underestimated
ο π π the integral is overestimated
33. Rectangle and Midpoint Methods
Composite Rectangle Method
ο The domain [a,b] is divided in to N intervals.
ο The integral in each subinterval is calculated with the rectangle method , and the value
of the whole integral is obtained by adding the values of the integral in the subintervals.
ο The points include π₯1, π₯1, π₯3, β¦ π₯π+1 π€βπππ π₯1 = a and π₯π+1 = b
35. Rectangle and Midpoint Methods
Midpoint Method
ο AN improvement over naΓ―ve rectangle metho
ο The value of the integrand at the middle of the interval, that if f(
π+π
2
) is used.
πΌ π =
π
π
π π₯ ππ₯ =
π
π
π
π + π
2
ππ₯ = π
π + π
2
π β π
ο The value of the integral is still approximated as the area of a
rectangle, but with an important difference.
ο The are is that of an equivalent rectangle.
ο It is more accurate approximation than the rectangle method
ο For a monotonic function as shown in the figure the regions of the
area under the curve that are ignored may be approximately offset
by those regions above the curve that are included but not always
true.
ο The accuracy can be increased by using composite method.
36. Rectangle and Midpoint Methods
Composite Midpoint Method
ο The domain [a,b] is divided in to N intervals.
ο The integral in each subinterval is calculated with the midpoint method , and the value
of the whole integral is obtained by adding the values of the integral in the subintervals.
ο The points include π₯1, π₯1, π₯3, β¦ π₯π+1 π€βπππ π₯1 = a and π₯π+1 = b
38. Trapezoidal Method
ο Refinement of both Rectangle and midpoint method
ο A linear function is used to approximate the integrand over the interval of integration.
ο Newtonβs form of interpolating polynomials with two points π₯ = π πππ π₯ = π ,yields
π π₯ = π π + π₯ β π
π π β π π
π β π
ββββ β ββ
ο Substituting equation (**) in to equation (*)
πΌ π =
π
π
π π₯ ππ₯ =
π
π
π₯ β π
π π β π π
π β π
ππ₯
= π π (π β π) +
1
2
[π π β π π ](π β π)
Simplifying the result gives an approximate formula known as trapezoidal rule or method
π° π =
π π + π π
π
(π β π)
39. Trapezoidal Method
ο Examining the result before simplification
ο The first term
π π π β π , ππππππ πππ‘π π‘βπ ππππ ππ π ππππ‘πππππ ππ βπππβπ‘ π π πππ πππππ‘β (π β π)
ο The second term
1
2
π π β π π π β π , ππ π‘βπ ππππ ππ π π‘πππππππ π€βππ π πππ π ππ π β π πππ π€βππ π βππβπ‘ ππ π π
β π π
ο This serve too reinforce a notion that in this method the area under curve f(x) is
approximated by the are of a trapezoid (rectangle + triangle).
ο This is more accurate than using rectangle to approximate the
the shape of the region under f(x).
ο Similar to other methods we have seen trapezoidal method accuracy
Can also be increased using composite method.
40. Composite Trapezoidal Method
ο The domain [a,b] is divided in to N intervals.
ο The integral in each subinterval is calculated with the Trapezoidal method , and the value of the
whole integral is obtained by adding the values of the integral in the subintervals.
ο The points include π₯1, π₯1, π₯3, β¦ π₯π+1 π€βπππ π₯1 = a and π₯π+1 = b
πΌ π =
π
π
π π₯ ππ₯ =
π₯1
π₯2
π π₯ ππ₯ +
π₯2
π₯3
π π₯ ππ₯ + β― +
π₯π
π₯π+1
π π₯ ππ₯ + β― +
π₯π
π₯π+1
π π₯ ππ₯
πΌ π =
π
π
π π₯ ππ₯ =
π=1
π
π₯π
π₯π+1
π π₯ ππ₯
Applying the trapezoidal rule to each subinterval [π₯π, π₯π+1]
πΌπ π =
π₯π
π₯π+1
π π₯ ππ₯ β
π ππ + π ππ+π
π
ππ+π β ππ
41. Composite Trapezoidal Method
ο Substituting the trapezoidal approximation in the right side of this equation
πΌ π = π
π
π π₯ ππ₯ = π=1
π
π₯π
π₯π+1
π π₯ ππ₯, gives
πΌ π =
π
π
π π₯ ππ₯ =
π=1
π
[π π₯π + π(π₯π+1)](π₯π+1 β π₯π)
The subintervals need not be identical or equally spaced, how ever if they have the same width
πΌ π =
π
π
π π₯ ππ₯ =
β
2
π=1
π
[π π₯π+1 + π π₯π ]
This can be further reduced to
πΌ π =
β
2
[π π + 2π π₯2 + 2π π₯3 + β― + 2π π₯π + π π ]
πΌ π =
β
2
π π + π π + β
π=2
π
π(π₯π)
42. Simpsonβs Method
ο Unlike Trapezoidal method which uses straight line, the integrand is
approximated with nonlinear function that can be easily integrated.
ο There are two classes
ο The one that uses quadratic (Simpsonβs 1/3 Method)
ο The other which uses Cubic polynomial (Simpsonβs 3/8 Method)
Simpsonβs 1/3 Method
ο In this method second order (quadratic) polynomial is used to approximate the
integrand.
ο The coefficients of quadratic polynomial can be determined from three points.
ο For an integral ovel the domain [a,b], the three points used are the two end
points x1=a and x3=b and the midpoint x2 = (a+b)/2 .
43. Simpsonβs 1/3 Method
ο The polynomial can be written in the form:
π π₯ = πΌ + π½ π₯ β π₯1 + πΎ(π₯ β π₯1)(π₯ β π₯2)
Where the πΌ π½ and πΎ are unknown constants evaluated from the condition that the
polynomial passes through the points, p(π₯1) = f(π₯1), p(π₯2) = f(π₯2), and p(π₯3) = f(π₯3),.
ο This conditions yield,
πΌ = π π₯1 , π½ =
π π₯2 β π π₯1
π₯2 β π₯1
, πππ πΎ =
π(π₯3) β 2π π₯2 + π(π₯1)
2(β)2
ο Where β = (π β π)/2
ο Substituting back the constants and integrating p(x) over the interval [a,b]
πΌ =
π₯1
π₯3
π π₯ ππ₯ =
π₯1
π₯3
π π₯ ππ₯ =
β
3
[π π₯1 + 4π π₯2 + π(π₯3)]
=
β
3
[π π + 4π
π + π
2
+ π(π)]
44. Simpsonβs 1/3 Method
ο The name 1/3 comes from the fact there is a factor 1/3 multiplying the expression in
brackets.
ο As with the rectangular and trapezoidal a more accurate evaluation of integral can be done
with composite Simpsonβs 1/3 Method/
Simpsonβs 1/3 Composite Method
πΌπ =
π₯πβ1
π₯π+1
π π₯ ππ₯ =
β
3
π π₯πβ1 + 4π π₯π + π π₯π+1
Substituting the same width h = π₯π+1 β π₯π = π₯π- π₯πβ1
πΌ π =
π₯1
π₯π+1
π π₯ ππ₯ =
β
3
π π + 4π π₯2 + π π₯3 + 4π 4 + β― + π π₯πβ1 + 4π π₯π + π π
This can be further reduced to
πΌ π =
π₯1
π₯π+1
π π₯ ππ₯ =
β
3
π π + 4
π=2,4,6
π
π π₯π + 2
π=3,5,7
πβ1
π π₯π + + π π π€βπππ β =
(π β π)
π
Simpsonβs 1/3 formula can be used only when this two conditions are satisfied
ο The Subintervals must be equally spaced
ο The number of subinterval within [a,b] must be even number
45. Simpsonβs 3/8 Method
ο In this method third order (Cubic) polynomial is used to approximate the integrand.
ο The coefficients of cubic polynomial can be determined from four points.
ο For an integral ovel the domain [a,b], the three points used are the two end points x1=a and
x4=b and the two points x2 and x3 are the two points used to divide the interval [a,b] in to
three equal parts.
π π₯ = πΆ3π3 + πΆ2π2 + πΆ1X+ πΆ0
Where πΆ3, πΆ2 , πΆ1 and πΆ0 are constants evaluated from the conditions that the polynomial passes
through the points p(π₯1) = f(π₯1), p(π₯2) = f(π₯2), p(π₯3) = f(π₯3), and p(π₯4) = f(π₯4). Once the constants
are determined, the polynomial can be easily integrated to give.
πΌ =
π
π
π π₯ ππ₯ =
π
π
π π₯ ππ₯ =
3β
8
[π π + 3π π₯2 + 3π π₯3 + π(π)]
The name came from the factor 3/8 multiplying the expression in the
bracket.
Note that the Simpsonβs 3/8 method integral equation is the weighted
addition at the two endpoint.
As with other methods, the accuracy of this method is also increased
By using composite method.
46. Simpsonβs 3/8 Composite Method
ο The domain [a,b] is divided in to N intervals.
ο Can be used for subinterval with that arbitrary width, but this derivation is done for those
subintervals with equal width , β = (πβπ)
π .
ο The points include π₯1, π₯1, π₯3, β¦ π₯π+1 π€βπππ π₯1 = a and π₯π+1 = b
ο Since three points are needed the Simpsonβs 3/8 method is applies to three adjacent
subintervals.
ο The whole subinterval has to be divided in to a number of subintervals that is divisible by 3.
ο The integral in each group of three subinterval is calculated with the Simpsonβs 3/8 Method
and the value of the whole integral is obtained by adding the values of the integral in the
subinterval groups.
47. Simpsonβs 3/8 Composite Method
Where the whole domain is divided by 12
πΌ π =
3β
8
{π π + 3[π π₯2 + π π₯3 + +π π₯5 + π π₯6 + +π π₯8 + π π₯9 + π π₯11 + +π π₯12 ] +
2[π 4 + π π₯7 + π π₯10 + π π ]
For the general case when the domain [a, b] is divided into N subintervals (where Nis at least 6 and
divisible by the above equation can be generalized to:
πΌ π =
3β
8
[π π + 3
π=
πβ1
[π π₯π + π π₯π+ π π₯12 ] + 2
π=
πβ1
π π₯π + π π ]
Simpsonβs 3/8 method can be used if the following conditions are met:
ο The subintervals are equally spaced
ο The number of subintervals within [a,b] must be divisible by 3.