Talk:Gaussian quadrature

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

First Comment(s)[edit]

It seems like the J matrix may have Bn and An switched!


— Preceding unsigned comment added by 171.64.221.179 (talk) 00:46, 1 November 2012 (UTC)[reply]

We need an expert here please! the part of Computation of Gaussian quadrature rules is a mess. What is A, what is B? somebody needs to define these; also, we define k as an index variable and instead of it we use i and so on. Wihenao Nov 1, 2009 —Preceding undated comment added 22:06, 1 November 2009 (UTC).[reply]

This page isn't linked from Quadrature, although that page does link to Numerical integration. I suspect a cleanup/merge is in order.

Also, somewhere should be mentioned quadrature over a simplex, which is useful for Finite element analysis. BenFrantzDale 04:37, Feb 17, 2005 (UTC)

I guess I'm not seeing what should be merged. Numerical integration is an overview of the topic, and mentions Gaussian quadrature in passing, along with several other techniques. Further detail is in the Gaussian quadrature article. This is as it should be, no? Wile E. Heresiarch 07:54, 18 Feb 2005 (UTC)

The formula (eq. 25.4.45 of Abramowitz and Stegun) referred to for Laguerre quadrature is incorrect. Or rather it is if the formulae for the Laguerre polynomial in chapter 22 of the same book are used. I suspect the authors of the two chapters have adopted different definitions of the Laguerre polynomials. GeordieMcBain 01:24, 9 March 2006 (UTC)[reply]

What printing of A&S? In the tenth printing, eqn 25.4.45 is marked with an asterisk, indicating a correction. [1] And what is wrong about the formula? -- Jitse Niesen (talk) 09:32, 10 March 2006 (UTC)[reply]

When it says : ... "which make the computed integral exact for all polynomials of degree up to 2n − 1" ... , is it including or excluding all the polynomials of degree 2n-1 ?

132.69.230.37 15:58, 3 September 2007 (UTC)[reply]

Including. I think "up to" always means including. Anyway, I reformulated it to say "all polynomials of degree 2n − 1 or less", which is definitely clearer. -- Jitse Niesen (talk) 01:33, 4 September 2007 (UTC)[reply]

Divide by zero?[edit]

In the Gauss-Lobatto section, we have Weights: What happens when , as it does once for every second legendre? --naught101 (talk) 01:57, 21 January 2011 (UTC)[reply]

Gauss-Legendre[edit]

I am no expert in this but is this also not known as gauss legendres method ? Poticecream (talk) 10:03, 28 October 2011 (UTC)[reply]

Yes, the case with W(x) = 1 given at Gaussian quadrature#Rules for the basic problem is often called Gauss-Legendre quadrature. Qwfp (talk) 12:43, 29 October 2011 (UTC)[reply]

n=5 quadrature wrong?[edit]

I think the abscissas for the n=5 quadrature rule are wrong. I implemented it in my code and it gave incorrect answers, so I checked on mathworld, and their abscissas are slightly different, http://mathworld.wolfram.com/Legendre-GaussQuadrature.html 128.83.68.153 (talk) 18:30, 27 July 2012 (UTC)[reply]

Error estimate wrong?[edit]

I can't quite believe the error estimate:

The normalisation for the orthogonal polynomials is unspecified (monic, normalised, whatever, ...) thus the right hand side can have *any* dependence on $n$ here. Just take $\tilde p_n(x)=g(n) p_n(x)$, which also defines orthogonal polynomial for the given weighting function, and you get a factor of $g(n)^2$ in the estimate. (ezander) 89.182.48.90 (talk) 09:22, 9 July 2013 (UTC)[reply]

Ok. I checked it in Bulirsch-Stoer. Must be the monic polynomials. I'll edit the article accordingly. (ezander) 89.182.48.90 (talk) 09:56, 9 July 2013 (UTC)[reply]

where ω is a known function?[edit]

Known to whom? I would say, f(x) = ω(x) · g(x) always, where ω = f and g ≡ 1. I suppose it should mean one of the a priori supported functions; the text is unclear. Moreover, I suppose the preferred points of evaluation change as well. --Yecril (talk) 11:05, 14 January 2014 (UTC)[reply]

Example[edit]

This website rosettacode has a worked example in nearly 30 different programming languages.--Billymac00 (talk) 01:12, 22 March 2017 (UTC)[reply]

Picture[edit]

I think the example in the picture at the beginning might need some more explanation. It will, for instance not be clear to the reader, even with some experience, that the integral of the black dashed line just equals with . Madyno (talk) 16:51, 15 January 2018 (UTC)[reply]

Alternative names[edit]

Can we add the alternative names to the first part of the title similar to here? (e.g. Gauss-Legendre quadrature, Legendre quadrature) The WP:LEDE and table of contents is a bit confusing: On first reading, I thought Gauss-Legendre quadrature was a special case of Gauss quadrature rather than an alternative name. --David Tornheim (talk) 02:11, 22 December 2018 (UTC)[reply]

Typesetting[edit]

I read about as much of MOS:FORMULA as I could before my eyes glazed over. When I tried to read the article, I found sections with inconsistent formatting for variable and functions quite distracting:

For the simplest integration problem stated above, i.e., f(x) is well-approximated by polynomials on , the associated orthogonal polynomials are Legendre polynomials, denoted by Pn(x). With the n-th polynomial normalized to give Pn(1) = 1, the i-th Gauss node, xi, is the i-th root of Pn and the weights are given by the formula (Abramowitz & Stegun 1972, p. 887)

Because we have some things that are formatted with LaTex:

or {{mvar}}

Pn

and others that are similar that are simply italicized (and might use <sub></sub>):

f(x)
Pn(x)

Other places in the article text I have seen [-1, 1] rather or rather than h(x). It's somewhat unclear what is preferred in a complex article like this one, but I suggest we keep it consistent, whichever we choose.

--David Tornheim (talk) 02:55, 22 December 2018 (UTC)[reply]

  • Hello. As required, here are some of my opinions.
  • Latex everywhere, i.e. <math>...</math> everywhere. A same thing is to be uniformly typesetted across a whole article. In any case, this only requires a batch latex --> wiki, written once in a life.
  • Normalization. We have a large choice: monic polynomials (=1), global weight (=1), evaluation at some point, etc. (where are the A.S. notations). We have to live with this variability: each normalization is "the best one" in at least one situation. Moreover, we have to synchronize each set of orthogonal polynomials in order to obtain handy generating functions. The usual choices are:
so that all the normalization conventions are put aside.
  • There are situations where the roots of are to be considered as an ordered list of real numbers. And other situations where we better select a random root , and use to denote the unordered set of the other roots.
  • And therefore, the best way of writing the theorem is:
where when using monic polynomials.
  • Once again, this is only how I would write all these things !!!
Pldx1 (talk) 15:17, 22 December 2018 (UTC)[reply]
Thanks for the comments about typesetting, specifically, "<math>...</math> everywhere". One question on that, which do you prefer:
(1) For the simplest integration problem stated above, i.e., is well-approximated by polynomials on
or
(2) For the simplest integration problem stated above, i.e., is well-approximated by polynomials on
I prefer the second, because the font size is closer to the main text, even though it is a bit cumbersome in code. What do you think? I have no opinion at this time about your ideas on normalization. --David Tornheim (talk) 06:21, 23 December 2018 (UTC)[reply]

LEDE -- confusing[edit]

I keep re-reading the lede and find it confusing, partly because of redundancies. Here is part of the WP:LEDE with my comments and questions as notes:

An n-point Gaussian quadrature rule, named after Carl Friedrich Gauss, is a quadrature rule constructed to yield an exact result for polynomials of degree 2n − 1 or less by a suitable choice of the nodes xi and weights wi for i = 1, ..., n. The most common domain of integration for such a rule is taken as [−1,1], so the rule is stated as
which is exact for polynomials of degree 2n-1 or less. [Note 1] [Note 2] This exact rule is known as the Gauss-Legendre quadrature rule. [Note 3] The quadrature rule [Note 4] will only be an accurate approximation to the integral above if f(x) is well-approximated by a polynomial of degree 2n-1 or less on [-1,1].[Note 5]

Notes[edit]

  1. ^ green text is redundant
  2. ^ If the focus of the definition is on the version that is exact, it is confusing to put approximation symbol ().
  3. ^ Does that mean that it is only called the Gauss-Legendre quadrature rule for the polynomials of degrees 2n-1 or less when it is exact? And that it is called the Guassian quadrate rule to include other function too? Or is this just an alternative name for the same thing?
  4. ^ Which one? Gauss quadrature only? or Gauss-Legendre quadrature? or both?
  5. ^ What if you want to integrate over a different interval? I see this is addressed in the article but it would be nice to mention that a transformation can be done to address other intervals.

Suggested re-writes[edit]

Here is a possible re-write (assuming Gauss-Legendre = Gauss quadrature):

An n-point Gaussian quadrature rule (also called the Gauss-Legendre quadrature rule), named after Carl Friedrich Gauss, is a quadrature rule that approximates the definite integral of a function, typically over the interval [-1,1], by a suitable choice of the nodes xi and weights wi for i = 1, ..., n:
If f(x) is a polynomial of degree 2n − 1 or less, the result is exact. For other functions, the quadrature rule will only be an accurate approximation to the integral above if f(x) is well-approximated by a polynomial of degree 2n-1 or less on [-1,1].

Here is a possible re-write (assuming Gauss-Legendre quadrature is only for the exact case):

An n-point Gaussian quadrature rule, named after Carl Friedrich Gauss, is a quadrature rule that approximates the definite integral of a function, typically over the interval [-1,1], by a suitable choice of the nodes xi and weights wi for i = 1, ..., n:
If f(x) is a polynomial of degree 2n − 1 or less, the result will be exact. For these polynomials, the process is called the Gauss-Legendre quadrature rule. For other functions, the quadrature rule will only be an accurate approximation to the integral above if f(x) is well-approximated by a polynomial of degree 2n-1 or less on [-1,1].

--David Tornheim (talk) 04:00, 22 December 2018 (UTC)[reply]

  • In my opinion, version 1 is better... because it avoids the naming quarrel. In the lede, on can add that
This can be generalized in various contexts, to take into account infinite intervals or various kind of singularities by incorporating them into a so called weight function. This leads to Chebyshev–Gauss, Gauss-Jacobi, Gauss-Laguerre and Gauss–Hermite quadrature formulas to name the most known of them (see below).
and expel everything else in the body of the article.
This would make the room required to underline that points and weights are degrees of freedom... exactly what is required to face the freedom provided by chosing at random a polynomial whose degree is at most .
Best regards. Pldx1 (talk) 15:53, 22 December 2018 (UTC)[reply]
@Pldx1: Thanks for your comments here and above. I'll get to some of of those changes soon. So I assume when you same "version 1" you mean that you are okay with the my first revision (rather than the original), right? --David Tornheim (talk) 06:14, 23 December 2018 (UTC)[reply]

Obtaining the weights[edit]

Once the existence of the families is proven, the are easily obtained from the special case . This dramatically reduces the length of the proof. Pldx1 (talk) 10:04, 23 December 2018 (UTC)[reply]

Split Gauss-Legendre quadrature page[edit]

Gauss-Legendre quadrature deserves a separate page from the general Gaussian quadrature page. The other cases of Gaussian quadrature rules listed on the general each have their own pages. The sections on Gauss-Legendre in the general Gaussian quadrature page do not detail the state-of-the-art algorithms, which are orders of magnitude more efficient than the Golub-Welsch algorithm and allow for computation of much larger quadrature rules. There has been much work in this area. We have an applied functional analysis class of students that plan to contribute the rest of the content to the Gauss-Legendre quadrature page. Cpt49 (talk) 17:35, 10 February 2020 (UTC)[reply]

Copied Gauss-Legendre content to new page[edit]

Convergence rate[edit]

The article really needs some information on the convergence rate — which is *exponential* for functions that are analytic in a neighborhood of the integration domain. Trefethen's review article is a good starting place. — Steven G. Johnson (talk) 14:04, 20 June 2023 (UTC)[reply]