function y = Newton_1d(derf, der2f, x)
x1 = x;
x2 = x;
for iter = 1:1000
    delta = derf(x1)/der2f(x1);
    x2 = x1 - delta;
    disp([iter x2]);
    if abs(delta) < 1e-6 break;
    else
        x1 =x2;
    end;
end;
y = x2;