Page 1 of 1

1. Carry out calculations similar to those of Example 1.3 for approximating the derivative of the function f(x)=e-2x eva

Posted: Tue Sep 07, 2021 7:42 am
by answerhappygod
1 Carry Out Calculations Similar To Those Of Example 1 3 For Approximating The Derivative Of The Function F X E 2x Eva 1
1 Carry Out Calculations Similar To Those Of Example 1 3 For Approximating The Derivative Of The Function F X E 2x Eva 1 (67.29 KiB) Viewed 84 times
1. Carry out calculations similar to those of Example 1.3 for approximating the derivative of the function f(x)=e-2x evaluated at xo =0.5. Observe similarities and differences by comparing your graph against that in Figure 1.3.
Example 1.3. The numbers in Example 1.2 might suggest that an arbitrary accuracy can be achieved by the algorithm, provided only that we take h small enough. Indeed, suppose we want cos(1.2) sin(1.2+h) – sin(1.2) h < 10-10 Can't we just set h < 10-10/0.466 in our algorithm? Not quite! Let us record results for very small, positive values of h: h Absolute error 1.e-8 4.361050e-10 1.e-9 5.594726e-8 1.e-10 1.669696e-7 1.e-11 7.938531e-6 1.e-13 4.250484e-4 1.e-15 8.173146e-2 1.e-16 3.623578e-1
10° 10-5 Absolute error 10-10 10-15 10 20 10015 1070 105 10° h Figure 1.3. The combined effect of discretization and roundoff errors. The solid curve interpolates the computed values of f'(xo) – f(xo+h) – f(xo) |for f(x)=sin(x), xo = 1.2. Also shown in dash-dot style is a straight line depicting the discretization error without roundoff error.