You are on page 1of 11

Course: Numerical Methods

Instructor: Adnan Aslam

March 31, 2021

Adnan Aslam Course: Numerical Methods March 31, 2021 1 / 11


Elements of Numerical Integration
• The need often arises for evaluating the definite integral of a function
that has no explicit antiderivative or whose antiderivative is not easy
to obtain.
• The basic method involved in approximating ab f (x)dx is called
R

numerical quadrature.
• It uses a ni=0 ai f (xi ) to approximate ab f (x)dx.
P R

Adnan Aslam Course: Numerical Methods March 31, 2021 2 / 11


Cubic Splines
• The most common piecewise-polynomial approximation uses cubic
polynomials between each successive pair of nodes and is called cubic
spline interpolation.
• A general cubic polynomial involves four constants, so there is
sufficient flexibility in the cubic spline procedure to ensure that the
interpolant is not only continuously differentiable on the interval, but
also has a continuous second derivative.
• The construction of the cubic spline does not, however, assume that
the derivatives of the interpolant agree with those of the function it is
approximating, even at the nodes.

Adnan Aslam Course: Numerical Methods March 31, 2021 3 / 11


The Trapizoidal Rule

Adnan Aslam Course: Numerical Methods March 31, 2021 4 / 11


The Trapizoidal Rule

Adnan Aslam Course: Numerical Methods March 31, 2021 5 / 11


Simpson’s Rule

Adnan Aslam Course: Numerical Methods March 31, 2021 6 / 11


Simpson’s Rule

Adnan Aslam Course: Numerical Methods March 31, 2021 7 / 11


Example

Adnan Aslam Course: Numerical Methods March 31, 2021 8 / 11


Adnan Aslam Course: Numerical Methods March 31, 2021 9 / 11
Measuring Precision
• The degree of accuracy, or precision, of a quadrature formula is the
largest positive integer n such that the formula is exact for x k , for
each k = 0, 1, ..., n.
• This implies that the Trapezoidal and Simpson’s rules have degrees of
precision one and three, respectively
• The degree of precision of a quadrature formula is n if and only if the
error is zero for all polynomials of degree k = 0, 1, ..., n, but is not
zero for some polynomial of degree n + 1.

Adnan Aslam Course: Numerical Methods March 31, 2021 10 / 11


Closed Newton-Cotes formulas

Exercise 4.3 Questions 1-8.


Adnan Aslam Course: Numerical Methods March 31, 2021 11 / 11

You might also like