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.
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:
[1] J. Stoer and R. Bulirsch, Introduction to Numerical Analysis, Springer, 2002.
Answered by Zoïs Moitier on December 10, 2020
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP