Explore BrainMass

Numerical integration using Simpson and Gaussian quadrature

This content was STOLEN from BrainMass.com - View the original, and get the solution, here!

With the specified accuracy integrate the function using Simpson's one-third rule and Gaussian quadrature:

Int_0^3 Int_{-1}^2 Int_1^4 e^x y^3 z^2 dxdydz,

where Int_a^b f(x)dx denotes the integral of the function f from a to b.

See the attached file.

© BrainMass Inc. brainmass.com September 21, 2018, 12:18 am ad1c9bdddf - https://brainmass.com/math/integrals/numerical-integration-using-simpson-gaussian-quadrature-515319


Solution Preview

Note that the triple integral:

int_0^3int_{-1}^2int_1^4 e^x y^3z^2dxdydz

splits as the product of 3 integrals
int_0^3int_{-1}^2int_1^4 e^x y^3z^2dxdydz=int_0^3z^2 dz int_{-1}^2y^3dyint_1^4 e^x dx.

We need to apply Simpson's rule to each integral. Remember that the error in approximating the integral int_a^b f(x)dx using
Simpson's rule with n intervals is bounded by


where Delta=(b-a)/n is the length of each sub-interval, and f^{(4)}(x) is the fourth derivative of f. Note that Simpson's
rule is exact for polynomials of degree 3 or less because then f^{(4)}(x)=0 for all x and therefore the error is zero,
independent of n, the number of divisions of [a,b]. Then we can calculate int_0^3z^2 dz and int_{-1}^2y^3d exactly
using Simpson's rule with n=2 (recall that n has to be even to use Simpson's rule), Delta_1=(3-0)/2=3/2,

int_0^3z^2 dz=)Delta/3) (0^2+4cdot(3/2)^2+ 3^2)=(1/2)(9+9)=9


Now for int_1^4 e^x dx, since the fourth derivative of e^x is e^x, the ...

Solution Summary

With specified accuracy, a numerical integration is performed using Simpson's rule and Gaussian quadrature. We use the upper bounds for the errors in the two numerical methods to obtain the required number of divisions of the interval of integration to fulfill the required accuracy. We use that the two methods are exact for polynomials of small degree.