+ All Categories
Home > Documents > 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others...

1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others...

Date post: 11-Jan-2016
Category:
Upload: griselda-parsons
View: 216 times
Download: 0 times
Share this document with a friend
Popular Tags:
19
1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather than evaluating them exactly using a complicated antiderivative of f(x) Example: The solution of this integral equation with Matlab is 1/2*2^(1/2)*pi^(1/2)*FresnelS(2^(1/2)/pi^(1/2)*x) we cannot find this solution analytically by techniques in calculus. dx x ) sin( 2
Transcript
Page 1: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

1

NUMERICAL INTEGRATION

• Motivation:

Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather than evaluating them exactly using a complicated antiderivative of f(x)

• Example:

The solution of this integral equation with Matlab is 1/2*2^(1/2)*pi^(1/2)*FresnelS(2^(1/2)/pi^(1/2)*x)

we cannot find this solution analytically by techniques in calculus.

dxx )sin( 2

Page 2: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

2

• Methods of Numerical Integration– Trapezoidal Rule’s– 1/3 Simpson’s method– 3/8 Simpson’s method

• Applied in two dimensional domain

Course content

Page 3: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

3

Trapezoidal Rule’s

f

fp

Page 4: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

4

• Function f approximately by function fp. Then,

where fp is a linear polynomial interpolation, that is

By substitution u=x-x0 we have

where

dxffdx p

)()( bf

ab

axaf

ba

bxf p

)()(2

bfafh

dxffdx p

abh

Page 5: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

5

Trapezoidal Rule’s

f

fp

Page 6: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

6

• For two interval, we can use summation operation to derive the formula of two interval trapezoidal that is

where

)()(2

)()(2 2110 xfxf

hxfxf

hfdx

202 xx

h

)()(2)(2 210 xfxfxfh

Page 7: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

7

Trapezoidal Rule’s

f

fp

Page 8: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

8

• Similar to two interval trapezoidal, we can derive three interval trapezoidal formula that is

where

• Thus, for n interval we have

where and

for

)()(2)(2)(2 3210 xfxfxfxfh

fdx

303 xx

h

)()(2)(2

1

10 n

n

ii xfxfxf

hfdx

n

xxh n 0

)(12

)( ''20t

nr xfh

xxE

21 ii

t

xxx

Page 9: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

9

1/3 Simpson’s

f

fp

Page 10: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

10

• Function f approximately by function fp. Then,

where fp is a quadratic polynomial interpolation, that is

By substitution u=x-x0 we have

where

dxffdx p

)()()( 2

1202

101

2101

200

2010

21 xfxxxx

xxxxxf

xxxx

xxxxxf

xxxx

xxxxf p

)()(4)(3 210 xfxfxfh

dxffdx p

202 xx

h

Page 11: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

11

f

fp

1/3 Simpson’s

Page 12: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

12

• For 4 subinterval we have

where

• Thus, for n subinterval we have

where and

)()(4)(2)(4)(3 43210 xfxfxfxfxfh

fdx

404 xx

h

)()(2)(4)(3

2

6,4,2

1

5,3,10 n

n

jj

n

ii xfxfxfxf

hfdx

n

xxh n 0

)(180

)( )(40t

ivnr xfh

xxE

Page 13: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

13

3/8 Simpson’s

ffp

Page 14: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

14

• Similar to 1/3 Simpson’s method, f approximately by function fp where fp is a cubic polynomial interpolation, that is

By substitution u=x-x0 we have

where and

)()(

)()(

3231303

2102

321202

310

1312101

3200

302010

321

xfxxxxxx

xxxxxxxf

xxxxxx

xxxxxx

xfxxxxxx

xxxxxxxf

xxxxxx

xxxxxxf p

)()(3)(3)(8

33210 xfxfxfxf

hdxffdx p

303 xx

h

)(80

3 )(5t

ivr xfhE

Page 15: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

15

Numerical Integration in a Two Dimensional Domain

c(x)

d(x)

=a b=0x 1Nx1x Nx

0,0y

2,1y

1,1y

0,1y

Ny ,0

2,0y

1,0y

Ny ,1NNy ,

2,Ny

1,Ny

0,Ny

Page 16: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

16

• A double integration in the domain is written as

• The numerical integration of above equation is to reduce to a combination of one-dimensional problems

dxdyyxfIb

a

xd

xc

)(

)(

),(

Page 17: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

17

Procedure: • Step 1: Define

So, the solution is

• Step 2: Divided the range of integration [a,b] into

N equispaced intervals with the interval size

So, the grid points will be denoted by

and then we have

)(

)(

),()(xd

xc

dyyxfxG

b

a

dxxGI )(

N

abhx

Nxxx ,,, 10

,),()()(

)(i

i

xd

xc

ii dyyxfxG

Page 18: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

18

• Step 3: Divided the domain of integration

into N equispaced intervals with the interval size

So, the grid points denoted by

• Step 4: By Applying numerical integration for one-dimensional (for example the trapezoidal rule) we have

for

N

xcxdh iiy

)()(

)(),( ii xcxd

Niii yyy ,1,0, ,,,

1

1,,0, ),(),(2),(

2)(

N

jNiijiiii

yi yxfyxfyxf

hxG

Ni ,,2,1,0

Page 19: 1 NUMERICAL INTEGRATION Motivation: Most such integrals cannot be evaluated explicitly. Many others it is often faster to integrate them numerically rather.

19

• Step 5: By applying numerical integration (for example trapezoidal rule) in one-dimensional domain we have the solution of double integration is

)()(2)(2

1

10 N

N

ii

x xGxGxGh

I


Recommended