230 likes | 240 Views
Learn how to integrate functions without explicit antiderivatives using the Trapezoidal and Simpson's Rules. Explore derivations, errors, precision levels, and applications.
E N D
Sec:4.3 Elements of Numerical Integration
Sec:4.3 Elements of Numerical Integration How to integrate a definite integral of a function that has no explicit antiderivative or whose antiderivative is not easy to obtain. Example Approximate the integral using the Trapezoidal rule The Trapezoidal Rule
Sec:4.3 Elements of Numerical Integration Derivation for The Trapezoidal Rule using first Lagrange polynomials
Sec:4.3 Elements of Numerical Integration Error for The Trapezoidal Rule The Trapezoidal Rule Weighted Mean Value Theorem for Integrals Suppose f ∈ C[a, b], the Riemann integral of g exists on [a, b], and g(x) does not change sign on [a, b]. Then there exists a number c in (a, b) with The Weighted Mean Value Theorem for Integrals The Trapezoidal Rule
Sec:4.3 Elements of Numerical Integration Simpson’s Rule Example Approximate the integral using the Simpson’s rule It is exact
Sec:4.3 Elements of Numerical Integration Simpson’s Rule Derivation using second Lagrange polynomials Simpson’s Rule Deriving Simpson’s rule in this manner, however, provides only an error term involving 𝒇′′′ (𝝃).
Sec:4.3 Elements of Numerical Integration approaching the problem in another way, a higher-order term Third Taylor polynomial
Sec:4.3 Elements of Numerical Integration Using centered difference formaula for The Weighted Mean Value Theorem for Integrals
Sec:4.3 Elements of Numerical Integration Simpson’s Rule The Trapezoidal Rule f = @(x) x^2; a=0; b=2; h=(b-a)/2; x=a:h:b; integ = (h/3)*(f(x(1))+4*f(x(2))+f(x(3))) f = @(x) x^2; a=0; b=2; h=b-a; integ = (h/2)*(f(a)+f(b))
Sec:4.3 Elements of Numerical Integration Notice that in each instance Simpson’s Rule is significantly superior. Simpson’s Rule The Trapezoidal Rule
Sec:4.3 Elements of Numerical Integration Definition The degree of precision of a quadrature formula is n if and only if the error is zero for all polynomials but is not zero for the polynomial the Trapezoidal has degree of precision one The Trapezoidal Rule exact Also, it is clear from the error term (i.e exact not exact
Sec:4.3 Elements of Numerical Integration Definition The degree of precision of a quadrature formula is n if and only if the error is zero for all polynomials but is not zero for the polynomial Simpson’s Rule Simpson’s Rule has degree of precision three
Sec:4.3 Elements of Numerical Integration Definition The degree of precision of a quadrature formula is n if and only if the error is zero for all polynomials but is not zero for the polynomial
Sec:4.3 Elements of Numerical Integration Simpson’s Rule (3pts) The Trapezoidal Rule (2pts) Closed Newton-Cotes Formulas The (n+1)-point closed Newton-Cotes formula
Sec:4.3 Elements of Numerical Integration Closed Newton-Cotes Formulas The (n+1)-point closed Newton-Cotes formula where Theorem 4.2 There exists such that is odd is even the degree of precision is the degree of precision is Simpson’s Rule (3pts, n=2) The Trapezoidal Rule (2pts, n=1)
Sec:4.3 Elements of Numerical Integration n=1 : The Trapezoidal Rule The (n+1)-point closed Newton-Cotes formula n=2 : Simpson’s Rule It is called closed because the endpoints are included as nodes. n = 3: Simpson’s Three-Eighths rule n = 4:
Sec:4.3 Elements of Numerical Integration Open Newton-Cotes Formulas The open Newton-Cotes formulas do not include the endpoints as nodes. Open Newton-Cotes Formulas where
Sec:4.3 Elements of Numerical Integration Open Newton-Cotes Formulas where Theorem 4.2 There exists such that is odd is even n=1 : n=0 : The midpoint Rule
Sec:4.3 Elements of Numerical Integration Open Newton-Cotes Formulas n=0 : The midpoint Rule n=1 : n = 2: n = 3: