Download - NASA
Download - NASA
Download - NASA
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Solution Procedures 45<br />
initialize<br />
evaluate f0 at v0, f1 at v1 = v0 +Δv, f2 at v2 = v1 +Δv<br />
iteration<br />
calculate derivative f ′<br />
secant: from f0 and f1<br />
false position: from f0, and f1 or f2 (opposite sign from f1)<br />
calculate gain: C = λ/f ′<br />
increment solution: δv = −Cf<br />
shift: f2 = f1, f1 = f0<br />
evaluate f<br />
test convergence<br />
Figure 5-5. Outline of secant method or method of false position.<br />
initialize<br />
evaluate f0 at x0, f1 at x1 = x0 +Δx, f2 at x2 = x1 +Δx<br />
bracket maximum: while not f1 ≥ f0,f2<br />
if f2 >f0, then x3 = x2 +(x2 − x1); 1,2,3 → 0,1,2<br />
if f0 >f2, then x3 = x0 − (x1 − x0); 3,0,1 → 0,1,2<br />
iteration (search)<br />
if x2 − x1 >x1 − x0, then x3 = x1 + W (x2 − x1)<br />
if f3 f1, then 1,3,2 → 0,1,2<br />
if x1 − x0 >x2 − x1, then x3 = x1 − W (x1 − x0)<br />
if f3 f1, then 0,3,1 → 0,1,2<br />
test convergence<br />
Figure 5-6. Outline of golden-section search.<br />
using k = n − 1 or k = n − 2 such that f(xn) and f(xk) have opposite signs. The convergence is<br />
slower (roughly linear) than for the secant method, but by keeping the solution bracketed convergence<br />
is guaranteed. The process for the method of false position is shown in Figure 5-5.<br />
5-2.5 Golden-Section Search<br />
The golden-section search method can be used to find the solution x that maximizes f(x). The<br />
problem of maximizing f(x) can be attacked by applying the secant method or method of false position to<br />
the derivative f ′ (x) =0, but that approach is often not satisfactory as it depends on numerical evaluation<br />
of the second derivative. The golden-section search method begins with a set of three values x0