MATH 417 Lecture 10
« previous | Thursday, February 13, 2014 | next »
Section 4.3: Numerical Integration
If we have a function that is impossible (or really hard) to integrate exactly on an interval , we can estimate the integral based on the values of at points .
- Choose a partition of the interval →
- Pick
- Form the riemann sum .
We usually define partition intervals by a diameter . The Riemann integral, if it exists, is the limit of the sum as .
In practice, we approximate with a polynomial , and then integrate the polynomial:
Our error is going to be 0 if is a polynomial of degree .
We can get an upper bound on this error by approximating . Hence
For equidistant points, this bound can be better estimated by
- Construct a numerical rule which is exact for degree at most
- Find the degree of accuracy[1] of the rule
Quadrature Rule
Given ,
Thus
In a simple case where and , we get the trapezoid rule.
The degree of accuracy is between and .
To find 's, we can set up a linear system instead of integrating the Lagrange polynomials
Change of Variables
Suppose we have a rule for when . We can scale the rule to fit an arbitrary interval as follows:
, where is a polynomial of the same degree:
Performing a substitution in the integral gives Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \int_{-1}^1 g(y(x)) \, y'(x) \,\mathrm{d}x}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y'(x) = \frac{b-a}{2}}
This integral can now be approximated by Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle B_0 \, g(y(-1)) + B_1 \, g(y(0)) + B_2 \, g(y(1))} , where
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle B_j = \frac{b-a}{2} \, A_j}
Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \begin{align} f(x) &= 1 + x + x^2 \\ g(y) &= 1 + \frac{y+1}{2} + \left( \frac{y+1}{2} \right)^2 \end{align}}
If Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \int_{a}^{b} f(x) \,\mathrm{d}x = \sum_{j=0}^n A_j \, f(x_j)} for Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle f(x) = 1, x, x^2, \ldots, x^4} , then it is also exact for Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p(x)} of degree Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \le n} .
Take Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \int_{a}^{b} f(x) \,\mathrm{d}x = \int_{a}^{b} \sum_{k=0}^n c_k \, x^k = \sum_{k=0}^n c_k \, \int_{a}^{b} x^k \,\mathrm{d}x = \sum_{k=0}^n c_k \, \sum_{j=0}^n A_j \, x_j^k = \sum_{k=0}^n \sum_{j=0}^n A_j \, c_k \, x_j^k = \sum_{j=0}^n A_j \sum_{k=0}^n c_k \, x_j^k = \sum_{j=0}^n A_j \, f(x_j)}
Footnotes
- ↑ the degree of accuracy is the largest polynomial degree for which Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \int_a^b f(x) \,\mathrm{d}x = Q(f)}