Professional Documents
Culture Documents
Day 4
Day 4
Process Analysis
using Numerical Methods
LECTURE FOUR
chemical processes.
Furthermore, the min/max f(x)
Data:
R = 82 cm3/atm-gmol-K,
a = 4.19106 atm-cm3/gmol
b = 37.2 cm3/gmol.
4 NUMERICAL METHODS - (c) Daniel R. Lewin LECTURE FOUR
( )
x (k +1 ) = g x (k ) (4.5)
Method:
Make initial guess, x(0)
Apply Eq.(4.5) repeatedly until |x(k+1)- x(k)| <
Convergence of (4.5) implies satisfaction of (4.3)
7 48.74 48.76
8 48.76 48.77
9 48.77 48.77
18 NUMERICAL METHODS - (c) Daniel R. Lewin LECTURE FOUR
x (k +1 ) = x (k )
( )
f x (k ) (4.12)
( )
f x (k )
Newtons Method
Newtons Method
Diverging
(k +1 ) = (k )
f x (k ) ( )
(4.13)
f x (k ) ( )
Taylor series expansions for f x (k ) and f x (k ) : ( ) ( )
( ) ( )
f x (k ) = f x * + (k ) = f(x *) + (k )f(x *) + 21 (k ) f(x *) +
2
<m<0
( )
f x (k )
Furthermore, it can be seen that selecting the value of
m to be the mid-range value makes, dg(x ) dx = 0 and will
lead to the fastest possible convergence. Then:
( )
x (k +1 ) = g x (k ) = x (k )
( )
f x (k )
( )
f x (k )
23 NUMERICAL METHODS - (c) Daniel R. Lewin LECTURE FOUR
k x(k) f(x(k))
0 1540.0 1.8745
1 1816.4 0.2523
2 1866.0 5.990810-3
3 1867.3 3.545010-6
x (k +1 ) = x (k )
( )
f x (k )
( ) (k ) (k 1)
f x (k )
f(x ) f(x )
Approximate f(x(k)) by: f(x (k ) ) (k) (k 1 )
x x
Hence:. x (k +1 ) = x (k ) f x ( )(
(k ) x (k ) x (k 1) ) (4.21)
( ) (
f x (k ) f x (k 1) )
While the Secant method does not rely on f(x), two
intializing values, at x = x(0) and x = x(1) must be
supplied. Since these values will in general be somewhat
arbitrary, the initial estimate for the gradient using
could be rather inaccurate.
26 NUMERICAL METHODS - (c) Daniel R. Lewin LECTURE FOUR
( )f(x(x(R ) ) xf(x(L)) )
(R ) (L )
1 x = x (R.) f x (R )
a1 = b0 b1 x *
a0 = b0 x *
Summary
Having completing this chapter, the reader should now
be able to:
Determine the total number of roots and bounds on
their locations using efficient bracketing. It has
been shown that accelerated or adaptive methods
will often provide for more efficient bracketing of
the solution.
Select and implement the most reliable method, or
combination of methods, to achieve the required
accuracy efficiently and reliably, given the
functional form of the nonlinear equation. The
following table summarizes the strengths and
weaknesses of each of the methods covered in this
chapter.
36 NUMERICAL METHODS - (c) Daniel R. Lewin LECTURE FOUR
Practical Recommendations
Consider the following recommendations when
attempting to derive a numerical approximation for the
solution of a nonlinear algebraic equation:
Try to graph f(x) to observe its general form, which will
suggest the most appropriate method for its solution.
Always try to bracket the root, to provide reliable limits
to a more efficient method to lock into the solution.
Accelerated or adaptive bracketing is recommended
When an arbitrary nonlinear function, f(x), a winning
combination is a hybrid algorithm that combines bisection
for robustness with Newtons method, for speed. This
would guarantee quadratic convergence at best, but
revert to guaranteed linear convergence to the root, at
worst.