f=@(x) log(x);

g=@(h) (f(1+h)-f(1))./h;

h=0.1;
abs(g(h)-1)
h=0.01;
abs(g(h)-1)
h=0.001;
abs(g(h)-1)

H=[0.1,0.01,0.001];

loglog(H,abs(g(H)-1)
hold on
loglog(H,H)
xlabel("h")
ylabel("error")
legend("error","first order in h")
