0% found this document useful (0 votes)
4 views15 pages

11 online

The document outlines various numerical integration methods including the Trapezoid Rule, Simpson's Rule, and Gaussian Quadrature. It discusses how to apply these methods by dividing intervals into smaller segments and approximating the area under curves using polynomials. Additionally, it addresses error estimation and the conditions needed to ensure accuracy in these numerical methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views15 pages

11 online

The document outlines various numerical integration methods including the Trapezoid Rule, Simpson's Rule, and Gaussian Quadrature. It discusses how to apply these methods by dividing intervals into smaller segments and approximating the area under curves using polynomials. Additionally, it addresses error estimation and the conditions needed to ensure accuracy in these numerical methods.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

OUTLINE

TRAPEZOID RULE

SIMPSON 'S RULE

ROMBERG ALGORITHM

GAUSSIAN QUADRATURE

NUNIERICAL INTEGRATION
text
a

Given f- Cx )
defined on [a, b ] ÷
.

Iff )
=/ fcxtdx-

I
a

o

b
' 2X

v
or
steps :

ein,
I in cut "
P [a ,
b] into smaller intervals •→
Numerical
-

Integration
in each sub interval find a
polynomial PiCxKf!x)
,

each sub interval


-

Integrate Pi Cx ) on & sum them

up
.

TRAPEZOID RULE

nfcxl
the rule : -
cut [ a
,
b ] to n sub intervals
[


I
Xo=oe Xi ( Xi in
- Xr = b , l
l
l
l
l
'

l l l' I 7
×
a Xi Xin
-
I -
- On
Hi , Xin ] approximate f- Cx ) by a
poly of degree L

picxi )
-

fcxi )

picxi.in/--fCxite )

linear
spline
Area of trapezoid =
f- ( Xi ) -1 f- ( Xiii ) Hit ,
-
Xi)
2.
Xi in
-

! Picxtdx
I
ftcxrdx
Xi

intervals
-
sum
up for all

b) fan .dx= × ,#
I
!÷f" iiicxidx
xi

How to choose Xi 's within [a ,


b ] ?

UNIFORM GRID

Divide interval [a b] to uniform sub intervals


,
length .

b a
he
h Xi
-
=

Xiu
= -

← n
interval
length

b) fcxtdx E
!÷ 3. ffcxitfcxi
,
' .us ]

122 ! fcxo) tfcxdtfcxdtfcxdtfcx.lt - - - - - +


fkn)]

=
h .

? f- Cyo ) t f- Lxi ) t
fcxzn !
\ /

Tcf ; h )

'
[ ]
f ( x) = X I, I
-

en

12=5 intervals

-
2 -
El )
12=1
-

afcxl 5
I Xi f- ( Xi )
h -

2/5=0.4 O -
1.0 -
1.0 yo

:&:/
-

y
-
0.6 -
0.276

2 -
0.2
-
0.008

i
'
" s

s
or
.
-


.
4 0.6

5 1.0

en
fcx ) =x2
1
fcxi )
i
O -
±
1.0 1.0 1×2" "
~
= C. 816.41=0.72

}
" " ° ° " -
" "

difference
'

2 -
0.2 0.04 -2=0 . g

!
J
t l
3 0.2 0.04
4
5
at

1.0
0.36 ¥ ,
=

Igt }- =
2/3=0.667
1.0

en
fcxI= Htt [ -
1,1 ]

MATLAB -

TBD

Error Estimate
for Tcf : h
)
n -
y Xi -11

fffcx
-

Etcfih ) =
Icf ) -

Tcfih ) =
) -

picx ) ] .dx
i -_ o

Xi
-

Et :( f. h)
,
'

Xith

Reminder
Epi ( fih )
-_/[fCx ) -
Pilx , ] .dx
i -_
91 ,
- - -

.
n -
1
.

c'III. Hit
'
Xi l l
'

xix xin
can
÷
, O 1

with
Error Beard
Poly interpolation.

12 f' CG;)
'

ecxt-fcxl-P.fi ) = (x -

Xi ) (x -

Xia) Xi
-
fifties

-
3 -
h -
-

Xian
-
Xi

'

Epi Him (fan ] f' Cgi ) ) (x dx


Pilx , dx
Iz Xi Xin )
-
. = -
-

" '

E. ilfih ) =
.
f- Cgi ) h

Total Error is :

'

f' Cgi ) f' ( Gi )


'
' ' b
iz h
zh ÷ na
-

= - .
- . .

i -
. o -
-
average
"
n

f- CG)
'

fzh f' (9)(b


'

Et ( fin ) ) q E Ea BT
-

a
- - -
,

so
,
Max abs .
value
of Et Cf : h )

"

(b ) ti f- CE ) Olli)
Et Cf : h)
, za
-

.
Max
G E Corb]
second
-

order

"

eny f- Cx ) e [ 0,2 ]
-

What is the min . # of points


to be used in TR rule to make sure that

error
-
0.5154 ?
b. = 2
" -4
(b
'
be =D

-1412 Max f- CG ) Laslo


1h -
- 2-1=2 a
n ' '
-

4
fois
I. (Yn ) e lo

"
f- ( x ) = ex n 313.8 N
314 points
,
-

[0 ,
2 ]
Max f' Cx )
'
= ez

s
- -
SIMPSON 'S RULE
fcx) fly
a

Higher order
poly .

Pi CX)
• :
I
b] i
up [ a equal
'
-
Cut ,
into 212 i
'
i :
sub intervals I g
, i

k
b
king
't + z
Xo -_
or
Xzn =

b oh Xi =L
he Xiu
- -

2h
Lagrange form of Pi Cx)

:{
with uniform grid Picx )=fCXz ; ) . @ Xzits )(X
-
-
Kitz )

(ki Kita) -
i
-
Xzitz)

÷÷::÷÷:*:
""

÷ taxi .
"¥i:÷:c:* :÷¥i
ki ) H
zthfcxzitz) (X Xzi) @ Kiri ) tfcxzitz ) ( X Xzitr)
- -

+
-
-

(Xzitz -
Xzi) ite
-

Xzitr)

3
quadratic
Xzi
functions to integrate
-12

Jfx
's
I, Xzixn ) ( x Kita) DX
23h
= - - =

Xzi
X2i- 2

Iz -
-

J -

f -

Xzi ) Cx -

Xzitzjdx =

4zh3
Xzi
Xzi -12

ffx
'
Is = -

Xzi ) (x -

Xzitn) DX =

Ish
Xzi
Then ,

"

Pi Cx)
.dx=÷wfCXz ) Iet Lufkin ) Iz ÷ fcxzitc ) Is
+
; .

hjflxzi ) t
4hg-fcxzi.in ) thgfcxzitz )
=

Ig # ( Xz ; ) t 4 f- ( Kita ) t f- ( Kitz) )
5
then them :
sun
up

b) xgzitep
n -
a

fcxtdx-scf.in/- !oilx7.dxXziSCf;h3- h-z.!Iof CXzilt4fCXei- n)tf( kind

"
④ ! !
far die
.

!
I $ 1

x :*
his kin , .

i
if
-

en
f- ( x ) = x' + I
compute §fCx7dx using Simpson 's
with n=5
rule

i-##u→ 212+1=11 points he 14-17=0 .


z
2h 2h 2h 2h 2h 10

i Xi fcxi )
Scf ;
)=hz[ fo -14 fit fztfztllfstfytfq 4*5
° -
1 0.2 '
-
"

I -0.8 I
~
? -0.6
2fz Zfg
: :
:
-

' it
=÷[ fo -14 # tfstfztfq )t2(fzttqtfotfs )
°

+ fro ]

Sff ; 0.2 ) =
2,2955778

Sff : h )=
ffcxo ) -14 ?÷fCxzi , ) -12 fcxzi ) 1- f- ( Xan ) )
Simpson 's
Error Estimate for Rule

"'

Es, Ash ) =

g-o.IE f' Cgi ) Git skin ]

6
The total error :

Es Cf : h )
fo .tn?!fcYsi)Lbz-E
= -

average

Note " "


"
b
Es ( f : h ) ah f- (G ) g t [ b]
-

formula
a
error = ,

assumes that 180


futurist " 4
"
broker
Error Board ; ,
och ) i

If "kg )
b "
Eslfih ) -
h max

{ C- Lab]

"
em
fake [ 0,2]

of points needed
# when
using Simpson 's Rule
to ensure that 10.510-4
error

I # (G)
(4) " "
I
x Y
-

6=2 2. he Max 0.510


f
=
e .

a -0 180
' -
'"
maxlf I -

- e ere

hit
-
1.21810-3

→ h 10.18682

b
5.3 I 6 intervals
-
a
~= → n=
2h

Tcf : h ) → requires 314 points


=D
scfsh ) requires @ Holte

points

-
-
-
RECURSIVE RULES

can be
applied to Tcf; h ) , Scf ;h ) or
any
other method .

Recursive Rule
# trapezoid
"

Divide [ a
,
b ] into 2
equal sub intervals

m
-
- O l l
17=1 1 a l
b -
or

M =L 1 a a a 1 him =

2pm
IN / t a b s u r u f
=3

I ' i ' ' ' ' ' ' ' ' ' ' ' '
m=y
s '

12pm 12 hm
=
,

Rule
Trapezoid
.
n

Tcf ; nm ) him . foosttzfcbs teach ) .

Xi

Tff : hmu )
=

h.nu?tzfCaItIz.fCb3t??!!tfCatihm+n )
.

We the terms in Tcf; hmu ) as :


can
rearrange

Tcf ; hmu ) =

hey II. feast Izfcb ) flat item ) -1 f- Catkin ,


hmm !
I 1 LE
indices
TC film )

M - I
2
-

Tcf ; hmm )= Tcfihm ) t hmm .

f- Catkin ) hmu )
Z i -
- o

This has a

recursive
similar form can be
applied to Sff, hem) form

Given Tlfih ) → Tlfih 2) →


Tcf .lk/4 ) . - - - n

rule with
a
sequence of approximations by trapezoid
Corny method )
different values of h .

8
associated with the
Trapezoid
the error rule can be
written as :

"
proof "
htt
>
Eff ; h ) Icf ) Ilf : h
) aah 't aah ta tanh
- -
= - -
=
can ,
be
achieved
by the derivatives
Taylor series are
depends on

" '
f-
When we half the
grid size
,
error becomes

Elf : h/z)= Icf ) -


Tcf ;h/z ) -
-
ok @12140441214
- - - -

Taufik
"
' "
(1) Icf ) =
Tcf, h ) 1- aah t aah t - - - - -

tanh

"

(2) Icf ) =
Tcf ; h 12 ) -192425-1944/25 't - - -
tan@ 12 )
eliminate
Goal the
leading term to
get higher order
: error a

approximation .

22 get
Multiply 12)
by and subtract CI ) we :

(22 -
1) Icf ) = 22 Tcf ; h z ) -

Tlfihjtaqhtagh 't - - - -

Ict ) =
Tcf: h z
) -

Ig Tff ;h ) taghhtah 't - - -

>
, , -

Uch) "
)
och

Idea is called Richardson Entre


4th order

potation approximation

ROMBERG ALGORITHM

Given tlfih ) ,
Tltshl 2) , compute :

Ilf ; h )
Uch ) -
Tcf .in/zy+TCfih/2 )

22 -
1
"

tag h ta htt tanh


't
Then (f) Uch )
- - - -

I =
,

g
we can iterate this idea .

Assume we've computed Uch ) and Uch 12)

(3) Iff ) = Uch ) tac h


"
ta h 't - - - -
tank
,

"

(4) Ict ) =
uchlz )ta4④zj' tao @ 12ft - - - -
tan @ 121

cancel the leading error term


by 4) 24 -

(3)
( %) Uch )
24 12 ) Uch )
" -

Uch
Uch 2)
-

Let ch ) =
=
+
24 -
y 24 -
y

the"
Icf , = ✓ ch ) + E hb + Tight
,
- - -
tank
-

6th order
approximation '
och
)
keep this until
one can
doing
desired is reached
a
accuracy
.

STEPS of ROMBERG ALGORITHM

set h = b -
a

Rico ) Tcf 's ) )


Iz ( fla )
h Cb )
o
f-
=
,
=
-1

1211,0 ) =
Tcf .
'
HII )

R ( 2,0 ) =
Tcf ; h/z2 )
:
Rlm ,
o ) =
Tcf; hlzm )

10
Romberg Triangle
1210,0 )
>

1211,0 ) S RCI , t )
j

1212,0 ) -512141 ) >


1212,2 )
- .
→ }
: : → :
(
! I

-
i
> u 3

1242,0 ) > 12141 ) s Rin, 2 ) s - - - - - -


Rcn , n )

in
> ✓ >
U

Rch, m -
7 ) Rch -

bin -
1 )
Rcn , m ) = Rcn , in -1 ) t

22M -
1

01¥ )
" "
h

Accuracy : Ict ) = Rcn , m ) t it


m
2.

f- Cx ) .

Adoptive Simpson 's


'
Quadrature
1
1
Idea Desired
11
:
accuracy
!'_ '
check error within each sub interval
, I >x
b
or
if E desired

[
-
error

else divide
further

Gaussian quadrature

All numerical
integration rules
follow the form :

b) fcxlidx I

x; t
wo.fcx.lt
[ a,b ]
Wifcx ) twzfcxz )

called nodes
,

,
Wi 's
t - -

are
- -
1-

the
Anfcxn )

weights

11 -
.
W l r

+
Wo

,
l
For
enauple , trapezoid rule :

b or
b
-

Xo Xy w =
l l - a =
Wo =
,

or b 2

Icf ) I b-g.fi a) t
b -

g fcb )
= Cb a) -

LIED tzfcb!
/ Simpson 's rule :

Xo = a
,
X
,
=

atzb , Xz = b

Wo =
Wz = b -
a
w
,
= (b - a ) .

23
6

's
We fix the
points adjust , wi

Idea ! Allow Xi & wi to be


adjusted for higher accuracy .

Question Slnteior

What's the minimum


points
number
of Xi Is required
to
exactly integrate
what should
a
polynomial ,

be their locations & weights ?


will enact ly
integrate
No
, points
a
polynomial of degree 2kg I
-

Focus →
t.pt 69 .

ff
or
Cx) . dx I w
, f- Lxi ) a LX , lb

if f- Cx) is a
poly of .
degree 1
,
i. e. a line

f- (x)

oeotan.xga@o.ianxsdx-Ia.x! EEE
=

' " I " ' "

eines:
Wy f- ( Xy )
.
= Wei Cao + an X1 ) =
ao We .
tan (w Xp)
,

12
so
, Wy = b - a

W Xp = b2_a2
,

bta
×, -_

so
,
baffcx ) .dx=

=
Wyfcxy )

@ a) f- (
-

atzb)
we use

pore
only one
trapezoid point
Rule
to
exactly
integrate

boffin .dx -
- Cb a) -

f- Khatib ) ) poly of degree L


.

no
,
-19
using Zno
,
-1=10
2
pts .

"
en
f Cx )
- e [ 0,2 ]

§exd× =
et -

I =
6.38905609
f CX ) = 2X

Ipt 69 = (2-0) f- ( 2¥ ) .

"
= (2) e = 5.4365636

# tzfco )
=

TR rule = @ - o ) 2) )

=(2 )
e2 = e 't
error
1

CH

2.
pt GQ →
f
or
@ ota ,
x -192×2) DX =
witch ) twzflxz)
X, C- Ca, b )
C- Ce, b)
+ will have
Xz

4 egs 24 unknowns

3
GR for interval [-1 ,
I] C can be extended to
any
)
b)
interval [ a,

start with net i. e 2 nodes Xo Xp and weights


'

Wo Wr
, ,

rule satisfies
genaetlyeqwh
[ f- Cx) .dx =
Wo .

fcxo) t wa f- ( xn )

then
f C- Pm

if enact
for degree of in

the rule must be exact for functions


1,1×4×3 . - -
Xm

pts )
g
4 unknowns Xo , Xp , Wo
,
we nu (2

I
Need i
4 egs .

(2.) (2) - I =P
:#
-143=1 :
!fedx=z= wo.aitw.ci ,

f- Cx) -
-
X i
IX. dx=0 =
Wo . Xo t wi Xp -

Ix ?dx=%= #+
'

fCxI=x2 :
Wo .
w
,
.x
,

! XP
'

f- Cx ) -_x3 :
x ?dx= O =
Wo .
Xo -1W ,

fax )=x3
I
4 eqs 4 unknowns Xo= jz
-

, ,

Xp =
1/5

Wo =
Wy = 1. O
'
1B
Fs Note the
symmetry
CS fl yrs )
.
-
-11 f- ( Yrs )
try N=2 Xo , X , , Xz 213) T
-

i ,

1×3.44=0 '
Wo , Wi ,
wz

l for any other


ffcxs.ch/=wofCxoltWsfCxeltwzflxzj
-

(1) f} ) -141431=0 function


I
c-
-

14 -
f degrees for poly .
-
fix ) -_x4
if I! =
}

¥1 ;
'
fcxtx -

- 213

(1) fg) -1141=2/3


interval [ a ,b]
For a
general ,
use

transformation

t-2lxf@tbJb-oex-IzCb-eD.t +
Izcatb )

so
for -
I t 1 we have a x (b

15

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy