Computational Physics - Department of Physics

(Axel Boer) #1

122 5 Numerical Integration


degreeN− 1. This numbering will be useful below when we introduce the matrix elements
which define the integration weightswi.
We develope thenQN− 1 (x)in terms of Legendre polynomials, as done in Eq. (5.13),


QN− 1 (x) =

N− 1

i= 0

αiLi(x). (5.15)

Using the orthogonality property of the Legendre polynomials we have


∫ 1
− 1

QN− 1 (x)dx=

N− 1

i= 0

αi

∫ 1
− 1

L 0 (x)Li(x)dx= 2 α 0 ,

where we have just insertedL 0 (x) = 1! Instead of an integration problem we need now to
define the coefficientα 0. Since we know the values ofQN− 1 at the zeros ofLN, we may rewrite
Eq. (5.15) as


QN− 1 (xk) =

N− 1

i= 0

αiLi(xk) =

N− 1

i= 0

αiLik k= 0 , 1 ,...,N− 1. (5.16)

Since the Legendre polynomials are linearly independent ofeach other, none of the columns
in the matrixLikare linear combinations of the others. This means that the matrixLikhas an
inverse with the properties
Lˆ−^1 Lˆ=ˆI.


Multiplying both sides of Eq. (5.16) with∑Nj=− 01 L−ji^1 results in


N− 1

i= 0

(L−^1 )kiQN− 1 (xi) =αk. (5.17)

We can derive this result in an alternative way by defining thevectors


xˆk=







x 0
x 1
.
.
xN− 1







αˆ=







α 0
α 1
.
.
αN− 1







,

and the matrix


Lˆ=





L 0 (x 0 ) L 1 (x 0 ) ... LN− 1 (x 0 )
L 0 (x 1 ) L 1 (x 1 ) ... LN− 1 (x 1 )
... ... ... ...
L 0 (xN− 1 )L 1 (xN− 1 )...LN− 1 (xN− 1 )




.

We have then
QN− 1 (xˆk) =Lˆαˆ,


yielding (ifLˆhas an inverse)
Lˆ−^1 QN− 1 (xˆk) =αˆ,


which is Eq. (5.17).
Using the above results and the fact that
∫ 1
− 1


P 2 N− 1 (x)dx=

∫ 1
− 1

QN− 1 (x)dx,

we get

Free download pdf