✧*。٩(ˊᗜˋ*)و✧*。 白麓的 web-log

Numerical Integrals

A somewhat interesting topic is removed from the CAIE syllabus of 9709: Numerical Integration. Well, we still have the oldie but goodie trapezium rules:

abf(x)dx=12(1f(a)+1f(b)),

but this is hardly inspiring at all.

Interpolation with Equal Division

In Edexcel iAL syllabus, a more accurate Newton-Cotez formula is introduced, the 1/3 Simpson's rule:

abf(x)dx=16(1f(a)+4f(a+b2)+f(b)).

That is, by evaluating an additional point in the interval (the midpoint), we can interpolate the function with a Quadratic, which gives a better guess of the original integration.

To extend this though, we can of course add more evenly distributed points to the interval and obtain polynomials of higher degree to achieve better approximation. That is how we have the 3/8 Simpson's rule:

abf(x)dx=18(1f(a)+3f(2a+b3)+3f(a+2b3)+f(b)),

and other Newton-Cotez formulae.

Interpolation of Random Points

The above only interests us to a certain degree, as adding points polynomially adds complexity. We would like improve our result by fine-tuning the points.

To make things easier, let's say we integrate on interval [1,1]. This can be done by a simple change of variable. We are looking for wi's that best approximates:

11f(x)dxi=0Nwif(xi),

Since we have N wi's to choose from, the degree of freedom of this system is N, we can expect that the approximation is accurate for polynomials with degree less than N.

Actually, we can achieve that by saying "we want the model be accurate for xk as long as kN".

11xkdx=i=0Nwixik(kN),

or in matrix format

matrix format,

where the coefficient is the well-known Vendermonde matrix. But, can we still improve it?

Roots of Legendre Polynomial

We know that Legendre Polynomial Ln(x) is orthogonal to every polynomial that is of degree less than n (because xk,Ln(x)=i=0kakLk(x),Ln(x)=0.)

Now if we divide a polynomial P(x) of degree 2n1 by this Ln(x):

P(x)=Q(x)Ln(x)+R(x).

By synthetic division, Q(x) has a degree less than 2n1n and R(x) less than n.

11P(x)dx=11Q(x)Ln(x)dx+11R(x)dx.

The first term on the right is Q(x),Ln(x)=0, so we can evaluate 11P(x)dx, the integration of 2n1-degree polynomial accurately by evaluating a n-degree polynomial.

The only thing left here is to calculate R(xi). By remainder theorem, we notice that if Ln(xi)=0, then P(xi)=R(xi).

Gaussian Quadrature

The above results summary as following: The integration of any function on [1,1] can be approximated to a polynomial of degree of 2N1 by calculating the weighted function values wif(xi), where xi's are the roots of Legendre polynomial Ln(x) and wi's are obtained by interpolation.

This method is known as Gaussian Quadrature rule, and can be applied to other orthogonal polynomials.

#"hs-maths"