function estimate=NewtonsMethodFunction(f,fp,x0,maxabserror)

x1=x0-f(x0)/fp(x0);
count=1;
while abs(x0-x1)>maxabserror && count<100
    x0=x1;
    x1=x0-f(x0)/fp(x0);
    count=count+1;
end
estimate=x1;