Docsity

Notes on Numerical Integration - Finite Element Solution Methods I | MATH 5520, Study notes of Mathematics

Partial preview of the text

Download Notes on Numerical Integration - Finite Element Solution Methods I | MATH 5520 and more Study notes Mathematics in PDF only on Docsity!

MATH 5520

Numerical Integration 1.

Dmitriy Leykekhman

Spring 2009

Numerical Integration.

I (^) Our goal is to compute ∫ (^) b

a

f (x) dx.

I (^) Even if f (x) can be expressed in terms of elementary functions, the antiderivative of f (x) may not have this property. For example: e−x

2 , sin (x^2 ), sinx^ x, etc. I (^) All exact techniques of integration taught in Calculus courses are more like exceptions then the rules. I (^) As a general rule on must rely on numerical integration.

Numerical Integration.

Introduce a new variable

x = a +

b − a β − α (z − α)

. Then if z = α, x = a and if z = β, x = b, furthermore

dx =

b − a β − α

dz

and by the change of variable formula ∫ (^) b

a

f (x) dx =

b − a β − α

∫ (^) β

α

f

a +

b − a β − α

(z − α)

dz.

Numerical Integration.

Thus, if we have computed weights ŵi and nodes ẑi for the numerical integration on an interval [α, β], then we can use the above identity to approximate the integral of f over any interval [a, b] (assuming, of course, that this integral exist) by ∫ (^) b

a

f (x) dx =

b − a β − α

∫ (^) β

α

f

a +

b − a β − α

(z − α)

dz

b − a β − α

∑^ n

i=

ŵif

a +

b − a β − α

(̂zi − α)

Numerical Integration.

Before we discuss several quadrature methods, we summarize some properties of the integral which are important for the development of quadrature rules. First, we note that ∫ (^) b

a

1 dx = b − a.

Therefore we require ∑n

i=

wi = b − a,

Otherwise, our quadrature formula could not even evaluate the integral of a constant function exactly.

Numerical Integration.

Another property of the integral is

f (x) ≥ 0 =⇒

∫ (^) b

a

f (x) dx ≥ 0.

If wi ≥ 0 , i = 0,... , n, then (^) n ∑

i=

wif (xi) ≥ 0 ,

for all functions f (x) ≥ 0.

Interpolatory Quadrature Formulas.

Basic idea: if p(x) is some function such that

p(x) ≈ f (x),

then (^) ∫ b

a

p(x) dx ≈

∫ (^) b

a

f (x) dx

Thus we need a function p(x) which close to f (x) and easy to integrate.

Interpolatory Quadrature Formulas.

Chose nodes x 0 , x 1 ,... , xn in the interval [a, b] and compute the polynomial P (f |x 0 ,... , xn) of degree less or equal to n interpolating f at x 0 , x 1 ,... , xn. If we use the approximation

f (x) ≈ P (f |x 0 ,... , xn)(x),

then we obtain an approximation for the integral: ∫ (^) b

a

f (x) dx ≈

∫ (^) b

a

P (f |x 0 ,... , xn)(x) dx (1). (1)

These types of quadrature formulas are called interpolatory quadrature formulas.

Interpolatory Quadrature Formulas.

This leads to the quadrature formula ∫ (^) b

a

f (x) dx ≈

∑^ n

i=

wif (xi),

where wi =

∫ (^) b

a

∏n

j= j 6 =i

x − xj xi − xj dx.

Midpoint Rule.

The simplest quadrature formula can be constructed using n = 0 and x 0 = a+ 2 b. Since ∏^0

j= j 6 =i

x − xj xi − xj

we obtain the midpoint rule: ∫ (^) b

a

f (x) dx ≈ (b − a)f

a + b 2

Simpson rule.

The next quadrature formula is constructed using n = 2 and x 0 = a, x 1 = b+ 2 a, x 2 = b. Then ∫ (^) b

a

x − b+ 2 a a − b+ 2 a

x − b a − b

dx =

b − a 6

∫ (^) b

a

x − a b+a 2 −^ a

x − b b+a 2 −^ b

dx = 4

b − a 6

∫ (^) b

a

x − b+ 2 a b − b+ 2 a

x − b b − a

dx =

b − a 6

This yields the Simpson rule: ∫ (^) b

a

f (x) dx ≈

b − a 6

f (a) + 4f

( (^) b + a 2

  • f (b)

Newton Cotes Quadrature Formula.

If we have equidistant points

xi = a + ih, i = 0,... , n, h =

b − a n

then the resulting interpolatory quadrature formula is called a closed Newton Cotes quadrature formula (a and b are nodes). In this case we can use the substitution x = a + sh, to compute

wi =

∫ (^) b

a

∏n

j= j 6 =i

x − xj xi − xj

dx = (b − a)

n

∫ (^) n

0

∏^ n

j= j 6 =i

s − j i − j

ds.

Newton Cotes Quadrature Formula.

Since the interpolation polynomial is uniquely determined, the interpolating polynomial for a polynomial pn of degree less or equal to n is the polynomial itself:

P (pn|x 0 ,... , xn)(x) = pn(x).

This implies that ∫ (^) b

a

pn(x)dx =

∫ (^) b

a

P (pn|x 0 ,... , xn)(x)dx =

∑^ n

i=

wipn(xi)

for all polynomials pn of degree less or equal to n. If ∫ (^) b

a

pn(x)dx =

∑^ n

i=

wipn(xi)

for all polynomials pn of degree less or equal to n we say that the integration method is exact of degree n.

Newton Cotes Quadrature Formula.

One can even show the following result.

Theorem (Exactness of Newton Cotes Formulas)

Let a ≤ x 0 < · · · < xn ≤ b be given and let wi be the nodes and weights of a Newton Cotes formula. If n is even, then the quadrature formula is exact for polynomials of degree n + 1. If n is odd, then the quadrature formula is exact for polynomials of degree n.