Cubic 2
Cubic 2
Cubic 2
Stage 4. The value of X* found in stage 3 is the true minimum of h(k) and
may not be close to the minimum of/(X). Hence the following convergence
criteria can be used before choosing X* « X*:
A(X*) - / ( X * )
/(X*) *e' (5 60)
-
where e{ and e2 are small numbers whose values depend on the accuracy de-
sired. The criterion of Eq. (5.61) can be stated in nondimensional form as
S7V/
s E <5 62)
iSfWF * ' -
If the criteria stated in Eqs. (5.60) and (5.62) are not satisfied, a new cubic
equation
can be used to approximate/(X). The constants a', b'', cr, and d' can be
evaluated by using the function and derivative values at the best two points
out of the three points currently available: A, B, and X*. Now the general
formula given by Eq. (5.54) is to be used for finding the optimal step size
X*. If/'(X*) < 0, the new points A and B are taken as X* and B, respectively;
otherwise [if/'(X*) > 0], the new points A and B are taken as A and X*, and
Eq. (5.54) is applied to find the new value of X*. Equations (5.60) and (5.62)
are again used to test for the convergence of X*. If convergence is achieved,
X* is taken as X* and the procedure is stopped. Otherwise, the entire procedure
is repeated until the desired convergence is achieved.
The flowchart for implementing the cubic interpolation method is given in
Fig. 5.17.
Example 5.11 Find the minimum of/ = X5 — 5X3 — 2OX + 5 by the cubic
interpolation method.
Enter with X, S and t0
Yes Set I = 0
IS/B>0?
B=t0
No
Calculate
Set Set/W B
Z = (3(fA -Z 5 V(B-A)) + f'A + f'B
^o = 2£Q f'A-f'B
A = t0 Q = a2-rArB)j
X* = A + (f'A + Z ± Q)(B-AWA + f'B+ 2Z)
Set Z = Z + 1
Is|^)-^)U
No
/(X*)
Yes
Taker = X* Yes is No
and Stop i£f,i~r^
Yes
ls/>/ m a x ?
No
Yes Set
Is S ^ V ^ l x .
fA = fix*)
No
Set _ fk=m*)
B = X*
fB=f^}
^-
dX
(X = A = 0) = 5X4 - 15X2 - 20 = -20 < 0
x=o
Iteration 1
To find the value of X* and to test the convergence criteria, we first compute
Z and Q as:
3(5 1130)
Z = '° ~ - 20.0 + 350.688 = 229.588
Hence
-, - ( - 2 0 - 0 + 229.588 + 244.0 \
X = 3 2
* " ( - 2 0 . 0 + 350.688 + "459.176J = L84 OT
~0A396
X* = 1.84
1
As/' has been found to be negative at X = 1.6 also, we can take A = 1.6 for faster convergence.
Convergence criterion: If X* is close to the true minimum, X*, then/'(X*)
= df(k*)/d\ should be approximately zero. Since/' = 5X4 - 15X2 - 20,
Since this is not small, we go to the next iteration or refitting. As/'(X*) < 0,
we take A = X* and
Thus
Iteration 2
Z = 3 4
^ On 7 J - I 1 QA ^ " 13
° + 350 688 =
- -3.312
Hence
Convergence criterion:
Since this value is large, we go the next iteration with B = X* = 2.05 [as
/'(X*) > 0] and
Thus
3.0(-41.70 H- 42.90)
Z 13 + 5 35 9 49
- (2.05-!.84) " °° ' " '
Q = [(9.49)2 + (13.0)(5.35)]1/2 = 12.61
Therefore,
Convergence criterion:
Assuming that this value is close to zero, we can stop the iterative process and
take
X* ~ X* = 2.0086
By setting the derivative of Eq. (5.63) equal to zero for the minimum of/(X),
we obtain