%  solution of studio exercise 2.3

h=[1e-1 1e-2 1e-3 1e-4 ];

for i=1:length(h)
  [x,U]=my_int('cos', [0, 1], 0, h(i));  
  e(i)=max(abs(U-sin(x)));
end

format long

A=[h' e']

plot(log(h),log(e),'x-')
axis equal

