25
Numerical Integration !Improper Integrals "Change of variable "Elimination of the singularity "Ignoring the singularity "Truncation of the interval "Formulas of Interpolatory and Gauss type "Numerical evaluation of the Cauchy Principal Value !Indefinite Integration "Indefinite integration via Differential Equations "Application of Approximation Theory Marialuce Graziadei Ref. ‘Methods of Numerical Integration’, Philip J. Davis and Philip Rabinowitz.

Improper Integral1

  • Upload
    lev-dun

  • View
    35

  • Download
    0

Embed Size (px)

DESCRIPTION

numerical integration

Citation preview

Page 1: Improper Integral1

Numerical Integration

!Improper Integrals"Change of variable"Elimination of the singularity"Ignoring the singularity"Truncation of the interval"Formulas of Interpolatory and Gauss type"Numerical evaluation of the Cauchy Principal Value

!Indefinite Integration"Indefinite integration via Differential Equations"Application of Approximation Theory

Marialuce Graziadei

Ref. ‘Methods of Numerical Integration’, Philip J. Davis and Philip Rabinowitz.

Page 2: Improper Integral1

6/11/2002 Seminar: Numerical Integration 2

Definitions

Improper integrals Integrals whose integrand is unbounded.

1) • is defined on

• is unbounded in the neighbourhood of

)(xf ( ];,ba

.ax =)(xf

∫∫ =+→

b

rar

b

a

dxxfdxxf )(lim)(

2)• is defined on

• is unbounded in the vicinity of with

The Cauchy Principal Value of the integral is defined by the limit

,x c= .bca <<)(xf [ ] { }, \ ;a b c

)(xf

[ ]∫+∫∫ =+

→ +

b

rc

rc

ar

b

a

dxxfdxxfdxxfP )()()(0

lim

Page 3: Improper Integral1

6/11/2002 Seminar: Numerical Integration 3

Change of variableSometimes it is possible to find a change of variable that eliminates the singularity.

[ ]1,0)( Cxg ∈Example 1

∫ ≥=−1

0

1

2)( ndxxgxI n

The change of variable transforms the integral intoxnt =

∫= −1

0

2 )( dttgtnI nn

But (example 2)1

0

log( ) ( )I x g x dx= ⋅∫ lo gt x= −

becomes

0

( )t tI te g e d t∞

− −= − ∫ Infinite range of integration

which is proper.

with

Page 4: Improper Integral1

6/11/2002 Seminar: Numerical Integration 4

Elimination of the singularity

General ideas: subtract from the singular integrand a function! integral is known in closed form;! is no longer singular.This means that has to mimic the behaviour of closely to its singular point.

)(xf ( ) .g x

)()( xgxf −

)( xg )(xf

Example

.1cos21cos1cos 1

0

1

0

1

0

1

0∫

−+∫ ∫ =−+∫ = dxxxdx

xxdx

xdx

xx

But

near , so the last integrand in now in [ ]1,0C2

1cos2xx −≈−

0=x

( )g x

Page 5: Improper Integral1

6/11/2002 Seminar: Numerical Integration 5

Ignoring the singularityIt is also possible to avoid the integrand singularities and apply the standard quadrature rules.We want to compute

where is unbounded in the neighbourhood of

!Then we set (or any other value) and use any sequence of rules.

!Another option: use a sequence of rules that do not involve the value of at

,)(1

0∫ dxxf

)( xf .0=x

.0=x)( xf

0)0( =f

Page 6: Improper Integral1

6/11/2002 Seminar: Numerical Integration 6

Ignoring the singularityExample 1

32 × S 1.8427 G2 1.65068

64 × S 1.8887 G3 1.75086

128 × S 1.9213 G4 1.80634

256 × S 1.9444 G10 1.91706

512 × S 1.9606 G16 1.94722

1024 × S 1.9721 G32 1.97321 S = Simpson G = Gauss

1

0

2d xx

=∫

But the method of ‘ignoring the singularity’ may not work if the integrand is oscillatory

1 1

0 0

1 1 1 s ins in ( 2 ) .6 2 4 7 1 32

xd x d xx x x

π= − =∫ ∫

No patterns of convergence is discernible

from this computations

32 × S 2.3123

64 × S 1.6946

128 × S -0.6083

256 × S 1.2181

512 × S 0.7215

1024 × S 0.3178 S = Simpson

Example 2

Page 7: Improper Integral1

6/11/2002 Seminar: Numerical Integration 7

Ignoring the singularity

∑==

m

kkk xfwfR

1)()(

However let designate a fixed m-point rule of approximate integration in ]1,0[R

∑ =>≤<<<≤=

m

kkkm wwxxx

121 ,1,0,1...0with

and let designate the compound rule that arises by applying to each of the subintervals

nR R

[ ] [ ] [ ] ,1,/)1(,...,/2,/1,/1,0 nnnnn − then

TheoremIf is a monotonic increasing integrable singular function with a singularity at then

)( xf,0=x

.)()(lim1

0∫=

∞→dxxffR nn

0 1n/1 n/2 nn /)1( −

Page 8: Improper Integral1

6/11/2002 Seminar: Numerical Integration 8

Proceeding to the limit

Integral to be evaluated:

! is continuous in (may be unbounded in ).! is a sequence of points that converges to 0 (e.g ).

∫1

0

)( dxxf

)(xf 10 ≤< x 0=x...1 21 >>> rr n

nr−= 2

...)()()()(2

3

1

21

11

0∫ +∫ +∫ +∫ =r

r

r

rrdxxfdxxfdxxfdxxf

proper integrals

The evaluation is terminated when

ε≤∫+1

)(n

n

r

r

dxxf

Page 9: Improper Integral1

6/11/2002 Seminar: Numerical Integration 9

Truncation of the interval1 1

0 0

( ) ( ) ( )r

r

f x d x f x d x f x d x= +∫ ∫ ∫Then, if

we can simply evaluate the proper integral

ε≤∫r

dxxf0

)(

Example∫1

)(r

dxxf

∫+

=1

0 31

21

)( dxxx

xgI 1)( ≤xgwith g bounded in e.g.,0 ,1

But in [ ]1,0

21

31

21

2

1)(

xxx

xg ≤+

∫ =≤∫+

rr

rx

dxdxxx

xg0

21

21

0 31

21

2

)(

And, if we take , we get an accuracy of 610−≤r 310−

Page 10: Improper Integral1

6/11/2002 Seminar: Numerical Integration 10

Integration Formulas of Interpolatory TypeConsider the integral

∫1

0

)()( dxxfxw

where is a function with a singularity in the neighbourhood of , but such that

)(xw 0=x

∫1

0

)( dxxxw k exist for .,...,1,0 nk =

1

00

( ) ( ) ( )n

i ii

w x p x d x w p x=

= ∑∫

The, for a given sequence of abscissas , we can determine weights such that

1...0 10 ≤<<< nxxxiw

whenever .np P∈This leads to the approximate integration formula

∑≈∫=

n

iii xfwdxxfxw

0

1

0)()()(

Page 11: Improper Integral1

6/11/2002 Seminar: Numerical Integration 11

Integration Formulas of Interpolatory TypeExample

12( )w x x

−= 0 1 2

1 2, , 1.3 3

x x x= = =

1 12

1 2 30

1 11 2 2

30

2,

2 2 ,3 3 3

w w w x dx

w w w x xdx

+ + = =

+ + = =

.52

94

92

1

0

21

321 =∫=++

dxxxwww

This leads to the rule

( )1 1

2

0

14 1 8 2 4( ) 1 .5 3 5 3 5

x f x dx f f f− ≈ − +

Page 12: Improper Integral1

6/11/2002 Seminar: Numerical Integration 12

Integration Formulas of Gauss TypeSingularities may be accommodated by means of Gauss-type formulas. The integral is written in the form

,)()(∫=b

a

dxxfxwIwhere is a fixed positive weight function. The moments)( xw

∫b

a

n dxxxw )( exist for ,...1,0=nbut may have one or more singularities in the interval)( xw [ ]ba ,The corresponding orthonormal polynomials are and their zeros are)( xp n

nwww ,...,, 21Then (positive constants) can be found such thatbxxxa n <<<<< ...21

∑=∫=

n

kkk

b

a

xpwdxxpxw1

)()()(

∑≈∫=

n

kkk

b

axfwdxxfxw

1)()()(

Page 13: Improper Integral1

6/11/2002 Seminar: Numerical Integration 13

Integration Formulas of Gauss TypeWe want to compute the integral

1

0

( ) ( ) ,I L o g x f x d x= ∫• is regular in [0,1]( )f x

We need[0,1].

1

0

( )( ) .nnI L o g x x d x= −∫

yx e−=•

• integration by parts

( 1 )2

0

1 11 ( 1)

m ymI e d y

m m

∞− += =

+ +∫

To get them, we must solve( )nG x polynomials orthonormal to in( )Log x

By Mme Henri Berthod Zabrowski

Page 14: Improper Integral1

6/11/2002 Seminar: Numerical Integration 14

Integration Formulas of Gauss Type

• Points • Weights

1

0

( ) i j i jL o g x G G d x δ− =∫• Polynomials

( )

( )

0

1

2

2

3 2

3

1,

12 1 ;47

5 252 180 17;

12 7

7 258800 310500 92016 4679;

9 10849 647

G

G x

x xG

x x xG

=

= −

− +=

− − −=

10.25

0.6022770.112009

0.2814610.718539

0.5134050.3919800.094615

0.0638910.3689970.766880

Page 15: Improper Integral1

6/11/2002 Seminar: Numerical Integration 15

Integration Formulas of Gauss Type

• Example1

0

( ) 0 .8 2 2 4 6 7 0 .1 1 2

L o g xI d xx

π= − = =+∫

n=3

7

0 .8224485

185 10com puted

exact com puted

I

I I −

=

− = ⋅

Page 16: Improper Integral1

6/11/2002 Seminar: Numerical Integration 16

Numerical Evaluation of the Cauchy Principal Value

Reduction of the CPV to one-sided improper integral is possible.

)( xf cx = .bca <<unbounded in with

Suppose that ∫b

a

dxxfP )( exists.

0( ) lim ( ) ( )

b c r b

ra a c r

P f x f x dx f x dx−

→+

= +

∫ ∫ ∫

Consider

Decompose in its odd and even parts

Odd Even

0c =)( xf

.b a=and

[ ])()(21)( xfxfxg −−= [ ])()(

21)( xfxfxh −+=

Page 17: Improper Integral1

6/11/2002 Seminar: Numerical Integration 17

Numerical Evaluation of the Cauchy Principal Value

.2 )(

)()()()(

)()(

=∫ ∫+∫+∫

=∫+∫−

+a

r

a

r

a

r

r

a

r

a

a

r

r

a

dxx

dxxdxxdxxdxx

dxxfdxxf

h

hhgg

Therefore

0.( ) 2lim ( )

a a

ra r

P f x dx h x dx+→

=∫ ∫

Page 18: Improper Integral1

6/11/2002 Seminar: Numerical Integration 18

Numerical Evaluation of the Cauchy Principal Value

∫−

1

1 xdxP

Example1

01

1

=∫− x

dxP( ) 01121 =

−=

xxxh

Example2

dxx

ePx

∫−

1

1

( ) ( )xxx

exexh

xx

sinh121 =

−+=

xdx

xxdxeP

x

∫=∫−

1

0

1

1

)sinh(2

Page 19: Improper Integral1

6/11/2002 Seminar: Numerical Integration 19

Numerical Evaluation of the Cauchy Principal Value

The method of subtracting the singularity may also be used.( )( ) ,

b

a

f tI x P d t a x bt x

= < <−∫

Hilbert transform of

)( xf( ) ( )( ) ( )

( ) ( ) ( ) log .

b b

a a

b

a

f t f x dtI x dt f x Pt x t xf t f x b xdt f xt x x a

−= + =− −− −+− −

∫ ∫

∫Consider the function

( ) ( )( , ) ,

( , ) '( ) .

f t f xt x t xt x

x x f x t x

φ

φ

−= ≠−

= =band solve∫a

dtxt ),(φ∗ Interpolatory-type and Gauss-type formulas have been developed for Cauchy Principal Value integrals.

Page 20: Improper Integral1

6/11/2002 Seminar: Numerical Integration 20

Numerical Evaluation of the Cauchy Principal Value

It may be useful to consider

( ) ( )( , ) .x h h

x h h

f t x f xt x dt dtt

φ+

− −

+ −=∫ ∫If can be expanded in a Taylor series at then we have( )f x ,t x=

2

3

''( ) '''( )( , ) '( ) ...2! 3!

'''( )2 '( ) ...9

x h h

x h h

t f x t f xt x dt f x dt

h f xhf x

φ+

− −

= + + +

= + +

∫ ∫

Page 21: Improper Integral1

6/11/2002 Seminar: Numerical Integration 21

Indefinite IntegrationWe want to compute

bxadttfxFx

a≤≤= ∫ )()(

or the more complicated

bxadttxfxFx

a≤≤= ∫ ),()(

Two choices

•Regard the as a definite integral over a variable range;

•Regard as the solution of the differential equation

)( xF

)( xF

( ), ( ) 0.dF f x F adx = =

The simplest approach:

•divide the interval of integration into a set of subintervals;

•apply a rule of approximate integration to each subinterval.

Simpson’s rule is widely used

bxa ≤≤

Page 22: Improper Integral1

6/11/2002 Seminar: Numerical Integration 22

Indefinite Integration via Differential EquationsWe can use familiar rules. Consider, for example, the classical Runge-Kutta method for the solution of

.)(),( 00 yxyyxgdxdy ==

The relevant formulas are

1 1 2 3 4

11 2

23 2 3

( 2 2 ),6

( , ), ( , ),2 2

( , ), ( , ).2 2

m m

m m m m

m m m m

hy y k k k k

hkhk g x y k g x y

hkhk g x y k g x h y hk

+ = + + + +

= = + +

= + + = + +

A general multistep method for indefinite integration would consist in computing the value of the integral at the next step, in terms of the values of the integral previously computed, and in terms of the values of the integrand,

1+ny,...,, 1−nn yy

),...(),(),( 11 −+ nnn xfxfxf

Page 23: Improper Integral1

6/11/2002 Seminar: Numerical Integration 23

Indefinite Integration-Approximation Theory

∞<<<∞−≤≤= ∫ babxadttfxFx

a)()(

Suppose we can approximate with )( xf

,)()(...)()()( 10 bxaxxxxxf n ≤≤++++= εφφφ

( ) ,x a x bε ε≤ ≤ ≤

( ) ( )x

i ia

x t dtψ φ= ∫Then

and that

is simple to calculate.

),()(...)()()()( 10 xxxxdttfxF n

x

aηψψψ ++++∫ ==

with .)()()( εεη abdttxx

a

−≤∫=

Page 24: Improper Integral1

6/11/2002 Seminar: Numerical Integration 24

Indefinite Integration-Approximation TheoryChebyshev Polynomials

11...,,1,0

...)1(2

)coscos()( 22

≤≤−=

+−

+=⋅= −

xn

xxn

xxarnxT nnn

or

0 1

1 1

( ) 1, ( ) ,( ) 2 ( ) ( ), 2,3,...,n n n

T x T x xT x xT x T x n+ −

= == − =

If the function satisfies a Lipschitz condition in it can be expanded in an uniformely convergent series of Chebishev polynomials.

)( xf [ ]1,1 ,−

...)()(21)( 22110 +++= xTaxTaaxf

Page 25: Improper Integral1

6/11/2002 Seminar: Numerical Integration 25

Indefinite Integration-Approximation Theory

The coefficients of the series are given by

Orthogonality

1

21

, 0,( ) ( ) , 0,

210, .

m n

m nT x T x dx m n

xm n

ππ

= == = ≠

− ≠

∫∫−

=−

ϑϑϑππ 0

1

12

cos)(cos21

)()(2 drfdxx

xTxfa rr

For many functions the sequence decreases to zero rapidly. So,..., 10 aa

0 1 1 11 2

2

( ) ( )( ) ( ) ( )2 4 2 1 1

r r r

r

a a a T x T xf t dt T x T x consr r+ −

=

= + + − + + − ∑∫