Question: using Matlab 10) Consider the function et 1 f(x)= if : 70 if r = 0, (9.24a) 1442 Chapter 9: Basics et - 1 where

using Matlab
10) Consider the function et 1 f(x)= if : 70 if r = 0, (9.24a) 1442 Chapter 9: Basics et - 1 where we are interested in exploring the catastrophic cancellation which occurs as r O since et +1 as +0. a) Use the Taylor series expansion of e' to prove that lim;-0 f(x) = 1. b) Now approximate f(x) numerically for x = 10-k for k N[1, 20] when the function is written using three slightly different expressions. (i) Calculate f(x) as written. (ii) Calculate it as fix)= (9.24b) log (You and I know that analytically fi(x) = f(x) for all x but MATLAB doesn't.) (iii) MATLAB has a function which analytically subtracts 1 from the exponential to avoid catastrophic cancellation before the result is calculated numerically. So define the function f(x) to be the same as f(x) except that ek 1 is replaced by expml(x). Note: The table should have four columns with the first being r, the second f(x), the third f1(), and the fourth f2(x)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
