The function is real analytic for

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)=x e−xf(x) = \sqrt{x}\,e^{-x} is real analytic for x>0x>0. The complex-step formula f′(x)≈Im f(x+ih)hf'(x) \approx \frac{\mathrm{Im}\,f(x+ih)}{h} avoids subtraction and so suffers no cancellation error, however small hh is chosen. ((a)) Using h=10−20h = 10^{-20}, state what the complex-step formula returns for f′(1)f'(1), to six significant figures. ((b)) Confirm this against the analytic derivative of ff.

Browse the problem library