Chapter 6: Techniques of Integration
Section 6.7: Numeric Methods
Use Simpson's rule with n=10 to approximate the definite integral ∫141+sinxlnx+1 ⅆx.
Define fx=1+sinxlnx+1, and let h=4−110=310. Then
≐3/103f1+f4+2∑k=14f1+3102 k+4∑k=15f1+3102 k−1
Of course, a computing device of some sort is used to evaluate and sum the terms in the Trapezoid rule.
Evaluation via Maple's built-in numeric integrator
Control-drag the given definite integral.
Context Panel: 2-D Math≻Convert To≻Inert Form
Context Panel: Approximate≻10 (digits)
∫141+sinxlnx+1 ⅆx→at 10 digits5.078061188
Maple's built-in Simpson's rule can be accessed either through the Approximate Integration tutor or through the ApproximateInt command in the Student Calculus1 package.
Figure 6.7.4(a) shows the state of the
tutor when Simpson's rule has been selected for approximating the given integral with n=10.
With n=10, Simpson's rule groups the nodes to form five subintervals with one node at the center of each such subinterval. If the Partition type were set to "Subintervals," then each of the ten subintervals xk,xk+1 would support a panel in which a new point at the center of the subinterval would be introduced. This would not be consistent with the formula for Simpson's rule given in Table 6.7.1.
Figure 6.7.4(a) Approximate Integration tutor
The use of the ApproximateInt command for obtaining this result is illustrated in Table 6.7.4(a).
Tools≻Load Package: Student Calculus 1
Context Panel: Assign to a Name≻F
1+sinxlnx+1→assign to a nameF
Apply the ApproximateInt command with output set to value, and the right endpoint a float
ApproximateIntF,x=1..4.0,partition=10,method=simpson,partitiontype=normal = 5.078118675
Table 6.7.4(a) Using the ApproximateInt command to implement Simpson's rule in Maple
Simpson's rule is implemented from first principles in Table 6.7.4(b). The integrand is defined as the function fx; and the stepsize, as h. The endpoints of the interval are written as floats so that the evaluation of the sum is numeric, and not symbolic.
Context Panel: Assign Function
fx=1+sinxlnx+1→assign as functionf
Context Panel: Assign Name
Evaluate and Display Inline
h3f1.+f4.+2∑k=14f1.+2 k h+4∑k=15f1.+2 k−1 h = 5.078118673
Table 6.7.4(b) Implementing Simpson's rule from first principles
<< Previous Example Section 6.7
Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2021. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document
What kind of issue would you like to report? (Optional)