Talk:Gaussian quadrature

From Wikipedia, the free encyclopedia
Latest comment: 20 June 2023 by Stevenj in topic Convergence rate
Jump to navigation Jump to search

<templatestyles src="Module:Message box/tmbox.css"/><templatestyles src="Talk header/styles.css" />

Script error: No such module "Check for unknown parameters".Script error: No such module "Check for deprecated parameters".

Template:WikiProject banner shell

First Comment(s)

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?

In the Gauss-Lobatto section, we have Weights: wi=2n(n1)[Pn1(xi)]2(xi±1) What happens when xi=0, as it does once for every second legendre? --naught101 (talk) 01:57, 21 January 2011 (UTC)Reply

Gauss-Legendre

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 Template:Math 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?

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?

I can't quite believe the error estimate:

abω(x)f(x)dxi=1nwif(xi)=f(2n)(ξ)(2n)!(pn,pn)

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?

Known to whom? I would say, Template:Math always, where Template:Math and Template:Math. 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

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

Picture

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 y(w)+y(w) with w=1/3. Madyno (talk) 16:51, 15 January 2018 (UTC)Reply

Alternative names

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

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 [1,1], the associated orthogonal polynomials are Legendre polynomials, denoted by Pn(x). With the Template:Mvar-th polynomial normalized to give Pn(1) = 1, the Template:Mvar-th Gauss node, Template:Mvar, is the Template:Mvar-th root of Template:Mvar and the weights are given by the formula Script error: No such module "Footnotes".

Because we have some things that are formatted with LaTex:

[1,1]

or {{mvar}}

Template:Mvar

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 [1,1] or h(x) 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 (kn=1), global weight (hn=1), evaluation at some point, etc. (where kn,hn 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:
exp(xz12z2),11+zexp(xz1+z),1xz12xz+z2,112xz+z2
so that all the normalization conventions are put aside.
  • There are situations where the n roots of Pn are to be considered as an ordered list of real numbers. And other situations where we better select a random root ξ, and use {x1,x2,,xn1} to denote the unordered set of the other roots.
  • And therefore, the best way of writing the theorem is:
w(ξ)=Pn12P'n(ξ)Pn1(ξ)×knkn1 where kn=kn1=1 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., f(x) is well-approximated by polynomials on [1,1]
or
(2) For the simplest integration problem stated above, i.e., f(x) is well-approximated by polynomials on [1,1]
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

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 Template:Math or less by a suitable choice of the nodes Template:Mvar and weights Template:Mvar for Template:Math. The most common domain of integration for such a rule is taken as [−1,1], so the rule is stated as
11f(x)dxi=1nwif(xi),
Template:Tq. Template:Refn Template:Refn This exact rule is known as the Gauss-Legendre quadrature rule. Template:Refn The quadrature rule Template:Refn will only be an accurate approximation to the integral above if f(x) is well-approximated by a polynomial of degree Template:Math or less on Template:Math.Template:Refn

Notes

Template:Reflist

Suggested re-writes

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 Template:Mvar and weights Template:Mvar for Template:Math:
11f(x)dxi=1nwif(xi)
If f(x) is a polynomial of degree Template:Math 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 Template:Math or less on Template:Math.

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 Template:Mvar and weights Template:Mvar for Template:Math:
11f(x)dxi=1nwif(xi)
If f(x) is a polynomial of degree Template:Math 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 Template:Math or less on Template:Math.

--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 n points and n weights are 2n degrees of freedom... exactly what is required to face the freedom provided by chosing at random a polynomial whose degree is at most 2n1.
Best regards. Pldx1 (talk) 15:53, 22 December 2018 (UTC)Reply
Template:Ping 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

Once the existence of the xi,wi families is proven, the w(ξ) are easily obtained from the special case Q(z)=Pn1(z)j=1n1(zxi). This dramatically reduces the length of the proof. Pldx1 (talk) 10:04, 23 December 2018 (UTC)Reply

Split Gauss-Legendre quadrature page

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

Template:Copied

Convergence rate

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