Topic
Quadrature Rules
Courses
Courses whose questions include this topic tag.
Questions
This topic is tagged for 24 questions
-
Fall 2021 • Question 4
(Quadrature rules) Compute the weights \(\{A_0, A_1, B_0, B_1\}\) for a 4-point quadrature rule of the form \[ \int _0^1 f(x)\,dx \approx A_0 f(0) + A_1 f(1) + B_0 f'(0) + B_1 f'(1) \]
that is exact when \(f\) is any polynomial of degree 3 or less.
-
Spring 2018 • Question 3
Quadrature
Consider the quadrature rule \[ \int _{-1}^{1} f(x)\,dx \approx w_{-1}f(-1)+w_0f(0)+w_1f(1)+w_0'f'(0). \] Compute weights \(w_{-1}\), \(w_0\), \(w_1\), and \(w_0'\) such that this quadrature rule is exact for polynomials up to degree 3.
-
Fall 2017 • Question 3
**Numerical Integration** **a)** Establish a numerical integration formula of the form \[ \int_a^b f(x)\,dx \approx Af(a)+Bf'(b) \] that is accurate for polynomials of as high a degree as possible. **b)** Determine the quadrature formula of the form \[ \int_{-2}^{2} f(x)\,dx \approx A_0f(-1)+A_1f(0)+A_2f(1) \] that is accurate for polynomials of degree \(\le2\).
-
Fall 2016 • Question 4
**Interpolation and Integration:** **a)** Consider equally spaced points \(x_j=a+jh\), \(j=0,\ldots,n\) on the interval \([a,b]\), where \(nh=b-a\). Let \(f(x)\) be a smooth function defined on \([a,b]\). Show that there is a unique polynomial \(p(x)\) of degree \(n\) which interpolates \(f\) at all of the points \(x_j\). Derive the formula for the interpolation error at an arbitrary point \(x\) in the interval \([a,b]\): \[ f(x)-p(x)\equiv E(x) = \frac{1}{(n+1)!}(x-x_0)(x-x_1)\cdots(x-x_n)f^{n+1}(\eta). \] for some \(\eta\in[a,b]\). **b)** Let \(I_n(f)\) denote the result of using the composite Trapezoidal rule to approximate \[ I(f)\equiv \int_a^b f(x)\,dx \] using \(n\) equally sized subintervals of length \(h=(b-a)/n\). It can be shown that the integration error \(E_n(f)\equiv I(f)-I_n(f)\) satisfies \[ E_n(f)=d_2h^2+d_4h^4+d_6h^6+\cdots \] where \(d_2,d_4,d_6,\ldots\) are known numbers that depend only on the values of \(f\) and its derivatives at \(a\) and \(b\). Suppose you have a black-box program that, given \(f\), \(a\), \(b\), and \(n\), calculates \(I_n(f)\). Show how to use this program to obtain an \(O(h^4)\) approximation and an \(O(h^6)\) approximation to \(I(f)\).
-
Fall 2014 • Question 2
Consider the quadrature rule \[ \int _a^b w(x)f(x)dx = \sum _{j=1}^n w_jf(x_j)+E_n. \] Assume that \(w\) is a positive weight function. Discuss how to pick the knots \(x_1,\ldots ,x_n\) and weights \(w_1,\ldots ,w_n\) to make the error \(E_n\) zero for all polynomials \(f\) up to a degree as high as possible.
-
Spring 2012 • Question 3
Midpoint Rule
Derive error estimate for the midpoint rule in the form: \[ |E_n^M|\leq \frac {h^2(b-a)}{24} \max _{a\leq x\leq b}|f''(x)| \] Midpoint rule: \[ M_n(f)=h(f(x_1)+f(x_2)+\cdots +f(x_n)) \] where \(h=(b-a)/n\) and \[ x_j=a+\left (j-\frac {1}{2}\right )h,\qquad j=1,\ldots ,n \]
-
Fall 2011 • Question 3
**Trapezoidal Rule** a) State the formula for the composite trapezoidal rule \(I_n(f)\) to approximate the integral \(I(f)=\int_a^b f(x)dx\) b) Bound the error in \(I_n(f)\) applied to the following integral: \[ \int_0^{\pi/2}\cos(x)dx \] (You do not need to derive the error formula.)
-
Fall 2011 • Question 4
Numerical Quadrature
Show that there is no set of nodes \(x_1,x_2,\ldots ,x_n\) and coefficients \(\alpha _1,\alpha _2,\ldots ,\alpha _n\) such that the quadrature rule \[ \sum _{j=1}^n \alpha _j f(x_j) \] exactly equals to the integral \(\int _a^b f(x)w(x)dx\) for all polynomials \(f(x)\) of degree less than or equal to \(2n\). \(w(x)\) is the weight function.
-
Spring 2010 • Question 4
**Interpolation and Integration:** **a)** Consider equally spaced points \(x_j=a+jh\), \(j=0,\ldots,n\) on the interval \([a,b]\), where \(nh=b-a\). Let \(f(x)\) be a smooth function defined on \([a,b]\). Show that there is a unique polynomial \(p(x)\) of degree \(n+1\) which interpolates \(f\) at all of the points \(x_j\). Derive the formula for the interpolation error at an arbitrary point \(x\) in the interval \([a,b]\): \[ f(x)-p(x)\equiv E(x) = \frac{1}{(n+1)!}(x-x_0)(x-x_1)\cdots(x-x_n)f^{n+1}(\eta). \] for some \(\eta\in[a,b]\). **b)** Let \(I_n(f)\) denote the result of using the composite Trapezoidal rule to approximate \[ I(f)\equiv \int_a^b f(x)\,dx \] using \(n\) equally sized subintervals of length \(h=(b-a)/n\). It can be shown that the integration error \(E_n(f)\equiv I(f)-I_n(f)\) satisfies \[ E_n(f)=d_2h^2+d_4h^4+d_6h^6+\cdots \] where \(d_2,d_4,d_6,\ldots\) are numbers that depend only on the values of \(f\) and its derivatives at \(a\) and \(b\). Suppose you have a black-box program that, given \(f\), \(a\), \(b\), and \(n\), calculates \(I_n(f)\). Show how to use this program to obtain an \(O(h^4)\) approximation and an \(O(h^6)\) approximation to \(I(f)\).
-
Fall 2009 • Question 4
**Interpolation and Integration:** **a)** Consider equally spaced points \(x_j=a+jh\), \(j=0,\ldots,n\) on the interval \([a,b]\), where \(nh=b-a\). Let \(f(x)\) be a smooth function defined on \([a,b]\). Show that there is a unique polynomial \(p(x)\) of degree \(n+1\) which interpolates \(f\) at all of the points \(x_j\). Derive the formula for the interpolation error at an arbitrary point \(x\) in the interval \([a,b]\): \[ f(x)-p(x)\equiv E(x) = \frac{1}{(n+1)!}(x-x_0)(x-x_1)\cdots(x-x_n)f^{n+1}(\eta). \] for some \(\eta\in[a,b]\). **b)** Let \(I_n(f)\) denote the result of using the composite Trapezoidal rule to approximate \[ I(f)\equiv \int_a^b f(x)\,dx \] using \(n\) equally sized subintervals of length \(h=(b-a)/n\). It can be shown that the integration error \(E_n(f)\equiv I(f)-I_n(f)\) satisfies \[ E_n(f)=d_2h^2+d_4h^4+d_6h^6+\cdots \] where \(d_2,d_4,d_6,\ldots\) are numbers that depend only on the values of \(f\) and its derivatives at \(a\) and \(b\). Suppose you have a black-box program that, given \(f\), \(a\), \(b\), and \(n\), calculates \(I_n(f)\). Show how to use this program to obtain an \(O(h^4)\) approximation and an \(O(h^6)\) approximation to \(I(f)\).
-
Spring 2009 • Question 5
Adaptive Quadrature Describe the basic idea of adaptive quadrature, and give a simple example, including formulas.
-
Fall 2008 • Question 2
Gaussian Quadrature Let \(w\) be a positive weight function. Explain how to pick the knots \(x_i\) and the weights \(w_i\), \(i=1,\ldots ,n\) such that the integration formula \[ \int _a^b w(x)f(x)\,dx=\sum _{i=1}^n w_i f(x_i) \tag {2} \] is exact for polynomials \(f\) of degree as high as possible, and show why this works. How high a polynomial degree is possible?
-
Spring 2008 • Question 2
**Interpolation and Integration:** **a)** Consider equally spaced points \(x_j=a+jh\), \(j=0,\ldots,J+1\) on the interval \([a,b]\), where \((J+1)h=b-a\). Let \(f(x)\) be a function defined on \([a,b]\). Consider the problem of finding a cubic spline approximation \(s(x)\) to \(f(x)\) that interpolates \(f\) at the points \(x_j\); is twice continuously differentiable, and satisfies \(s''(a)=s''(b)=0\). Does this problem always have a solution? If your answer is yes, derive formulas by which to determine the spline. If your answer is no, explain your reasoning. **b)** Let \(I_n(f)\) denote the result of using the composite Trapezoidal rule to approximate \(I(f)=\int_a^b f(x)dx\) using \(n\) equally sized subintervals of length \(h=(b-a)/n\). It can be shown that the integration error \(E_n(f)=I(f)-I_n(f)\) satisfies \[ E_n(f)=d_2h^2+d_4h^4+d_6h^6+\cdots \] where \(d_2,d_4,d_6,\ldots\) are numbers that depend only on the values of \(f\) and its derivatives at \(a\) and \(b\). Suppose you have a black-box program that, given \(f\), \(a\), \(b\), and \(n\), calculates \(I_n(f)\). Show how to use this program to obtain an \(O(h^4)\) approximation and an \(O(h^6)\) approximation to \(I(f)\).
-
Fall 2007 • Question 3
**Interpolation and Integration** **a)** Consider equally spaced points \(x_j=a+jh\), \(j=0,\ldots,J+1\) on the interval \([a,b]\), where \((J+1)h=b-a\). Let \(f(x)\) be a function defined on \([a,b]\). Consider the problem of finding a cubic spline approximation \(s(x)\) to \(f(x)\) that interpolates \(f\) at the points \(x_j\), is twice continuously differentiable, and satisfies \(s''(a)=s''(b)=0\). Does this problem always have a solution? If your answer is yes, derive formulas by which to determine the spline. If your answer is no, explain your reasoning. **b)** Let \(I_n(f)\) denote the result of using the composite Trapezoidal rule to approximate \[ I(f)\equiv \int_a^b f(x)\,dx \] using \(n\) equally sized subintervals of length \(h=(b-a)/n\). It can be shown that the integration error \(E_n(f)\equiv I(f)-I_n(f)\) satisfies \[ E_n(f)=d_2h^2+d_4h^4+d_6h^6+\cdots \] where \(d_2,d_4,d_6,\ldots\) are numbers that depend only on the values of \(f\) and its derivatives at \(a\) and \(b\). Suppose you have a black-box program that, given \(f\), \(a\), \(b\), and \(n\), calculates \(I_n(f)\). Show how to use this program to obtain an \(O(h^4)\) approximation and an \(O(h^6)\) approximation to \(I(f)\).
-
Spring 2006 • Question 3
Numerical Quadrature Consider the quadrature formula \[ \int _a^b w(x)f(x)\,dx=\sum _{i=1}^n \alpha _i f(\xi _i)+E, \] for the integral of \(f\) with a given positive weight function \(w(x)>0\). We would like to use \(n\) knot values \((f(\xi _i), i=1,\ldots ,n)\) to achieve the exact integral if \(f\) is a polynomial of degree up to \(2n-1\).
(a) Start from the special case \(a=-1\), \(b=1\) and \(w(x)=1\), define the orthogonal polynomials over \([-1,1]\).
(b) Use those orthogonal polynomials and polynomial division to simplify the integral. How would you pick the knots \(\xi _i\) and the weights \(\alpha _i\) such that the formula is exact (i.e., \(E=0\)) for all polynomials of degree up to \(2n-1\)? Verify that your choice works.
(c) Show that you can extend the approach to more general integrals, with arbitrary \(a<b\) and positive weight function \(w\).
-
Fall 2005 • Question 6
Interpolation and Integration
a) Consider equally spaced points \(x_j=a+jh\), \(j=0,\ldots ,J+1\) on the interval \([a,b]\), where \((J+1)h=b-a\). Let \(f(x)\) be a function defined on \([a,b]\). Consider the problem of finding a cubic spline approximation \(s(x)\) to \(f(x)\) that interpolates \(f\) at the points \(x_j\), is twice continuously differentiable, and satisfies \(s''(a)=s''(b)=0\). Does this problem always have a solution? If your answer is yes, derive formulas by which to determine the spline. If your answer is no, explain your reasoning.
b) Let \(I_n(f)\) denote the result of using the composite Trapezoidal rule to approximate \[ I(f)=\int _a^b f(x)\,dx \] using \(n\) equally sized subintervals of length \(h=(b-a)/n\). It can be shown that the integration error \(E_n(f)=I(f)-I_n(f)\) satisfies \[ E_n(f)=d_2h^2+d_4h^4+d_6h^6+\cdots \] where \(d_2,d_4,d_6,\ldots \) are numbers that depend only on the values of \(f\) and its derivatives at \(a\) and \(b\). Suppose you have a black-box program that, given \(f\), \(a\), \(b\), and \(n\) calculates \(I_n(f)\). Show how to use this program to obtain an \(O(h^4)\) approximation and an \(O(h^6)\) approximation to \(I(f)\).
-
Winter 2004 • Question 3
Gaussian Quadrature Consider the quadrature formula \[ \int _a^b w(x)f(x)\,dx=\sum _{i=1}^n \alpha _i f(\xi _i)+E. \tag {5} \] \(w\) is a given positive weight function. How do you pick the knots \(\xi _i\) and the weights \(\alpha _i\) such that the formula is exact (i.e., \(E=0\)) for all polynomials of degree up to \(2n-1\)? Show that your choice works and that you can find suitable weights and knots for all intervals \([a,b]\) and positive weight functions \(w\).
-
Winter 2004 • Question 6
ODEs Consider the initial value problem of ODEs: \[ y'=f(x,y),\qquad y(a)=y_0. \tag {10} \] Describe the Trapezoidal Rule applied to this problem and analyze its local accuracy and its region of absolute stability.
-
Fall 1999 • Question 1
Quadrature Consider the quadrature formula \[ \int _a^b w(x)f(x)\,dx=\sum _{i=0}^n \alpha _i f(\xi _i)+E. \tag {1} \] \(w\) is a given positive weight function. The knots \(\xi _i\) and the weights \(\alpha _i\) are at your disposal. How do you choose them so that the error \(E\) is 0 for all polynomials \(f\) of degree as high as possible? How high is possible? Give reasons for your answers.
-
1996 • Question 4
**Condition Number.** What is the condition number of a square matrix \(A\)? Suppose you solve a linear system \(Ax=b\). How do you use the condition number to gauge the accuracy of your numerical solution? Give a formula. **Math 662: Interpolation, Quadrature, Approximation, Nonlinear Systems, Optimization.**
-
1996 • Question 5
Gaussian Quadrature. What is Gaussian quadrature? How do you pick the weights and knots? Why?
-
Fall 1994 • Question 3
Compare the stability of the Euler Predictor-Trapezoidal Corrector and Backwards Euler timestepping methods for solution of the heat equation \[ u_t=u_{xx}\qquad u(x,0)=u_0(x) \] using the centered second difference operator \[ u_j \to \frac {u_{j+1}-2u_j+u_{j-1}}{h^2}\qquad j=1,\ldots ,J \] where \(u_j\approx u(jh)\) on the interval \([0,2\pi ]\) with periodic boundary conditions, and mesh-size \(h=2\pi /J\). Discuss the accuracy of these methods?
-
Fall 1994 • Question 4
a) What set of four nonlinear equations are satisfied by the nodes and weights for Gaussian quadrature with degree of precision 3, on the interval \([0,1]\).
b) Describe Newton’s method as applied to solving this system of equations.
c) Show how and why the weights and nodes for Gaussian quadrature may be modified from the standard interval to an arbitrary interval.
-
Fall 1994 • Question C2
Find the Green’s function for the Poisson equation \(\Delta u=f\) in the infinite strip \(0\le y\le 1\), \(-\infty <x<\infty \) with boundary data \(u(x,0)=0\) and \(u(x,1)=1\). Then solve the problem (in quadrature) if \(f(x,y)=y(1-y)e^{-x^2}\).