x 1.8 1.9 2.0 2.1 2.2
f(x) 10.8894 12.7032 14.7787 17.1489 19.8550
to find f''(2.0) using Central Difference Formula
f′(x)=[f(x+h)−f(x−h)]/2h orf′(x)=[f(x+h)−f(x)]/h
f(x)=xe2f′(x)=xex+exf′′(x)=2ex+xexf′′′(x)=3ex+xexf4(x)=4ex+xex
given x=2.0;h=0.1;h=0.2
we have
f′′(x)=[f(x+h)−2f(x)+f(x−h)]/h2
hence
f′′(2.0)=[f(2.1)−2f(2.0)+f(1.9)]/0.12f′′(2.0)=[17.1489−2(14.7787)+12.7032]/0.01f′′(2.0)=29.47
finding the approximated error (T.E)
error at h=0.1
O(h2)=(h2/12)∣−f4(h)∣=(0.01/12)∣−(4ex+xex)∣=(0.01/12)∣−(4.4206837+0.1105171)∣=0.003776
error at h=0.01
O(h2)=(h2/12)∣−f4(h)∣=(0.0001/12)∣−(4.0402007+0.0101005)∣=(0.0001/12)∣−4.0503012∣=0.000033752
to find actual error
at h=0.1
=∣1−[heh+h∗exp(−h)]/h2∣=∣1−[0.1105171+0.0904837]/0.01∣=19.10008
at h=0.01
=∣1−[heh+h∗exp(−h)]/h2∣=∣1−[0.0101005+0.009900498]/0.0001∣=199.00998
Comments
Leave a comment