Computational Physics, Python, Interpolation, Differentiation, Integration.
derivative some other way. Indeed that is what’s happening: if you don’t provide it with the derivative, it uses something called the secant method. To use the true Newton’s method, you need to give it the derivative as well: newton1=optimize.newton(lambda x:x**2+2*x+1,10,fprime=lambda x:2*x+2)