the highest degree of the polynomial, for which the above formula is exact?

354 Views Asked by At

Consider the quadrature formula $\int _{-1}^1\vert x \vert f(x)dx \approx \frac{1}{2}[f(x_0)+f(x_1)]$, where $x_0$ and $x_1$ are quadrature points. Then the highest degree of the polynomial, for which the above formula is exact?

Here weight function given, then how to proceed?

here I tried to find out $x_0$ and $x_1$ putting the value of $f(x)=1, x, x^2$, but I am not getting the values and earlier I did not solve any problem where weight function given.

1

There are 1 best solutions below

0
On

First, let us simplify the integral, eliminating the absolute value that makes the problem more difficult: $$\begin{align}\int_{-1}^1|x|f(x)dx&=\int_{-1}^0-xf(x)dx+\int_0^1xf(x)dx\\ &=\int_1^0-(-y)f(-y)(-dy)+\int_0^1yf(y)dy\\ &=\int_0^1yf(-y)dy+\int_0^1yf(y)dy\\ &=\int_0^1\left(f(x)+f(-x)\right)dx\end{align}$$ Where we made the substitution $y=-x$ in the first integral and $y=x$ in the second. Now we can calculate $$\int_{-1}^1|x|\cdot1dx=\int_0^1x(2)dx=\left.x^2\right|_0^1=1=\frac12(1+1)=1$$ So far so good! $$\int_{-1}^1|x|\cdot xdx=\int_0^1x(x-x)dx=0=\frac12(x_0+x_1)$$ So we know that $x_0=-x_1$. $$\int_{-1}^1|x|\cdot x^2dx\int_0^1x\left(x^2+x^2\right)dx=\left.\frac12x^4\right|_0^1=\frac12=\frac12\left(x_0^2+x_1^2\right)=x_1^2$$ So at this point we have determined that $x_1=1/\sqrt2$ and $x_0=-1/\sqrt2$. So how much farther can we take this? $$\int_{-1}^1|x|\cdot x^3dx=\int_0^1x\left(x^3-x^3\right)dx=0=\frac12\left(\left(-\frac1{\sqrt2}\right)^3+\left(\frac1{\sqrt2}\right)^3\right)$$ So it's good through order $3$, but $$\int_{-1}^1|x|\cdot x^4dx=\int_0^1x\left(x^4+x^4\right)dx=\frac13$$ and $$\frac12\left(\left(-\frac1{\sqrt2}\right)^4+\left(-\frac1{\sqrt2}\right)^4\right)=\frac14$$ So it fails at order $4$. Since it works for order $2n-1$ for $n$ points, the formula is full Gaussian and could have been determined without the hint about the weights.

Another way to look at the problem is to consider that if we want a Gaussian quadrature formula to approximate $$\int_{-1}^1|x|f(x)dx$$ We need a family of orthogonal polynomials for the given interval and weight function, but due to the symmetry of the problem even polynomials are automatically orthogonal to odd polynomials so we need only find a family of even polynomials orthogonal to all even polynomials of lesser degree and a family of odd polynomials orthogonal to all odd polynomials of lesser degree. For the even polynomials, we start with $$\begin{align}\int_{-1}^1|x|p_n(x^2)q_{n-1}(x^2)dx&=2\int_0^1xp_n(x^2)q_{n-1}(x^2)dx=2\int_0^1\sqrt yp_n(y)q_{n-1}(y)\frac{dy}{2\sqrt y}\\ &=\int_0^1p_n(y)q_{n-1}(y)dy=0\end{align}$$ Where $q_{n-1}(x)$ is any polynomial of degree at most $n-1$. So we see that $p_n(y)$ is the scaled Legendre polynomial $P_n(u)=P_n(2y-1)$ of degree $n$ and the $2n$ sample points of the quadrature formula are $u_j=2y_j-1=2x_k^2-1$ or $x_k=\pm\sqrt{(u_j+1)/2}$ with weight $\lambda_k=1/\left(2nP_n^{\prime}(u_j)P_{n-1}(u_j)\right)$ where $u_j$ are the zeros of the Legendre polynomial of degree $n$. In our case, $P_1(u)=u$ so the zero is $u_1=0$ and we get $x_k=\pm1/\sqrt2$ and $\lambda_k=1/\left(2\cdot1\cdot P_1^{\prime}(0)P_0(0)\right)=1/2$ as above.

For the odd polynomials, $$\begin{align}\int_0^1|x|\cdot xp_n(x^2)\cdot xq_{n-1}(x^2)dx&=2\int_0^1x^3p_n(x^2)q_{n-1}(x^2)dx=2\int_0^1y^{3/2}p_n(y)q_{n-1}(y)\frac{dy}{2\sqrt y}\\ &=\int_0^1yp_n(y)q_{n-1}(y)dy=0\end{align}$$ Where again $q_{n-1}(x)$ is any polynomial of degree at most $n-1$. Then $p_n(y)$ is the scaled Jacobi polynomial $P_n^{(0,1)}(u)=P_n^{(0,1)}(2y-1)$ and the $2n+1$ sample points of the quadrature formula are $u_j=2y_j-1=2x_k^2-1$ or $x_k=\pm\sqrt{(u_j+1)/2}$ with weights $\lambda_k=(2n+1)/\left(2n(n+1)(u_j+1)P_n^{(0,1)\prime}(u_j)P_{n-1}^{(0,1)}(u_j)\right)$ where $P_n^{(0,1)}(u_j)=0$ and also $x_{n+1}=0$ with weight $\lambda_{n+1}=1/(n+1)^2$.