Computational Physics, Python, Interpolation, Differentiation, Integration.
1.48×10^(−8). Let’s see what happens if we do that instead: def my_newton2(f,fprime,x0,err): x1=x0-f(x0)/float(fprime(x0)) # new point according to newton if abs(x1-x0)>err: # need the absolute value here print(f(x1)) return my_newton2(f,fprime,x1,err) # repeat if the error is too large else: