- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey!
I want to calculate the integral $$\int_0^1\frac{1}{x+3}\, dx$$ with the Gaussian quadrature formula that integrates exactly all polynomials of degree $6$.
The gaussian quadrature integrates exactly polynomials $\Phi (x)$ with maximum degree $2n-1$. In this case we consider $n=4$.
The formula is \begin{equation*}\int_{0}^1\frac{1}{x+3}\, dx\approx \sum_{i=1}^nf(x_i)\cdot w_i=f(x_1)\cdot w_1+f(x_2)\cdot w_2+f(x_3)\cdot w_3+f(x_4)\cdot w_4\end{equation*}
For the calculations of $w_i$ we need the following:
\begin{align*}&P_n(x)=(a_n+x)P_{n-1}(x)+c_nP_{n-2}(x) \\ &P_0=1, \ P_{-1}=0\end{align*} with \begin{equation*}a_n=-\frac{\langle x\cdot P_{n-1}, P_{n-1}\rangle_w}{\langle P_{n-1}, P_{n-1}\rangle_w}, \ \ \ , c_n=-\frac{\langle P_{n-1}, P_{n-1}\rangle_w}{\langle P_{n-2}, P_{n-2}\rangle_w}\end{equation*} right? What is in this case the weight function $w(x)$ ?
(Wondering)
I want to calculate the integral $$\int_0^1\frac{1}{x+3}\, dx$$ with the Gaussian quadrature formula that integrates exactly all polynomials of degree $6$.
The gaussian quadrature integrates exactly polynomials $\Phi (x)$ with maximum degree $2n-1$. In this case we consider $n=4$.
The formula is \begin{equation*}\int_{0}^1\frac{1}{x+3}\, dx\approx \sum_{i=1}^nf(x_i)\cdot w_i=f(x_1)\cdot w_1+f(x_2)\cdot w_2+f(x_3)\cdot w_3+f(x_4)\cdot w_4\end{equation*}
For the calculations of $w_i$ we need the following:
\begin{align*}&P_n(x)=(a_n+x)P_{n-1}(x)+c_nP_{n-2}(x) \\ &P_0=1, \ P_{-1}=0\end{align*} with \begin{equation*}a_n=-\frac{\langle x\cdot P_{n-1}, P_{n-1}\rangle_w}{\langle P_{n-1}, P_{n-1}\rangle_w}, \ \ \ , c_n=-\frac{\langle P_{n-1}, P_{n-1}\rangle_w}{\langle P_{n-2}, P_{n-2}\rangle_w}\end{equation*} right? What is in this case the weight function $w(x)$ ?
(Wondering)