${}$
Evaluation via Maple's builtin numeric integrator

•

Controldrag the given definite integral.

•

Context Panel: 2D Math≻Convert To≻Inert Form

•

Context Panel: Approximate≻10 (digits)


${{\int}}_{1}^{4}\left(1\+\mathrm{sin}\left(\sqrt{x}\mathrm{ln}\left(x\+1\right)\right)\right){\mathit{DifferentialD;}}x$$\stackrel{\text{at 10 digits}}{\to}$${5.078061188}$



Maple's builtin 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 $\left[{x}_{k}\,{x}_{k\+1}\right]$ 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).
${}$
Initialize

•

Tools≻Load Package: Student Calculus 1


Loading Student:Calculus1

Context Panel: Assign to a Name≻$F$

$1\+\mathrm{sin}\left(\sqrt{x}\mathrm{ln}\left(x\+1\right)\right)$$\stackrel{\text{assign to a name}}{\to}$${F}$

Apply the ApproximateInt command with output set to value, and the right endpoint a float

$\mathrm{ApproximateInt}\left(F\,x\=1..4.0\,\mathrm{partition}\=10\,\mathrm{method}\=\mathrm{simpson}\,\mathrm{partitiontype}\=\mathrm{normal}\right)$ = ${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 $f\left(x\right)$; 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


$f\left(x\right)\=1\+\mathrm{sin}\left(\sqrt{x}\mathrm{ln}\left(x\+1\right)\right)$$\stackrel{\text{assign as function}}{\to}$${f}$

•

Context Panel: Assign Name


$h\=\frac{41}{10}$$\stackrel{\text{assign}}{\to}$

•

Context Panel:
Evaluate and Display Inline${}$


$\frac{h}{3}\left(f\left(1.\right)\+f\left(4.\right)\+2\sum _{k\=1}^{4}f\left(1.\+2kh\right)plus;4\sum _{kequals;1}^{5}f\left(1.plus;\left(2k1\right)h\right)\right)$ = ${5.078118673}$${}$

Table 6.7.4(b) Implementing Simpson's rule from first principles



${}$