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

## Problem 2

 Suppose there is a quadrature formula $\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 $f\!\,$ is a polynomial of degree $2n+1\!\,$ . Here the nodes $\{x_{j}\}_{j=1}^{n}\!\,$ are all distinct. Prove that the nodes lies in the open interval $(a,b)\!\,$ and the weights $w_{a},w_{b}\!\,$ and $\{w_{j}\}_{j=1}^{n}\!\,$ are positive.

## Solution 2

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

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

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

Let $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 $n>l\!\,$ .

Then

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

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

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

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