Docsity

Gauss Quadrature e Polinômios Ortogonais, Notas de estudo de Métodos Numéricos em Engenharia

Toggle sidebar
bg1
9 Gauss quadrature and orthogonal polynomials.
The aim of this section is to construct “optimal” quadrature formulas. To be more specific,
given the integral
Iw(f) = Zb
a
w(x)f(x)dx (32)
in which w(x)is a fixed, positive function. We want to approximate this using a quadrature
formula on the form
Qw(f) =
n
X
i=1
Aif(xi).
Such a formula can be constructed as follows: Choose ndistinct nodes, x1, x2,··· , xnin the
interval [a,b]. Construct the interpolation polynomial
pn−1(x) =
n
X
i=1
f(xi)`i(x), `i(x) = Y
j=1,j6=i
x−xj
x−xi
.
An approximation to the integral is then given by
Qw(f) = Zb
a
w(x)pn−1(x)dx =
m
X
i=1
Aif(xi), Ai=Zb
a
w(x)`i(x)dx. (33)
The quadrature formula is of precision mif
Iw(p) = Qw(p),for all p∈Pm.
From the construction, these quadrature formulas is of precision at least n−1. The question
is how too choose the nodes xi,i= 1, . . . , n giving mas large as possible. The key concept
here is orthogonal polynomials.
Orthogonal polynomials.
Given two functions f, g ∈C[a, b]. We define an inner product of these two functions by
< f , g >=Zb
a
w(x)f(x)g(x)dx, w(x)>0.(34)
Thus the definition of the inner product depends on the integration interval [a,b]and a given
weight function w(x). If f, g , h ∈C[a, b]and α∈Rthen
hf, giw=hg , fiw
hf+g, hiw=hf, hiw+hg , hiw
hαf, g iw=αhf, giw
hf, f iw≥0,and hf, f iw= 0 ⇔f≡0.
From an inner product, we can also define a norm on C[a,b]by
kfk2
w=hf, f iw.
30
pf3
pf4
pf5

Pré-visualização parcial do texto

Baixe Gauss Quadrature e Polinômios Ortogonais e outras Notas de estudo em PDF para Métodos Numéricos em Engenharia, somente na Docsity!

9 Gauss quadrature and orthogonal polynomials.

The aim of this section is to construct “optimal” quadrature formulas. To be more specific, given the integral

Iw(f ) =

∫ (^) b

a

w(x)f (x)dx (32)

in which w(x) is a fixed, positive function. We want to approximate this using a quadrature formula on the form

Qw(f ) =

∑^ n

i=

Aif (xi).

Such a formula can be constructed as follows: Choose n distinct nodes, x 1 , x 2 , · · · , xn in the interval [a, b]. Construct the interpolation polynomial

pn− 1 (x) =

∑^ n

i=

f (xi)i(x),i(x) =

j=1,j 6 =i

x − xj x − xi

An approximation to the integral is then given by

Qw(f ) =

∫ (^) b

a

w(x)pn− 1 (x)dx =

∑^ m

i=

Aif (xi), Ai =

∫ (^) b

a

w(x)`i(x)dx. (33)

The quadrature formula is of precision m if

Iw(p) = Qw(p), for all p ∈ Pm.

From the construction, these quadrature formulas is of precision at least n − 1. The question is how too choose the nodes xi, i = 1,... , n giving m as large as possible. The key concept here is orthogonal polynomials.

Orthogonal polynomials.

Given two functions f, g ∈ C[a, b]. We define an inner product of these two functions by

< f, g >=

∫ (^) b

a

w(x)f (x)g(x)dx, w(x) > 0. (34)

Thus the definition of the inner product depends on the integration interval [a, b] and a given weight function w(x). If f, g, h ∈ C[a, b] and α ∈ R then

〈f, g〉w = 〈g, f 〉w 〈f + g, h〉w = 〈f, h〉w + 〈g, h〉w 〈αf, g〉w = α〈f, g〉w 〈f, f 〉w ≥ 0 , and 〈f, f 〉w = 0 ⇔ f ≡ 0.

From an inner product, we can also define a norm on C[a, b] by

‖f ‖^2 w = 〈f, f 〉w.

For the inner product (34) we also have

〈xf, g〉w =

∫ (^) b

a

w(x)xf (x)g(x)dx = 〈f, xg〉w. (35)

Our aim is now to create an orthogonal basis for P, that is, create a sequence of polynomials φk(x) of degree k (no more, no less) for k = 0, 1 , 2 , 3 ,... such that

〈φi, φj 〉w = 0 for all i 6 = j.

If we can make such a sequence, then

Pn− 1 = span{φ 0 , φ 1 , · · · , φn− 1 } and 〈φn, p〉w = 0 for all p ∈ Pn− 1.

Let us now find the sequence of orthogonal polynomials. This is done by a Gram-Schmidt process: Let φ 0 = 1. Let φ 1 = x − B 1 φ 0 where B 1 is given by the orthogonality condition:

0 = 〈φ 1 , φ 0 〉w = 〈xφ 0 , φ 0 〉w − B 1 〈φ 0 , φ 0 〉w ⇒ B 1 =

〈xφ 0 , φ 0 〉w ‖φ 0 ‖^2 w

Let us now assume that we have found φj , j = 0, 1 , · · · , φk. Then, let

φk = xφk− 1 −

k∑− 1

j=

αj φj.

Clearly, φk is a polynomial of degree k, and αj can be chosen so that 〈φk, φi〉w = 0, i = 0 , 1 ,... , k − 1 , or

〈φk, φi〉w = 〈xφk− 1 , φi〉w−

k∑− 1

j=

αj 〈φi, φj 〉w = 〈xφk− 1 , φi〉w−αi〈φi, φi〉w = 0, i = 0, 1 , · · · , k− 1.

So αi = 〈xφk − 1 , φi〉w/〈φi, φi〉w. But we can do even better. Since φk− 1 is orthogonal to all polynomials of degree k − 2 or less, we get

〈xφk− 1 , φi〉w = 〈φk− 1 , xφi〉w = 0 for i + 1 < k − 1.

So, we are left only with αk− 1 and αk− 2. The following theorem concludes the argument:

Theorem 9.1. The sequence of orthogonal polynomials can be defined as follows:

φ 1 (x) = 1, φ 2 (x) = x − B 1 φk(x) = (x − Bk)φk− 1 (x) − Ckφk− 2 (x), k ≥ 2

with

Bk = 〈xφk− 1 , φk− 1 〉w ‖φk − 1 ‖^2 w

, Ck = 〈xφk− 1 , φk− 2 〉w ‖φk− 2 ‖^2 w

‖φk− 1 ‖^2 w ‖φk− 2 ‖^2 w

Gaussian quadrature

The main result of this section is the following result:

Theorem 9.5. Let φn be the orthogonal polynomial of degree n based on the inner product (34). Let x 1 , x 2 , · · · , xn be the distinct zeros of φn. Using these as nodes, the quadrature formula constructed by (33) is of precision 2 n − 1.

Proof. Let p ∈ P 2 n− 1. By polynomial division with φn we get

p = qφn + r, q, r ∈ Pn− 1.

By orthogonality, we get

Iw(p) =

∫ (^) b

a

w(x)p(x)dx =

∫ (^) b

a

w(x)q(x)φn(x)dx +

∫ (^) b

a

w(x)r(x)dx =

∫ (^) b

a

w(x)r(x)dx = Iw(r)

And, since the nodes are zeros of φn we get

Qw(p) =

∑^ n

i=

Aip(xi) =

∑^ n

i=

Aiq(xi)φn(xi) +

∑^ n

i=

Air(xi) = Qw(r).

But by construction Qw(f ) has precision at least n − 1 , so Qw(r) = Iw(r).

For Gaussian quadratures it is possible to prove that, for f ∈ C^2 n[a, b] we get Iw(f ) = Qw(f ) + E (36)

with

E = f (2n)(ν) (2n)!

∫ (^) b

a

w(x)ω(x)^2 dx, ω(x) =

∏^ n

i=

(x − xi), ν ∈ (a, b).

Example 9.6. Let w(x) = 1 and [a, b] = [− 1 , 1], giving the Legendre polynomials as orthogonal polynomials. Choose e.g. n = 3, so that

P 3 (x) = x^3 −

x.

The zeros is x 1 = −

3 / 5 , x 2 = 0 and x 3 =

3 / 5. From (33) we get A 1 = A 3 = 5/ 9 , A 2 = 8/ 9 , so

Q(f ) =

5 f (x 1 ) + 8f (x 0 ) + 5f (x 2 )

The error of this formula becomes

E = f (6)(ν) 15750

a) Let us apply (37) to the integral ∫ (^1)

− 1

exdx = 2. 350402387.

This gives 1 9

5 e−

3 / (^5) + 8e (^0) + 5e

3 / 5 )^ = 2. 350336929

giving an error on 6. 54 · 10 −^5.

b) Using the same formula on

∫ (^1)

− 1

ex √ 1 − x^2

dx = 3. 977463261

gives Q(f ) = 3. 199641132 which is a rather crude approximation. The reason is that f (2n)(x) → ∞ for x → ± 1 in this example.

Example 9.7. Let w(x) = 1/

(1 − x^2 ) and [a, b] = [− 1 , 1], giving the Chebyshev polynomials as orthogonal basis. Choose n = 3, so that

T^ ˜ 3 (x) = x^3 − 3 4

x,

with zeros x 1 = −

3 / 2 , x 2 = 0 and x 3 =

3 / 2. The corresponding weights becomes A 1 = A 2 = A 3 = π/ 3 , and

Qw(f ) = π 3

f ( 1 ) + f (x 2 ) + f (x 3 )

The formula applied to the integral

− 1 e

x/√ 1 − x (^2) dx is

Qw(ex) =

π 3

e−

√ 3 / (^2) + e (^0) + e √ 3 / 2 )^ = 3. 97732196

which is an significant improvement from the result of Example 9.6.b).