2

Suppose you have $w(x)= 1/\sqrt{x}$ as your weight function, and the integration of the form $\int_0^1 f(x) w(x) dx$. I am tasked with creating a quadrature of exactness 3. So I know I need a polynomial with degree $n=2$, and that I need to map the interval to the interval $[-1,1]$.

So far, I think I need to use a Lagrange polynomial degree two, so I decided to use $p_2(x)=x^2 -1/3$. I can remap it as follows:

$$\int_0^1 f(x) \, dx =\int_{-1}^1 f\left( \frac{t + 1}{2} \right) \frac{1}{2} \, dt$$

The error term then should be $$\frac{f^{(4)}(\xi)}{4!} \int_0^1 p_2^2(x) w(x) \, dx$$

And this is the point where I get stuck. So I have the polynomial $p_2$, and I know how to remap it to the right interval, but how do I go on from here to construct the quadrature?

  • Something's not quite right. What you call a "Lagrange polynomial" is actually a rescaled Legendre polynomial with n=2. The Legendre polynomial is associated with a weight function $w=1$, not $w=1/\sqrt{x}$. – user_of_math Nov 20 '14 at 03:35
  • Any suggestions on finding the rescaled polynomial associated with my $w(x)$? – Michael Senter Nov 20 '14 at 04:36

1 Answers1

0

The plan is to use Gram-Schmidt to create orthogonal polynomials, as is described in the answer here. In that question, the weighting function was $w(x)=\frac{1}{1+x^2}$ but the mechanics are the same.

Starting with $p_0(x)=1$ we can calculate the next two iteratively $$ p_1(x)=x-\frac{1}{3}\\ p_2(x)=x^2-\frac{6}{7}x +\frac{3}{35}. $$ To achieve an exact quadrature for third order polynomials, this is all that is needed. For $N-1$ Gaussian type quadrature, the abscissa are chosen to be the roots of the $N^\textrm{th}$ orthogonal polynomial. In this case, $N=2$ and the abscissa are $x_i\in \left\{\frac{2}{35}\sqrt{30} \mp \frac{3}{7} \right\}$.

Armed with the abscissa and polynomials, the next step is to solve the tower equations to determine the weights $$ \sum_{i=0}^1 p_n(x_i)w_i = 2\delta_{n,0} $$ where the constant $2$ came from the normalization of $p_0(x)$, $\int_0^1\frac{p_0^2(x)}{\sqrt{x}}dx = \int_0^1\frac{1}{\sqrt{x}}dx=2$ This leads to the matrix equation $$ \left[\begin{array}{cc} 1 & 1 \\ \frac{2}{21}-\frac{2}{35}\sqrt{30} & \frac{2}{21}+\frac{2}{35}\sqrt{30} \end{array}\right] \left[\begin{array}{c} w_0\\ w_1 \end{array}\right] =\left[\begin{array}{c} 2\\ 0 \end{array}\right] $$ which has solution $w_i\in \left[1\pm\frac{1}{18}\sqrt{30} ​\right]$.

This was verified by a small Sagemath (iPython) routine:

def gqsqrt(f):
    xi = vector([-2*sqrt(30)/35 + 3/7, 2*sqrt(30)/35 + 3/7])
    wi = vector([1+sqrt(30)/18,1-sqrt(30)/18])
    fncall = vector([f(x) for x in xi])
    return expand(wi.dot_product(fncall))
Tom Davis
  • 828