![]() CATEGORIES: BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism |
Part 2. Numerical IntegrationTABLE 2.1 Important integration formulas
* Example 1 Suppose we want to evaluate the integral
Solution. n = 4(h = 2.5) a)Use it in conjunction with Left sum approximation to integrate the same function for four subintervals:
The numerical error and the true percent relative error are:
b)Using Right sum approximation:
c)Using Trapezoidal Rule (four subintervals):
d)Using Simpson's 1/3 Rule (four subintervals):
Example 2 Suppose we want to evaluate the following double integral:
For the numerical evaluations use both the trapezoidal and Simpson's 1/3 rules. For both cases, use the multiple-application version, with n = 4. Compute percent relative errors for the numerical results. Solution. a) Analytically the actual value can be easily obtained as follows: b)Numerical integration with n = 4:(hx = 1.0; hy = 2.0) c)Use it in conjunction with Trapezoidal Rule to integrate the same function for four subintervals:
d)Using Simpson's 1/3 Rule:
Note: · Trapezoidal rule gives the exact value of the integral for linear polynomials; · The Simpson's rule gives the exact value of the integral for polynomials of degree three or less; · An even number subintervals must be utilized to the Simpson's rule; · As the number of subintervals increases, the approximations get better.
Problems 1. Integrate the following function both analytically and numerically.
For the numerical evaluations use: (a) left sum approximation, 2. Integrate the following function:
Note that the true value is I = 0.602297. Use both the trapezoidal and Simpson's 1/3 rules to numerically integrate the function with n = 4. 3. Evaluate the triple integral (a) analytically, and (b)using Simpson's 1/3 rule with n = 4. 4. Integrate the following function both analytically and numerically.
For the numerical evaluations use: (a) midpoint approximation, A random sample (
For all cases use version with n = 10. Compute percent relative errors for the numerical results. Discuss your results. 5. The function can be used to generate the following table of unequally spaced data:
Evaluate the integral from a = 0 to b = 0.54 using: (a)analytical means, (b)left sum approximation, (c)right sum approximation, and (d)the trapezoidal rule. For (b), (c)and (d),compute the percent relative error (
Date: 2016-01-14; view: 1937
|