Consider approximating the derivative of the function for x=1. Use the forward and central difference quotients as defined below.
Using both single and double-precision programs, make tables showing in each case the value for h, the difference approximations and , and the errors associated with these values (since we know the answer here). Use a wide range of values for the difference interval h: from to . What can you say about the quality of the two different approximations and their associated optimal values for h? Can you suggest how an optimal value for h can be estimated?