TransWikia.com

Find quadrature points and weights

Computational Science Asked by lukk on December 10, 2020

I’m struggling with the following problem:

What is the maximum degree of exactness that we can obtain with the following quadrature >formula
$$int_0^1 f(x)frac{1}{sqrt{x}}dx approx w_0 f(x_0) + w_1 f(x_1)$$

Compute weights and nodes

I should use some theorem, but I can’t understand which one! Also, I think that the maximum degree is $r=3$, because in this case, imposing the exactness I will end up with a system of $4$ equations in $4$ unknowns.

I choose a basis of $mathbb{P}^{3} = {1,x,x^2,x^3}$, and I obtain

begin{cases}
w_0+w_1 = 2
w_0x_0 + w_1x_1 = frac23
w_0x_0^2 + w_1x_1^2 = frac25
w_0 x_0^3 + w_1 x_1^3 = frac27
end{cases}

but the solution seems too hard to do by hand. Am I missing something? How can I decide a priori the degree of exactness.

One Answer

You need to use the so called Gauss–Jacobi quadrature with $alpha = 0$ and $beta = -frac{1}{2}$. If you look at the error term, you see that you can integrate exactly for a degree up to $2n-1$ with a $n$ points scheme.

EDIT to truly answer your question.

You want to use this theorem about Gaussian quadrature, theorem 3.6.12 in [1] for a book reference. In your case for two points with the weight function $x mapsto frac{1}{sqrt{x}}$ on the interval $(0,1)$, you want to find the roots of $P_2$ where $(P_n)_{n ge 0}$ are the orthogonal polynomials associated with the scalar product $$ langle f,grangle = int_0^1 f(x), g(x), frac{mathrm{d}x}{sqrt{x}}. $$

One way to do it is:

  • Set $P_0 = 1$.
  • Find $P_1 = x + a$ such that $langle P_0, P_1rangle = 0$.
  • Find $P_2 = x^2 + bx + c$ such that $langle P_0, P_2rangle = 0$ and $langle P_1, P_2rangle = 0$.
  • Find the roots of $P_2$ for the points $x_0$ and $x_1$.
  • Solve for example $$ begin{cases} w_0 + w_1 = 2 w_0 x_0 + w_1 x_1 = frac{2}{3} end{cases} $$ to get the weights $(w_0, w_1)$.

[1] J. Stoer and R. Bulirsch, Introduction to Numerical Analysis, Springer, 2002.

Answered by Zoïs Moitier on December 10, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP