شوف هذا الموقع يمكن بفيدك
وهذه نبذة مما رأيته
[SIZE=+1]Module[/SIZE] [SIZE=+1]for[/SIZE]
[SIZE=+1]2D Integration using the Trapezoidal and Simpson Rules[/SIZE]
Background
The trapezoidal rule and Simpson's rule for ordinary integrals can be extended to multiple integrals.
Theorem (Trapezoidal 2D Rule) Consider
over the rectangle
. Given that the interval is subdivided into subintervals of equal width by using the equally spaced sample points for . Also, assume that the interval is subdivided into subintervals of equal width by using the equally spaced sample points for .
The composite Trapezoidal rule is
where
It can be shown that the error term is of the form
, that is
.
Remark. The Trapezoidal rule had the pattern of weights
and the Trapezoidal 2D rule extends this pattern to a grid in the rectangle
R.
Proof 2D Trapezoidal and Simpson Rules 2D Trapezoidal and Simpson Rules
Theorem (Simpson's 2D Rule) Consider over the rectangle
. Given that the interval is subdivided into subintervals of equal width by using the equally spaced sample points for . Also, assume that the interval is subdivided into subintervals of equal width by using the equally spaced sample points for .
The composite Simpson's rule is
where
It can be shown that the error term is of the form
, that is
.
Remark. Simpson's rule had the pattern of weights
and Simpson's 2D rule extends this pattern to a grid in the rectangle
R.
Proof 2D Trapezoidal and Simpson Rules 2D Trapezoidal and Simpson Rules
Computer Programs 2D Trapezoidal and Simpson Rules 2D Trapezoidal and Simpson Rules
Mathematica Subroutine (Trapezoidal 2D Rule). Object oriented programming.
Mathematica Subroutine (Simpson 2D Rule). Object oriented programming.
Example 1. Use the composite Simpson's rule for multiple integrals to numerically approximate the iterated integral
.
Remark. This is the volume of the solid bounded by the surface
, that lies above the square
in the xy-plane.
Solution 1.
Example 2. Find the analytic solution to the iterated integral
.
Solution 2.
Example 3. How good are the Trapezoidal rule approximations to
that were calculated in Example 1?
Solution 3.
Example 4. Use the composite Simpson's rule for multiple integrals to numerically approximate the iterated integral
.
Remark. This is the volume of the solid bounded by the surface
, that lies above the square
in the xy-plane.
Solution 4.
Example 5. How good are the Simpson's rule approximations to
that were calculated in Example 4?
Solution 5.
Example 6. Compare the 2D Trapezoidal and 2D Simpson rule approximations to
that were calculated in Examples 1 and 4?
Solution 6.
More Background
Suppose we wish to numerically approximate the integral
, where the limits of integration on the inside integral are functions of
x. This can be accomplished as follows.
First, apply Simpson's rule using m subintervals of
to
f[x,y] and define the result as the function
F[x].
Second, apply Simpson's rule using n subintervals of
to
F[x].
Remark. To make
F[x] "look like a function of
x" we shall fix the number of vertical subdivisions "m" in a global variable. Use the following two
Mathematica subroutines.
Example 7. Use the composite Simpson's rule for multiple integrals to numerically approximate the iterated integral
.
Solution 7.
Old Lab Project (Simpson's Rule for 2D Simpson's Rule for 2D). Internet hyperlinks to an old lab project.
[SIZE=+1]
Research Experience for Undergraduates[/SIZE]
Trapezoidal Rule for Numerical Integration Trapezoidal Rule for Numerical Integration Internet hyperlinks to web sites and a bibliography of articles.
Simpson's Rule for Numerical Integration Simpson's Rule for Numerical Integration Internet hyperlinks to web sites and a bibliography of articles.
Download this Mathematica Notebook2D Integration using the Trapezoidal and Simpson Rules
Return to Numerical Methods - Numerical Analysis