clear format LONGE k=1000; d=10^(-3); h=d/500; x=linspace(2-d,2+d,k); A1=(x-2).^4; A2=x.*x.*x.*x-8.*x.*x.*x+24.*x.*x-32.*x+16; AERR=abs((((2-d+x.*h)-2).^4)-((2-d+x.*h).*(2-d+x.*h).*(2-d+x.*h).*(2-d+x.*h)-8.*(2-d+x.*h).*(2-d+x.*h).*(2-d+x.*h)+24.*(2-d+x.*h).*(2-d+x.*h)-32.*(2-d+x.*h)+16)); maxk=max(AERR); disp('maxk: '); disp(maxk); plot(x,A1,'r',x,A2,'g',x,AERR,'k'); grid legend('f1', 'f2','measurement error ') ;