2、ndsym(sym(f)),(a+(2*i-1)*(b-a)/2^(k-1)));
end
T(k)=1/2*T(k-1)+(b-a)/(2^(k-1))*sum1;
end
fork=1:3
S(k)=T(k+1)+1/(4-1)*(T(k+1)-T(k));
end
fork=1:2
C(k)=S(k+1)+1/(4^2-1)*(S(k+1)-S(k));
end
R(1)=C(2)+1/(4^3-1)*(C(2)-C(1));
k=3;
while1
T(1)=T(2);
T(2)=T(3);
T(3)=T(4);
sum2=0;
fori