computational method - higher derivatives
DESCRIPTION
Lecture slide for Computational Method.It is more related to maths solving exercise.TRANSCRIPT
![Page 1: Computational Method - Higher Derivatives](https://reader035.vdocuments.us/reader035/viewer/2022072009/55cf9292550346f57b979387/html5/thumbnails/1.jpg)
January 22,2015 Thursday Repl class
Dr Azizan 1
FCM2043Computational Methods
Week 2(4), Lecture 6-Finite Difference Approximations
of Higher Derivatives-Lecturer: Dr Azizan
![Page 2: Computational Method - Higher Derivatives](https://reader035.vdocuments.us/reader035/viewer/2022072009/55cf9292550346f57b979387/html5/thumbnails/2.jpg)
January 22,2015 Thursday Repl class
Dr Azizan 2
Lesson outcome
• At the end of this session, you should be able to use a centered difference approximation of O(h2) to estimate the second derivative of a function.
![Page 3: Computational Method - Higher Derivatives](https://reader035.vdocuments.us/reader035/viewer/2022072009/55cf9292550346f57b979387/html5/thumbnails/3.jpg)
January 22,2015 Thursday Repl class
Dr Azizan 3
);19(fromitgsubtractinand2by)12(gmultiplyinand
)12......(..........!3
)(!2
)()(')()(
expansion;seriesTaylorForwardtheRecall
)19.....(!3
)2(!2
)2)(()2)((')()(
:)(oftermsin)(forexpansionseriesTaylorforwardawritewethis,doTos.derivativehigherofestimation
numericalderivetousedbecanexpansionseriesTaylor
3)3(
21
3)3(2
2
2
hxfhxfxfxfxf
hfhxfhxfxfxf
xfxf
iiiii
iiii
ii
![Page 4: Computational Method - Higher Derivatives](https://reader035.vdocuments.us/reader035/viewer/2022072009/55cf9292550346f57b979387/html5/thumbnails/4.jpg)
January 22,2015 Thursday Repl class
Dr Azizan 4
....12
)(7)()(
)20....().........()()()(2)(
)()()(2)()()()(2)(
)()()(2)(;derivativesecondtheafterseriesthetruncateNow
...12
)(7)()()()(2)(
2.....!3
)(2!2
)(2)('2)(2)(2
)19(......!3
)2(!2
)2)(()2)((')()(
2)3(
212
2212
2212
22
12
4)4(
3)3(212
3)3(
21
3)3(2
2
hxfhxfhOwhere
xfhOh
xfxfxf
xfh
RxfxfxfhxfRxfxfxf
Rhxfxfxfxf
Rhxfhxfhxfxfxfxf
Rhxfhxfhxfxfxf
Rhfhxfhxfxfxf
ii
iiii
iiii
iiii
iiii
ni
iiiii
nii
iii
ni
iii
'second forward finite difference'
![Page 5: Computational Method - Higher Derivatives](https://reader035.vdocuments.us/reader035/viewer/2022072009/55cf9292550346f57b979387/html5/thumbnails/5.jpg)
January 22,2015 Thursday Repl class
Dr Azizan 5
Exercise• Perform manipulations to obtain a 'second
backward finite difference'
......12
)(7)()(where
)21)......(()()(2)()(
2)4(
)3(
221
hxfhxfhO
hOh
xfxfxfxf
ii
iiii
![Page 6: Computational Method - Higher Derivatives](https://reader035.vdocuments.us/reader035/viewer/2022072009/55cf9292550346f57b979387/html5/thumbnails/6.jpg)
January 22,2015 Thursday Repl class
Dr Azizan 6
Exercise• Perform manipulations to obtain a 'second
centered finite difference'
)23.....(
)()()()(
)(
asexpressedbecandifferencefinitecenteredsecondtheely,Alternativ
......360
)(12
)()(where
)21)......(()()(2)()(
11
4)6(
2)4(
2
22
11
hh
xfxfh
xfxf
xf
hxfhxfhO
hOh
xfxfxfxf
iiii
i
ii
iiii
![Page 7: Computational Method - Higher Derivatives](https://reader035.vdocuments.us/reader035/viewer/2022072009/55cf9292550346f57b979387/html5/thumbnails/7.jpg)
January 22,2015 Thursday Repl class
Dr Azizan 7
Example
expansion.seriesTaylortheoftermremaindertheofbasisthe
onresultsyourInterpret.derivativesecondtheofvaluetruethewithestimatesyourCompare
.125.0and25.0sizesstepusing2at887625)(
functiontheofderivativesecondtheestimateto)(ofionapproximatdifferencecenteredaUse
23
2
hxxxxxf
hO
![Page 8: Computational Method - Higher Derivatives](https://reader035.vdocuments.us/reader035/viewer/2022072009/55cf9292550346f57b979387/html5/thumbnails/8.jpg)
January 22,2015 Thursday Repl class
Dr Azizan 8
Solution
28812)2(150)2(is2atderivativesecondtheofvaluetrueThe
12150)(71275)('
887625)(2
23
fx
xxfxxxf
xxxxf
![Page 9: Computational Method - Higher Derivatives](https://reader035.vdocuments.us/reader035/viewer/2022072009/55cf9292550346f57b979387/html5/thumbnails/9.jpg)
January 22,2015 Thursday Repl class
Dr Azizan 9
Solution
.288)25.0(
)75.1()2(2)25.2()2(
)()(2)()(
)25.2()(25.2102)2()(2
859383975175125.0Using
2
211
11
11
ffff
hxfxfxfxf
fxfxfxfx
.).f()x f( .xh
iiii
ii
ii
i-i-
![Page 10: Computational Method - Higher Derivatives](https://reader035.vdocuments.us/reader035/viewer/2022072009/55cf9292550346f57b979387/html5/thumbnails/10.jpg)
January 22,2015 Thursday Repl class
Dr Azizan 10
Solution
288)125.0(
)82617.68)102(26738.139)125.0(
)875.1()2(2)125.2()2(
)()(2)()(
125.0Using
2
2
211
ffff
hxfxfxfxf
h
iiii
![Page 11: Computational Method - Higher Derivatives](https://reader035.vdocuments.us/reader035/viewer/2022072009/55cf9292550346f57b979387/html5/thumbnails/11.jpg)
January 22,2015 Thursday Repl class
Dr Azizan 11
Conclusion• Both results are exact because the errors are a
function of 4th and higher derivatives which are zero for a 3rd order polynomial function.
![Page 12: Computational Method - Higher Derivatives](https://reader035.vdocuments.us/reader035/viewer/2022072009/55cf9292550346f57b979387/html5/thumbnails/12.jpg)
January 22,2015 Thursday Repl class
Dr Azizan 12
Homework
ions.approximatdifferencefinitecenteredandbackwardforward,theusing
functiontheofsderivativesecondandfirsttheFind.25.0with]2,2[intervalthe
on42)(functiontheConsider 3
hxxxf