PHYSICS · Multi-part · Fermi University Physics · Mathematical Methods for Physics · Numerical and computational mathematics · Numerical and computational mathematics
Error, Chance and the Machine, Ch Approximating a function: interpolation and differentiation
Problem
The function f(x)=xe−x is real analytic for x>0. The complex-step formula f′(x)≈hImf(x+ih) avoids subtraction and so suffers no cancellation error, however small h is chosen.
((a)) Using h=10−20, state what the complex-step formula returns for f′(1), to six significant figures.
((b)) Confirm this against the analytic derivative of f.