t = linspace(0, pi);
y = sin(t);
inty = cumtrapz(t,y);
int_inty = cumtrapz(t,inty);
clf
hold on
plot(t,y, 'r')
plot(t,inty, 'g')
plot(t,int_inty)