differentiation - oregon state universitysites.science.oregonstate.edu/~restrepo/mth452/... ·...
TRANSCRIPT
NUMERICALDIFFERENTIATION
f4xo hhmo flxothyfx.li
oElaiDfEC4abTFinite difference Approximations
six
Assumefix issufficientlysmooth oh Xoth
Sixth ftp.hflxdtthYYxd ffh3f Gift
ForwardDifference Approximatiatoffxo
ftxothl f d.fi xo tfhf45 3Efxoxothh
BackwardDifference Approximation error
ftp.flxo.hI
a sf teth143 Elko hid
CenterDifferenceApproximationtoffxo
ffxoth7 ffxo.tn2
fExo tfhf 3h Terror
The center difference approximation
ftp.flxothl f xo h2h
is 01h21 approximationwhereas
f'M fCxuth 7 forwardh
tcxdflxo.tl backward
1hare 01h approximations
ex Using derive a finitedifferenceapproxinahu
to f Cxo
I
use ff fGoth 2Mt Ho h
t fh f 13 error
tle OCK center difference approximationRush highorder approximationcouldbefoundfromTaylorseries
GENERALPROCEDUREFORDERIVATIVES BYFINITE DIFFERENCES
Issue f E Cnt Cab lattice xi3i.no
fix g that lady t iIcxxi7Terror
Lagrange polynomials
Differentiate both sides
ntl
fix EHaddidnt H GI axilforany Xfl aid Now confineto X Xi is
this thadduki t if Gftp.xila
errorLossofPrecision in Computing DerivativesCautionarytale computingderivatives usyfiniteprecision Suppose approximate Hx bycenterdifference
X 4h Cflxoth throh YfGlet faith Ftxth t eExoth
theM 4 PrusIerror
W FCxoth khekothzge
x.nl
hj f 45
assure lea.IM cE
f4D cMTleutletnncataapbesGnitepseeisiaerror yields
114 1 Flinch 3Eq thatElm's
y
EAµ
El isemininel
ii
hi
NUMERICALINTEGRATION QUADRATURE
163mostConnon strategiesn Fixxi findZiemann dx re Eciflxi naunknownsciSum iso
Gaussian 11 dx.ggqffxi seFndxiicis.tQuadrature II Hismmnised2h unknowns
Montecarlo MC ffcxdxn.im tmsiosthmemguessessiaceepLMoftlese
RIEMANNSUMS
Assume Lxi distinct on Cab
bflxidxsfb.ESxi liCx7dx
f Icx.oilfmY5Ddxhtt
If dx Ecifcxi t Error f Terroris 0
G Gdx is91,2 in
EXAMPLES RIGHTHAND8LEFTHANDSUMS eex Piecewise arstatholxPide Xosa X sb hex Xo
Xo X
rec 1 lies I
NI
LAR feokddxfcxdshfk.io h X XzTo
fati error is
underestimate
µr i for fkoLHR funchies
f Exactfor Cx
Xoh x
Emory dx LARI Gkixddx.ch f433
CoMPosiTEhHRff Yfa X Yz Xm Xn b
n l Xo Xu
bfhddxeiqoxiflxi oxi xiti
xigpyp.fi'eRcxdxftxDh fjem
oerrorisover
asxo.ba 7 77467 PHR functions
x
COMPOSITE PHR
fabfcxsdxe.EOxiflx.jpJti Iitixihy
ta X Yz Xn Tn byu
TRAPEZOIDAL Xosa X sb h X Xo
Xl Xl
Stands t MdxXo Xo
f G Cx xxx x d
Terror we'll usethemeanucleetleoren
x
fftddx.bz flxdtfCxi
f g ixxDCx a dx
ffcxdtflx.tl B I hz xi.mx
Xi
ffhddxshz fflxdtf.CH Y3zf4s
Xu Terror01h37
f i giftf no error
Xo XlCOMPOSITE TRAPEZOIDAL
fakddxz.tn 8xifCxi tOxzfho t0xngflxn
ftp.yykxsxaoxz x.xbn
Composit UNIFORMGRID NEWTON COATES
I dx re tho 2fix t2fGd
2fanD t fanwith Ox ban
RudiNewton Gates quadrature refers toquadratureformulas on equallyspacedintends
Simpson Uses 2ndorder Lagrangepolynomialsand this requires atleast 3points
Xo a X at h Xz bI
h s b
ffabfixdxsflolxlfcxdtl.CMdxDtlzCxlfCxzDdx
f ftp.xokx.xkx.xdfmfscxddxE error
Xz
ffcxjdx flolxlfcxdtl.CMdxDtlzGdfCxzDdx
01h fIt turnsoutthat theerror isoverlypessimistic
see
printednotes Byusingan integral oftheTaylor
series of fad about X one can find
Iaadx hglfcxdt4flxdtflxdfghgf.MG
SAMPSON
error errorerrorOchs
tN exactforfadSIMPSON FERG
i
Xo X Xz
COMPOSITE SIMPSON Newton GatesVersion
f dxqoxgfkxdt4flxdtlfcxd.tlfCxDtt2flxyt 2fCxn.jt4flxn.ptflxn
nhustbeeoeuaxsbn
affxft.snXxz x.xbn
ADAPTIVE QUADRATURE
Reg uses Richardsonextrapolationfeelater
Adhoc use a finergridwhere fG charges moreri e where f Nae large
GAUSSIANQUADRATURE
ChooseExitsin and fi 3in so that
ECsx It dx a flail ftis minimized There are In unknowns
Ci and 2x
Thetraditional strategy is to differentiate fwith respectto Xi's and Ci's and set these all
to zero The 1 3 ki that minimize Efix theseunknowns
Traditionally pick fad CPen Gand then find Xi is Eh that lead
to C so i
ex Take aid EH and n 2
Ci Cz X Xz are unknowns M
R f dx.in ciffxi7
if f Epyx then
froth xtazx4 azxfdx.aedxta
dxtaz.fx2dxtazfx3dx
where ai are arbitrayarstats suffices to
show that issatisfied when aistis91,213
a gxo.tczx.ISdx
2cixitczxis.ixdx0
cxitcaxis dx
cix.twf'x3dxsoSohrgforeiixi
G Cz lxi zV3 Xz Bg
i f k dxxffr tffBg