solving nonlinear algebraic equations an application to xd cos xlooks like def demo()from numpy import expcos minimamaxima brute_force_optimizerlambda xexp(- ** )*cos( * ) print 'minima:'minima print 'maxima:'maxima model problem for algebraic equations we shall consider the very simple problem of finding the square root of which is the positive solution of the nice feature of solving an equation whose solution is known beforehand is that we can easily investigate how the numerical method and the implementation perform in the search for the solution the xfunction corresponding to the equation is xd our interval of interest for solutions will be oe (the upper limit here is chosen somewhat arbitrarilyin the followingwe will present several efficient and accurate methods for solving nonlinear algebraic equationsboth single equation and systems of equations the methods all have in common that they search for approximate solutions the methods differhoweverin the way they perform the search for solutions the idea for the search influences the efficiency of the search and the reliability of actually finding solution for examplenewton' method is very fastbut not reliablewhile the bisection method is the slowestbut absolutely reliable no method is best at all problemsso we need different methods for different problems what is the difference between linear and nonlinear equationsyou know how to solve linear equations ax = all other types of equations xd when xis not linear function of xare called nonlinear typical way of recognizing nonlinear equation is to observe that is "not aloneas in axbut involved in product with itselfsuch as in we say that and are nonlinear terms an equation like sin cos is also nonlinear although is not explicitly multiplied by itselfbut the taylor series of sin xe and cos all involve polynomials of where is multiplied by itself newton' method newton' methodalso known as newton-raphson' methodis very famous and widely used method for solving nonlinear algebraic equations compared to the other methods we will considerit is generally the fastest one (usually by farit does not guarantee that an existing solution will be foundhowever