function p=newton(f,df,p0,tol,max_iterations) % Newton's method: See section 2.3. g = @(x) x - f(x) / df(x); p = fixedpoint(g, p0, tol, max_iterations);