Unclear choice of polynomial in Gaussian Quadrature method

integrationnumerical methodsquadrature

Recently, I have been reading a paper regarding the evaluation of an integral using the Gaussian quadrature method but I cannot understand the rationality behind the weight and orthogonal polynomials the author has chosen.

$\begin{gathered}
\int\limits_{{s_1}}^{{s_2}} {f\left( x \right)dx} \approx \frac{{\left( {{s_2} – {s_1}} \right)}}{2}\sum\limits_{s = 1}^{\operatorname{Max} \,\,sample} {\frac{{\pi \sqrt {1 – {v^2}} }}{{\operatorname{Max} \,\,sample}}f\left( u \right)} \hfill \\
v = \cos \left( {\frac{{\left( {2s – 1} \right)\pi }}{{2 \times \operatorname{Max} \,\,sample}}} \right) \hfill \\
u = \frac{{\left( {{s_2} – {s_1}} \right)}}{2}v + \frac{{\left( {{s_2} + {s_1}} \right)}}{2} \hfill \\
\end{gathered} $

I understand that $u = \frac{{\left( {{s_2} – {s_1}} \right)}}{2}v + \frac{{\left( {{s_2} + {s_1}} \right)}}{2}$ is some smart change of variable to move the integration region to $\left[ { – 1,1} \right]$ but I do not know why a trigonometric function such as cos is chosen ?

From my domain knowledge, in this application the function $f\left( x \right)$ is something that look like a Gaussian bell-shaped. Does this knowledge justify the author's choice ?

Please help me understand this !

Thank you

Best Answer

That's Gauss-Chebyshev quadrature and will be the most accurate if $f(x)$ has branch points like $(x-s_1)^{n-1/2}$ and $(s_2-x)^{m-1/2}$ for nonnegative integers $n$ and $m$ at the endpoints. If $f(x)$ is regular at one or both endpoints, not as great but still can be pretty accurate. For regular $f(x)$ Gauss-Legendre quadrature would be more accurate although it requires more effort to set up. Clenshaw-Curtis quadrature can be easier to set up than Gauss-Legendre in that it uses the straightforward Gauss-Chebyshev quadrature to expand the function $f(x)$ in Chebyshev polynomials and then uses their known integrals. It would take more information to decide whether the author is using an optimal quadrature strategy or something quick and dirty.

EDIT: The issue is that the error in Gaussian quadrature is equal to $$\left(\frac{s_2-s_1}L\right)^{2n+1}C_nf^{(2n)}(\xi)$$ where $n$ is the number of data points, $L$ is the length of the model interval, $2$ for Gauss-Chebyshev quadrature, $s_1<\xi<s_2$, and $C_n$ is a constant depending on the quadrature algorithm and the number of data points. If $f(x)$ looks like $\sqrt{x-s_1}$ or $\sqrt{s_2-x}$ at one of its endpoints then the derivatives of $f(x)$ are unbounded so the error could be anything. Gauss-Chebyshev uses a weight function $w(x)=(1-x^2)^{-1/2}$ so this creates an effective $g(x)=\sqrt{(x-s_1)(s_2-x)}f(x)$ and this is the function whose derivatives should all remain finite at the endpoints if we want to impose a bound on the error of the quadrature as given.

As I mentioned, Gauss-Chebyshev quadrature may even give good results if $g(x)$ has unbounded derivatives but other methods may yield better results with fewer data points.

Related Question