import mathdef derivative(f, x): h=1e-8 return (f(x+h)-f(x))/hdef solver(f, x0, epsilon, max_iter): xn=x0 for n in range(0,max_iter): y=f(xn) if abs(y)