CSC_349_HANDOUT#29

CSC_349_HANDOUT#29 - use the Trapezoidal rule with h = 0.12...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
1 COMPUTER SCIENCE 349A Handout Number 29 USE OF NEWTON-COTES CLOSED QUADRATURE FORMULAS ON DISCRETE DATA AT UNEQUALLY SPACED POINTS (Section 21.3) Consider the data given in Table 21.3 on p. 605 of the 5 th ed. or p. 622 of the 6 th ed. 456000 . 2 40 . 0 232000 . 0 80 . 0 074903 . 2 36 . 0 363000 . 2 70 . 0 743393 . 1 32 . 0 181929 . 3 64 . 0 305241 . 1 22 . 0 507297 . 3 54 . 0 309729 . 1 12 . 0 842985 . 2 44 . 0 200000 . 0 0 . 0 ) ( ) ( x f x x f x As the data is not specified at equally-spaced points x , no fixed Newton-Cotes formula for a small value of n can be used to approximate the integral of the continuous, but unknown, function ) ( x f that is represented by this data. This data could be interpolated by a polynomial of degree 10, but such high order Newton-Cotes formulas should be avoided. Instead, for example, you could do the following:
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: use the Trapezoidal rule with h = 0.12 on [0.0, 0.12] use Simpsons rule with h = 0.10 on [0.12, 0.32] use Simpsons 3/8 rule with h = 0.04 on [0.32, 0.44] use Simpsons rule with h = 0.10 on [0.44, 0.64] use the Trapezoidal rule with h = 0.06 on [0.64, 0.70] use the Trapezoidal rule with h = 0.10 on [0.70, 0.80] This is done in Example 21.8 on page 606 of the 5 th ed. or page 623 of the 6 th ed., and yields a computed approximation to 80 . . ) ( dx x f of 1.603641 . In this case, the given data was obtained by sampling a known function, and the correct value of the integral is 1.640533 ....
View Full Document

Ask a homework question - tutors are online