rate of convergence this is great advantage of the bisection methodwe know beforehand how many iterations it takes to meet certain accuracy in the solution as with the two previous methodsthe function bisection is placed in the file nonlinear_solvers py for easy import and use rate of convergence with the methods abovewe noticed that the number of iterations or function calls could differ quite substantially the number of iterations needed to find solution is closely related to the rate of convergencewhich dictates the speed of error reduction as we approach the root more preciselywe introduce the error in iteration as en jx xn jand define the convergence rate as enc enq ( where is constant the exponent measures how fast the error is reduced from one iteration to the next the larger isthe faster the error goes to zeroand the fewer iterations we need to meet the stopping criterion jf / single in ( is defined in the limit for finite nand especially smaller nq will vary with to estimate qwe can compute all the errors en and set up ( for three consecutive experiments nand en en enc enq dividing these two equations by each other and solving with respect to gives qd ln enc =en ln en =en since this will vary somewhat with nwe call it qn as growswe expect qn to approach limit (qn qto compute all the qn valueswe need all the xn approximations howeverour previous implementations of newton' methodthe secant methodand the bisection method returned just the final approximation thereforewe have extended the implementations in the module file nonlinear_solvers py such that the user can choose whether the final value or the whole history of solutions is to be returned each of the extended implementations now takes an extra parameter return_x_list this parameter is booleanset to true if the function is supposed to return all the root approximationsor falseif the function should only return the final approximation as an examplelet us take closer look at newtondef newton(fdfdxxepsreturn_x_list=false)f_value (xiteration_counter if return_x_listx_list [