Page 136 -
P. 136
5
Root Solving and Optimization Methods
In this chapter, we first learn some elementary numerical techniques and the
use of the fsolve and fzero commands from the MATLAB library to
obtain the real roots (or zeros) of an arbitrary function. Then, we discuss the
use of the MATLAB command roots for finding all roots of a polynomial.
Following this, we consider the Golden Section method and the fmin and
fmins MATLAB commands for optimizing (finding the minimum or maxi-
mum value of a function) over an interval. Our discussions pertain exclu-
sively to problems with one and two variables (input) and do not include the
important problem of optimization with constraints.
5.1 Finding the Real Roots of a Function
This section explores the different categories of techniques for finding the real
roots (zeros) of an arbitrary function. We outline the required steps for com-
puting the zeros using the graphical commands, the numerical techniques
known as the Direct Iterative and the Newton-Raphson methods, and the
built-in fsolve and fzero functions of MATLAB.
5.1.1 Graphical Method
In the graphical method, we find the zeros of a single variable function by
implementing the following steps:
1. Plot the particular function over a suitable domain.
2. Identify the neighborhoods where the curve crosses the x-axis
(there may be more than one point); and at each such point, the
following steps should be independently implemented.
3. Zoom in on the neighborhood of each intersection point by
repeated application of the MATLAB axis or zoom commands.
0-8493-????-?/00/$0.00+$.50
© 2000 by CRC Press LLC
© 2001 by CRC Press LLC