MAT E 460 ENGINEERING COMPUTATION LABORATORY

Numerical Integration

 

Many important engineering calculations involve numerical integration.

Compute the integral

.

Then integrate numerically the same integral using the trapezoid or the Simpson rule.

Use Maple. Once you verify that your algorithm works, set the accuracy of calculations to 5 digits (Digits:=5)
Then, compute the relative error of the integration as a function of the number of points N used for the integration (use N=2^k, k=1,15). Repeat for Digits:=7.

Comment on the behavior of the error, i.e, plot the error as a function of N for both Digits:=5 and Digits:=7 and compare.

EXTA CREDIT FOR MATE460 (Part of the work for MATE535):
How do we decide about the "best" value of N?
Your answer here should not be specific for sin(x) but for any function that you integrate.
Check for example 2000*sin(2000.5*x) instead of sin(x).