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 ') ;
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}