Вы находитесь на странице: 1из 6

INTRODUCTION TO

CHEMICAL ENGINEERING

Sixth Edition in SI Units

J. M. Smith
Professor Emeritus of Chemical Engineering
University of California, Davis

H. C. Van Ness
Institute Professor Emeritus of Chemical Engineering
Rensselaer Polytechnic Institute

M. M. Abbott
Professor of Chemical Engineering
Rensselaer Polytechni? ~istitute

' Adapted by

B. I. Bhatt
Vice President, Unimark Remedies
Ahmedabad

Boston Burr Ridge, IL Dubuque, IA Madison, WI New York San Francisco St. Louis
Bangkok Bogota Caracas KualaLumpur Lisbon London Madrid MexicoCity
Milan Montreal New Delhi Santiago Seoul Singapore Sydney Taipei Toronto
Appendix I

Newton's Method

Newton's method is a procedure for the numerical solution of algebraic equations, applicable
to any number M of such equations expressed as functions of M variables.
Consider first a single equation f (X) = 0, in which f (X) is a function of the single
variable X. Our purpose is to find a root of this equation, i.e., the value of X for which the
function is zero. A simple function is illustrated in Fig. I.1; it exhibits a single root at the point
where the curve crosses the X-axis. When it is not possible to solve directly for the root,' a
numerical procedure, such as Newton's method, is employed.

Figure 1.1 Newton's method applied to a single function

o or example, when ex + x2+ 10 = 0.


The application of Newton's method is illustrated in Fig. I.1. In the neighborhood of an
arbitrary value X = Xo the function f (X) can be approximated by the tangent line drawn at
X = Xo. The equation of the tangent line is given by the linear relation:

where g(X) is the value of the ordinate at X, as shown in Fig. 1.1. The root of this equation is
found by setting g(X) = 0 and solving for X; as indicated in Fig. 1.1, the value is X I . Since the
actual function is not linear, this is not the root of f (X). However, it lies closer to the root than
does the starting value Xo. The function f (X) is now approximated by a second line, drawn
tangent to the curve at X = X1, and the procedure is repeated, leading to a root for this linear
approximation at X2, a value still closer to the root of f (X). This root can be approached as
closely as desired by continued successive linear approximation of the original function. The
general formula for iteration is:

where

AX, 3 X,+l - X, or X,+l = X, + AX,


Equation (I.l), written for successive iterations (n = 0, 1, 2, . . .), produces successive values
of AX, and successive values off (X,). The process starts with an initial value Xo and continues
until either AX, or f (X,) approaches zero to within a preset tolerance.
Newton's method is readily extended to the solution of simultaneous equations. For the
case of two equations in two unknowns, let fr = fI(XI, XII) and fII = fII(X~,XII) represent
two functions, the values of which depend on the two variables XI and XII. Our purpose is to
find the values of XI and XII for which both functions are zero. In analogy to Eq. (I.l), we
write:

These equations differ from Eq. (1.1) in that the single derivative is replaced by two partial
derivatives, reflecting the rates of change of each function with each of the two variables. For
iteration n the two functions fI and fII and their derivatives are evaluated at X = X, from
the given expressions, and Eqs. (1.24 and (I.2b) are solved simultaneously for AXI and AXII.
These are specific to the particular iteration, and lead to new values XI and XIr, applicable to
the next iteration:

The iterative procedure based on Eqs. (1.2) is initiated with starting values for XI and XII,and
continues until the increments AXI8 and AXIInor the computed values of fI and fII approach
zero.
716 APPENDIX I. Newton's Method

Equations (1.2) can be generalized to apply to a system of M equations in M unknowns;


the result for each iteration is:

with

Newton's method is well suited to application in multireaction equilibria. As an illustra-


tion, we solve Eqs. ( A ) and ( B ) of Ex. 13.13 for the case of T = 1000 K. From these equations
with values given there for K, and Kb at 1000 K and with P I P O = 20, we find the functions:

and

Equations (1.2) are written here as:

fb + (g) + (g) As, A E=


~0

The solution procedure is initiated with a choice of starting values for sa and sb. Numerical
values are obtained for f , and fb and for their derivatives from Eqs. ( A )and (B). Substitution
of these values in Eqs. ( C )and ( D )yields two linear equations which are readily solved for the
unknowns As, and A E ~These . yield new values of s, and sb with which to carry out a second
iteration. The process continues until As, and Acb or f , and fb approach zero.
Setting E , = 0.1 and sb = 0.7 as starting value^,^ we find initial values of f , and fb and
their derivatives from Eqs. ( A ) and ( B ) :

These values are substituted in Eqs. ( C ) and ( D ) to yield:


0.6630 + 3.9230 As, + 1.7648 Asb = 0
0.4695 + 1.3616 As, + 2.0956 Asb = 0
The values of the increments that satisfy these equations are:
As, = -0.0962 and Asb = -0.1614

2 ~ h e s are
e well within the limits, -0.5 5 E, 5 0.5 and 0 5 ~b 5 1.0, noted in Ex. 13.13
from which,
E, = 0.1 - 0.0962 = 0.0038 and eb = 0.7 - 0.1614 = 0.5386
These values are the basis for a second iteration, and the process continues, yielding results as
follows:
~1 6, ~b As, A E ~

Convergence is clearly rapid. Moreover, any reasonable starting values lead to convergence on
the same answers.

Figure 1.2 Finding the roots of a function showing extrema

Convergence problems can arise with Newton's method when one or more of the functions
exhibit extrema. This is illustrated for the case of a single equation in Fig. 1.2. The function has
two roots, at points A and B. If Newton's method is applied with a starting value of X smaller
than a , a very small range of X values produces convergence on each root, but for most values
it does not converge, and neither root is found. With a starting value of X between a and b, it
converges on root A only if the value is sufficiently close to A. With a starting value of X to
the right of b, it converges on root B. In cases such as this, a proper starting value can be found
by trial, or by graphing the function to determine its behavior.

Вам также может понравиться