solving nonlinear algebraic equations if return_x_listx_list [while abs(f_mepsif f_l*f_m same sign x_l x_m f_l f_m elsex_r x_m x_m float(x_l x_r)/ f_m (x_miteration_counter + if return_x_listx_list append(x_mif return_x_listreturn x_listiteration_counter elsereturn x_miteration_counter def ( )return ** solutionno_iterations bisection(fabeps= - print "number of function calls% ( *no_iterationsprint " solution is% (solutionnote that we first check if changes sign in oeabbecause that is requirement for the algorithm to work the algorithm also relies on continuous xfunctionbut this is very challenging for computer code to check we get the following printout to the screen when bisection_method py is runnumber of function calls solution is we notice that the number of function calls is much higher than with the previous methods required work in the bisection method if the starting interval of the bisection method is bounded by and band the solution at step is taken to be the middle valuethe error is bounded as jb aj ( because the initial interval has been halved times thereforeto meet tolerance we need iterations such that the length of the current interval equals jb aj ln /=dnd ln