ABSTRACT

This chapter discusses a program to solve nonlinear equations using Newton’s method. MATLAB can pass function names as arguments to functions. This mechanism is called a function handle. The program is very simple in MATLAB. One has to define a function handle for the function to be solved, and a function for the gradient (gradient) is supplied with an initial guess and a tolerance. Newton’s method can also be used for two or even more equations. One could define the error criterion as the maximum value in the residual vector. One possible method to deal with potential erratic behavior and increase the efficiency is by the reduced Newton step method. The error for a given iteration can be given as the difference between the value at the iteration and the true solution. The method in which one updates estimates for the Jacobian is called Broyden’s method. Using Broyden’s method, the convergence of error becomes linear or quasi-Newtonian.