function df = deriv(f, x0, h)
if nargin < 3, h = 1e-07; end

df = (f(x0 + h) - f(x0 - h)) / (2*h);

end
