{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Chapter 5. Root Solving and Optimization Methods

# Chapter 5. Root Solving and Optimization Methods - 5 Root...

This preview shows pages 1–3. Sign up to view the full content.

© 2001 by CRC Press LLC 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.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
© 2001 by CRC Press LLC 4. Use the crosshair of the ginput command to read the coordinates of the intersection. In problems where we desire to find the zeros of a function that depends on two input variables, we follow (conceptually) the same steps above, but use 3-D graphics. In-Class Exercises Pb. 5.1 Find graphically the two points in the x-y plane where the two sur- faces, given below, intersect: ( Hint: Use the techniques of surface and contour renderings, detailed in Chapter 1, to plot the zero height contours for both surfaces; then read off the intersections of the resulting curves.) Pb. 5.2 Verify your graphical answer to Pb. 5.1 with that you would obtain analytically. 5.1.2 Numerical Methods This chapter subsection briefly discusses two techniques for finding the zeros of a function in one variable, namely the Direct Iterative and the Newton- Raphson techniques. We do not concern ourselves too much, at this point, with an optimization of the routine execution time, nor with the inherent lim- its of each of the methods, except in the most general way. Furthermore, to avoid the inherent limits of these techniques in some pathological cases, we assume that we plot each function under consideration, verify that it crosses the x -axis, and satisfy ourselves in an empirical way that there does not seem to be any pathology around the intersection point before we embark on the application of the following algorithms. These statements will be made more rigorous to you in future courses in numerical analysis.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern