Numerical Analysis Using MATLAB and Spreadsheets

This chapter is an introduction to Newton's and bisection methods for approximating roots of linear and non-linear equations. Several examples are presented to illustrate practical solutions using MATLAB and spreadsheets.
Newton's ( or Newton-Raphson) method can be used to approximate the roots of any linear or non- linear equation of any degree. This is an iterative (repetitive procedure) method and it is derived with the aid of Figure 2.1.
We assume that the slope is neither zero nor infinite. Then, the slope (first derivative) at x = x 1 is
The slope crosses the at x ? axis at x = x 2 and y = 0. Since this point [ x 2, f( x 2)] = ( x 2, 0) lies on the slope line, it satisfies (2.1). By substitution,
and in general,
Use Newton's method to approximate the positive root of
to four decimal places.
Solution:
As a first step, we plot the curve of (2.4) to find out where it crosses the x- axis. This can be done easily with a simple plot using MATLAB or a spreadsheet. We start with MATLAB and will discuss the steps for using a spreadsheet afterwards.
We will now introduce some new MATLAB functions and review some which we discussed in Chapter 1.
input('string'): It...