We know there exists unique Gaussian quadrature formula. Its quadrature points are given by the zeros of the orthogonal polynomial. Why do we use only the zeros of the orthogonal polynomials in Gaussian quadrature formula? Is it possible to use any points instead of the zeros of the orthogonal polynomials?
[Math] Why are quadrature points given by the zeros of orthogonal polynomials
numerical methodsorthogonal-polynomials
Related Solutions
As far is I know the correct formula for determining the number of Gauss points is given by:
$p + 1 = 2n$
or
$p = 2n-1$
where p is the degree of the polynomial and n are the number of Gauss points.
Since your problem involves a fourth degree polynomial, you need 5/2 gauss points. This problem would therefore require 3 integration points instead of 2:
$(4+1)/2 = 5/2$
I hope this might solve your problem. I tried it out on a simple fourth order polynomial which gave me the exact answer.
Some partial results: we want to work out moments $$\begin{align}M_k&=\int_{-1}^0\frac{x^k}{\sqrt{1-x^2}}dx=(-1)^k\int_0^1\frac{x^k}{\sqrt{1-x^2}}dx\\ &=\frac{(-1)^k}2\cdot2\int_0^{\pi/2}\sin^k\theta\,d\theta=\frac{(-1)^k}2\text{B}\left(\frac{k+1}2,\frac12\right)\end{align}$$ Where $\text{B}(u,v)$ is the Beta function. So for even $k$, $$M_k=\frac{\pi k!}{2^{k+1}\left[\left(\frac k2\right)!\right]^2}$$ While for odd $k$, $$M_k=\frac{-2^k\left(\frac{k-1}2\right)!\left(\frac{k+1}2\right)!}{(k+1)!}$$ Table for the first few $k$: $$\begin{array}{c|c}k&M_k\\ \hline 0&\frac{\pi}2\\ 1&-1\\ 2&\frac{\pi}4\\ 3&-\frac23\\ 4&\frac{3\pi}{16}\\ 5&-\frac8{15}\end{array}$$ We need a cubic polynomial $x^3+ax^2+bx+c$ orthogonal to $x^k$ for $k\in{0,1,2}$. This gives us $3$ equations in $3$ unknowns: $$\begin{array}{rrrr}\frac{\pi}4a&-b&+\frac{\pi}2c&=\frac23\\ -\frac23a&+\frac{\pi}4b&-c&=-\frac{3\pi}{16}\\ \frac{3\pi}{16}a&-\frac23b&+\frac{\pi}4c&=\frac8{15}\end{array}$$ It would be nice to represent $a$, $b$, and $c$ as rational functions of $\pi$, but numerically I get $$\begin{align}a&=1.614477692\\ b&=0.702011721\\ c&=0.064088878\end{align}$$ EDIT: WolframAlpha spits out $$\begin{align}a&=\frac{2\left(256-27\pi^2\right)}{5\pi\left(88-9\pi^2\right)}\\ b&=-\frac{3\left(-448+45\pi^2\right)}{20\left(-88+9\pi^2\right)}\\ c&=-\frac{2048-207\pi^2}{30\pi\left(88-9\pi^2\right)}\end{align}$$ So the cubic equation is $$x^3+1.614477692x^2+0.702011721x+0.064088878=0$$ Roots are $$x\in\{-0.123876429,-0.94052274,-0.550078523\}$$ We want to be exact for $k\in\{0,1,2\}$: $$\begin{array}{rrrr}A_1&+A_2&+A_3&=\frac{\pi}2\\ x_1A_1&+x_2A_2&+x_3A_3&=-1\\ x_1^2A_1&+x_2^2A_2&+x_3^2A_3&=\frac{\pi}4\end{array}$$ I get $$\begin{align}A_1&=0.308760976\\ A_2&=0.685202238\\ A_3&=0.576833113 \end{align}$$ I checked that $$\sum_{j=1}^3A_jx_j^k=M_k$$ For $k\in\{0,1,2,3,4,5\}$ to the accuracy provided by Excel, so the formula is Gaussian.
For Legendre polynomials, the weight function is $w(x)=1$ and the interval is $(-1,1)$, neither of which matches the statement of your problem.
Best Answer
You can use any points you wish in a quadrature formula; it just will not be very precise if you don't choose them wisely. For example, $$ \int_{-1}^1 f(x)\,dx \approx 7 f(-1) - 10 f(1/4) + 5 f(1) $$ is a quadrature formula with points $-1,1/4,1$. It's not a very precise formula, because I just made up the numbers. If I put more effort into the coefficients, I would make this formula exact for polynomials of degrees up to $2$. But it still wouldn't work as well as the Gaussian quadrature on three points ($0$ and $\pm \sqrt{3/5}$), which is accurate for degrees up to $5$.
Here is why the zeros of orthogonal polynomials (in particular, Legendre polynomials) make a good choice of sample points. Given a general polynomial $p$ of degree $2n-1$, we can use long division to obtain $p=qL_n+r$ where $L_n$ is the Legendre polynomial of degree $n$, and both $q$ and $r$ have degree $<n$. Then $$ \int_{-1}^1 p(x)\,dx = \int_{-1}^1 q(x)L_n(x)\,dx+\int_{-1}^1 r(x)\,dx = \int_{-1}^1 r(x)\,dx $$ because $L_n$ is orthogonal to any polynomial of degree less than $n$. Since the term $qL_n$ contributes zero to the integral, it should also contribute zero to our quadrature formula. Choosing the sample points to be the zeros of $L_n$ achieves this goal.
Thus, one only needs to find the weights that give the exact value of $\int_{-1}^1 r(x)\,dx$ (where $\deg r\le n-1$) to obtain a quadrature formula that is exact for all degrees up to $2n-1$.