Question: Repeat Example 8.7 for Gauss quadrature using Program 8.8. Example 8.8 Use the multiple trapezoidal rule to determine how the error in the integral depends

Repeat Example 8.7 for Gauss quadrature using Program 8.8.


Example 8.8

Use the multiple trapezoidal rule to determine how the error in the integral= 1/2 s  xdx (8.4.8)

depends on the number of trapezoids.


Example 8.7

To test our claim about the accuracy of these methods, use Program 8.4 to calculate the integral+Df xdx I = (m + 1) (8.3.22)

which we know has the value I = 1 for any positive integer m.


Program 8.4

We can write a nice compact program that allows us to integrate some function f (x) using a particular order of the Newton–Coates formula by taking advantage of the switch operator, which is a useful alternative to implementing many if-else statements.1 function out = integrate_Newton_Coates (a, b, n) % a = lower bound of integral 2 3 % b = upper bound of

= 1/2 s xdx (8.4.8)

Step by Step Solution

3.50 Rating (153 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

For Gauss quadrature we expect the integral to be exact up to a polynomial of order ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Numerical Methods With Chemical Engineering Applications Questions!