function plotsub2(f, a, b, n)
x = linspace(a, b, n);
y = feval(f, x);
subplot('Position', [0.1, 0.4, 0.3, 0.3]);
plot(x, y, 'y-');
title('\itfonction','fontsize',20);
subplot('Position', [0.5, 0.6, 0.3, 0.3]);
yd = diff(y)*n/(b-a);
plot(x(1:end-1), yd, 'y-');
title('\itdrive','fontsize',20);
axis([a,b,min(yd),max(yd)]);
subplot('Position', [0.5, 0.1, 0.3, 0.3]);
yp = (cumsum(y)-0.5*(y(1)-y))*(b-a)/n;
plot(x, yp, 'y-');
title('\itprimitive','fontsize',20);
print -deps2 subplot2.eps