% uses the midpoint rule to estimate f'(x) 
% function y = d_mid(x,h)

function y = f(x,h)

y = (f(x+h)-f(x-h))/(2*h);