# Numerical Methods Qualification Exam Problems and Solutions (University of Maryland)/August 2002

## Problem 2

 Suppose there is a quadrature formula ${\displaystyle \int _{a}^{b}f(x)dx\approx w_{a}f(a)+w_{b}f(b)+\sum _{j=1}^{n}w_{j}f(x_{j})\!\,}$  which produces the exact integral whenever ${\displaystyle f\!\,}$  is a polynomial of degree ${\displaystyle 2n+1\!\,}$ . Here the nodes ${\displaystyle \{x_{j}\}_{j=1}^{n}\!\,}$  are all distinct. Prove that the nodes lies in the open interval ${\displaystyle (a,b)\!\,}$  and the weights ${\displaystyle w_{a},w_{b}\!\,}$  and ${\displaystyle \{w_{j}\}_{j=1}^{n}\!\,}$  are positive.

## Solution 2

### All nodes lies in (a,b)

Let ${\displaystyle \{x_{i}\}_{i=1}^{l}\!\,}$  be the nodes that lie in the interval ${\displaystyle (a,b)\!\,}$ .

Let ${\displaystyle q_{l}(x)=\prod _{i=1}^{l}(x-x_{i})\!\,}$  which is a polynomial of degree ${\displaystyle l\!\,}$ .

Let ${\displaystyle p_{n}(x)=\prod _{i=1}^{n}(x-x_{i})=q_{l}(x)\prod _{i=1}^{n-l}(x-x_{i})\!\,}$  which is a polynomial of degree ${\displaystyle n>l\!\,}$ .

Then

${\displaystyle \langle p_{n},q_{l}\rangle =\int _{a}^{b}q_{l}^{2}(x)\underbrace {\prod _{i=1}^{n-l}(x-x_{i})} _{r(x)}\neq 0\!\,}$

since ${\displaystyle r(x)\!\,}$  is of one sign in the interval ${\displaystyle (a,b)\!\,}$  since for ${\displaystyle i=1,2,\ldots n-l\!\,}$ , ${\displaystyle x_{i}\not \in (a,b).\!\,}$

This implies ${\displaystyle q_{l}\!\,}$  is of degree ${\displaystyle n\!\,}$  since otherwise

${\displaystyle \langle p_{n},q_{l}\rangle =0\!\,}$

from the orthogonality of ${\displaystyle p_{n}\!\,}$ .