num_difrntiation

num_difrntiation - Numerical Differentiation llO Finite...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Numerical Differentiation llO Finite Difference Differentiation 0 h — 0 Formal Definition of the Derivative f’ (:30) = W If we simply let h be “small”, we have an approximation to the derivative, fa) z _f<wo + h; — f<wo> If h > 0 this is a forward—diflerence formula and if h < 0 this is a backward—difierence formula. It has a unique relation to the Taylor series for f (3:0 + h) mo + h) = mg) + h f’(m0) + gm Mg) , g 6 ($0, $0 + h) f($0+h) _f(x0) mo) = MT— + f”(€) Our approximation to the derivative is obtained by dropping the last term Which introduces an error of 0(h). The smaller the value of h, the smaller the mathematical error. However, very small h results in numerical subtraction of two “nearly identical” numbers so it introduces round—off error. A centered difference formula for the derivative is: mg) % f(:ro + h>2—hf<aso — h) The error in this formula is 0(h2) lll “61:13:35 Sometimes the points are not equally spaced so numerical implementation of the centered difference formula is impossible. Consider the case of y = f with values at specific points known as sketched below: <——-—><——> L1 l L2 I For all interior points (1132 to 3:6) in the figure, interpolation of derivatives at the center of adjacent points can be used to generate the equivalent of a centered difference formula at each of the X—points, even when the distnces, L, are not equal. The resulting formula is: / qm _ qm—l 1 [ym+1 ym—l] f ( m) y 2 gm gm—l 2 gm qm—l ( ) 1 where: qm : §(Lm+1 + Lm) For estiating the derivatives at the end points, extapolation can be used from the numerical derivative half way between the two endmost points using the forward or backward difference formula and the the derivative at the nearest interior point given by the above formula. 112 I»»/ v.3; “51¢? I Sometimes values of a function, y, are given at unequally spaced points around the periphery of a plane curve as sketched below. L4 The lengths L are are lengths (s) between points on the curve and values of y are known at points ( 1, 2, ..., N) on the curve. To obtain the numerical approximation of the tangential derivative 3/ (s) at points 1,2,3, N, equation (1) can be used. However, for point m = 1, special values for some of the y’s and some of the L’s must be used. In particular ym_1 : yN and Lm_1 = LN. Likewise for for point m : N, ym+1 : yl and Lm+1 : L1. 113 UI4 To estimate the error in Simpson’s rule, the function over four successive points can be expanded in a Taylor series up to order 3. With equally spaced points, the error in the integral from the cubic term vanishes and the dominant term in the error is proportional to the fourth derivative d4 f / dart“. For equally spaced points with h 2 A33, the total error, ET takes the form: M n-1 d4f(m-) E =—— T 901-:1 (1:34 772- is some value of a: in the ith interval. 114 H mama "an.pH .LH ..c/mm.mx mm.mx mm.mx..fivacTLqm um_mm_:x m..:omQETm new rmuTONQOLF .Lmrzmzmuuwm eoLm mFmmeuCH...c/ mx..wvmp:anm u O.m £fimH” WH . "new ”m~+xV>+ mfl+¥V>%o.v+ nxv> + mH u mH “Nucumna n x Low “AA:V>%m.o +Afiv>*m.o + uHV ; u pH unnfiv>+LHv%; u LH “ucm "Axvx + pH u.uH unxv> + LH u LH Hucnm u x Low “0 H WH‘ “ouuH no u LH umflvN - mmvN u g uvcw “ma”.w&_ Hnwmvmcmumw u nxv> and .+&. owmvmcmumw u anN .cna n x Low “ma..cx..Uvamcmumw u : un_L.._vacmnom n upw um.m... "mew: erw pang? qucm.vu:Q:r n pw$ mFZHOm Dmu<mm >44<30m IFHE ZOHF<MUmFZH 4<UHmmZDZ 00 OF FQHMUm& ucT53c 115 H mama uwmQTLm cam.© mem.© nem.m VOm.m 00m.o omv.m onv.m ovv.o oov.o 0mm.m OmN.m ooa.w oom.m 00m.m ooo.m ooo.v ooo.o OmOmOmOmOmOmOmOmO ONMNONmNONLfiNONmNO HOOOOHHHHNNNNmmmmv l\ 116 3.5 2.5 1.5 0.5 1.17 Ed mmnvanm H wamm oow>©.mm pxu.ummmflgm AA mhmvm.mN ooom>.NN mwasm m.comQEHm Ucm HmUHonQmHB \Hmaswcmuomm Eouw mamuwwucH "mama maflw uSQCH Hmucm pcflasc AA NOON ~om HmQOpUO zovcflz UQmEEoo mmqeflz 118 ...
View Full Document

Page1 / 9

num_difrntiation - Numerical Differentiation llO Finite...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online