Loading [MathJax]/jax/output/HTML-CSS/jax.js
Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Physics LibreTexts

1.16: Gaussian Quadrature - Derivation

( \newcommand{\kernel}{\mathrm{null}\,}\)

In order to understand why Gaussian quadrature works so well, we first need to understand some properties of polynomials in general, and of Legendre polynomials in particular. We also need to remind ourselves of the use of Lagrange polynomials for approximating an arbitrary function.

First, a statement concerning polynomials in general: Let P be a polynomial of degree n, and let S be a polynomial of degree less than 2n. Then, if we divide S by P, we obtain a quotient Q and a remainder R, each of which is a polynomial of degree less than n.

That is to say: SP=Q+RP.

What this means is best understood by looking at an example, with n=3. For example,

let P=5x32x2+3x+7

and S=9x5+4x45x3+6x2+2x3.

If we carry out the division S÷P by the ordinary process of long division, we obtain

9x5+4x45x3+6x2+2x35x32x2+3x+7=1.8x2+1.52x1.47214.104x2+4.224x7.3045x32x2+3x+7.

For example, if x=3, this becomes

2433133=19.288132.304133.

The theorem given by Equation 1.16.1 is true for any polynomial P of degree l. In particular, it is true if P is the Legendre polynomial of degree l.

__________________________________

Next an important property of the Legendre polynomials, namely, if Pn and Pm are Legendre polynomials of degree n and m respectively, then

11PnPmdx=0unless m=n.

This property is called the orthogonal property of the Legendre polynomials.

I give here a proof. Although it is straightforward, it may look formidable at first, so, on first reading, you might want to skip the proof and go on the next part (after the next short horizontal dividing line).

From the symmetry of the Legendre polynomials (see figure I.7), the following are obvious:

11PnPmdx0if m=n

and 11PnPm=0if one (but not both) of m or n is odd.

In fact we can go further, and, as we shall show,

11PnPmdx=0unless m=n, whether m and n are even or odd.

Thus Pm satisfies the differential Equation (see Equation 1.14.7)

(1x2)d2Pmdx22xdPmdx+m(m+1)Pm=0,

which can also be written

ddx[(1x2)dPmdx]+m(m+1)Pm=0.

Multiply by Pn:

Pnddx[(1x2)dPmdx]+m(m+1)PmPn=0,

which can also be written

ddx[(1x2)PndPmdx](1x2)dPndxdPmdx+m(m+1)PmPn=0.

In a similar manner, we have

ddx[(1x2)PmdPndx](1x2)dPndxdPmdx+n(n+1)PmPn=0.

Subtract one from the other:

ddx[(1x2)(PndPmdxPmdPndx)]+[m(m+1)n(n+1)]PmPn=0.

Integrate from 1 to +1:

[(1x2)(PndPmdxPmdPndx)]11=[n(n+1)m(m+1)]11PmPndx.

The left hand side is zero because 1x2 is zero at both limits.

Therefore, unless m=n,

11PmPndx=0.Q.E.D.

___________________________________

I now assert that, if Pl is the Legendre polynomial of degree l, and if Q is any polynomial of degree less than l, then

11PlQdx=0.

I shall first prove this, and then give an example, to see what it means.

To start the proof, we recall the recursion relation (see Equation 1.14.4 – though here I am substituting l1 for l) for the Legendre polynomials:

lPl=(2l1)xPl1(l1)Pl2.

The proof will be by induction.

Let Q be any polynomial of degree less than l. Multiply the above relation by Qdx and integrate from 1 to +1:

l11PlQdx=(2l1)11xPl1Qdx(l1)11Pl2Qdx.

If the right hand side is zero, then the left hand side is also zero.

A correspondent has suggested to me a much simpler proof. He points out that you could in principle expand Q in Equation 1.16.14 as a sum of Legendre polynomials for which the highest degree is l1. Then, by virtue of Equation 1.16.13, every term is zero.

For example, let l=4, so that

Pl2=P2=12(3x21)

and xPl1=xP3=12(5x43x2),

and let Q=2(a3x3+a2x2+a1x+a0).

It is then straightforward (and only slightly tedious) to show that

11Pl2Qdx=(6523)a2

and that 11xPl1Qdx=(10765)a2.

But 7(10765)a23(6523)a2=0,

and therefore 11P4Qdx=0.

We have shown that l11PlQdx=(2l1)11xPl1Qdx(l1)11Pl2Qdx=0

for l=4, and therefore it is true for all positive integral l.

You can use this property for a parlour trick. For example, you can say: “Think of any polynomial. Don’t tell me what it is – just tell me its degree. Then multiply it by (here give a Legendre polynomial of degree more than this). Now integrate it from 1 to +1. The answer is zero, right?” (Applause.)

Thus: Think of any polynomial. 3x25x+7. Now multiply it by 5x33x. OK, that’s 15x525x42x3+15x221x. Now integrate it from 1 to +1. The answer is zero.

__________________________________________

Now, let S be any polynomial of degree less than 2l. Let us divide it by the Legendre polynomial of degree l, Pl, to obtain the quotient Q and a remainder R, both of degree less than l. Then I assert that

11Sdx=11Rdx.

This follows trivially from Equations 1.16.1 and 1.16.14. Thus

11Sdx=11(QPl+R)dx=11Rdx.

Example: Let S=6x512x4+4x3+7x25x+7. The integral of this from 1 to +1 is 13.86. If we divide S by 12(5x33x), we obtain a quotient of 2.4x24.8x+3.04 and a remainder of 0.2x20.44x+7. The integral of the latter from 1 to +1 is also 13.86.

______________________________________

I have just described some properties of Legendre polynomials. Before getting on to the rationale behind Gaussian quadrature, let us remind ourselves from Section 1.11 about Lagrange polynomials. We recall from that section that, if we have a set of n points, the following function:

y=ni=1yiLi(x)

(in which the n functions Li(x), i=1,n, are Lagrange polynomials of degree n1) is the polynomial of degree n1 that passes exactly through the n points. Also, if we have some function f(x) which we evaluate at n points, then the polynomial

y=ni=1f(xi)Li(x)

is a jolly good approximation to f(x) and indeed may be used to interpolate between nontabulated points, even if the function is tabulated at irregular intervals. In particular, if f(x) is a polynomial of degree n1, then the expression 1.16.28 is an exact representation of f(x).

________________________________

We are now ready to start talking about quadrature. We wish to approximate 11f(x)dx by an n-term finite series

11f(x)dxni=1cif(xi),

where 1<xi<1. To this end, we can approximate f(x) by the right hand side of Equation 1.16.28, so that

11f(x)dx11ni=1f(xi)Li(x)dx=ni=1f(xi)11Li(x)dx.

Recall that the Lagrange polynomials in this expression are of degree n1.

The required coefficients for Equation 1.16.29 are therefore

ci=11Li(x)dx.

Note that at this stage the values of the xi have not yet been chosen; they are merely restricted to the interval [−1 , 1].

__________________________________

Now let’s consider 11S(x)dx, where S is a polynomial of degree less than 2n, such as, for example, the polynomial of Equation 1.16.3. We can write

11S(x)dx=11ni=1S(xi)Li(x)dx=11ni=1Li(x)[Q(xi)P(xi)+R(xi)]dx.

Here, as before, P is a polynomial of degree n, and Q and R are of degree less than n.

If we now choose the xi to be the roots of the Legendre polynomials, then

11S(x)dx=11ni=1Li(x)R(xi)dx.

Note that the integrand on the right hand side of Equation 1.16.33 is an exact representation of R(x). But we have already shown (Equation 1.16.26) that 11S(x)dx=11R(x)dx, and therefore

11S(x)dx=11R(x)dx=ni=1ciR(xi)=ni=1ciS(xi).

It follows that the Gaussian quadrature method, if we choose the roots of the Legendre polynomials for the n abscissas, will yield exact results for any polynomial of degree less than 2n, and will yield a good approximation to the integral if S(x) is a polynomial representation of a general function f(x) obtained by fitting a polynomial to several points on the function.


This page titled 1.16: Gaussian Quadrature - Derivation is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Jeremy Tatum via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?