Introduction to Numerical Analysis I
MATH/CMPSC 455
Numerical Integration
NUMERICAL INTEGRATION
Mathematical Problem:
Example:
Example:
By calculus, find that , then use
Numerical Integration: replace by another function that approximates well and is easily integral, then we have
NEWTON-COTES FORMULASIdea: use polynomial interpolation to find the approximation function
Step 1: Select nodes in [a,b] Step 2: Use Lagrange form of polynomial interpolation to find the approximation function
Step 3:
TRAPEZOID RULEUse two nodes: and
SIMPSON’S RULEUse three nodes:
Example: Apply the Trapezoid Rule and Simpson’s Rule to approximate
Example: Apply the Trapezoid Rule and Simpson’s Rule to approximate
Error of the trapezoid rule:
The trapezoid rule is exact for all polynomial of degree less than or equal to 1.
Error of the Simpson’s rule:
The Simpson’s rule is exact for all polynomial of degree less than or equal to 3.
THE COMPOSITE TRAPEZOID RULE
Why? ? The high order polynomial interpolations are unbounded!
Step 1: Partition the interval into n subintervals by introducing points Step 2: Use the trapezoid rule on each subinterval
Step 3: Sum over all subintervals
THE COMPOSITE SIMPSON’S RULE
ERROR OF COMPOSITE RULES
Error of the composite trapezoid rule:
Error of the composite Simpson’s rule:
Example: Apply the composite Trapezoid Rule and Simpson’s Rule ( 4 subintervals ) to approximate