17.11.2012 Views

Numerical recipes

Numerical recipes

Numerical recipes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

414 Chapter 10. Minimization or Maximization of Functions<br />

Figure 10.5.1. Successive minimizations along coordinate directions in a long, narrow “valley” (shown<br />

as contour lines). Unless the valley is optimally oriented, this method is extremely inefficient, taking<br />

many tiny steps to get to the minimum, crossing and re-crossing the principal axis.<br />

Conjugate Directions<br />

This concept of “non-interfering” directions, more conventionally called conjugate<br />

directions, is worth making mathematically explicit.<br />

First, note that if we minimize a function along some direction u, then the<br />

gradient of the function must be perpendicular to u at the line minimum; if not, then<br />

there would still be a nonzero directional derivative along u.<br />

Next take some particular point P as the origin of the coordinate system with<br />

coordinates x. Then any function f can be approximated by its Taylor series<br />

f(x) =f(P)+ � ∂f<br />

xi +<br />

∂xi i<br />

1 � ∂<br />

2<br />

i,j<br />

2f xixj + ···<br />

∂xi∂xj<br />

≈ c − b · x + 1<br />

x · A · x<br />

2<br />

(10.5.1)<br />

where<br />

c ≡ f(P) b ≡−∇f| P [A]ij ≡ ∂2 �<br />

f �<br />

�<br />

∂xi∂xj<br />

�<br />

P<br />

(10.5.2)<br />

The matrix A whose components are the second partial derivative matrix of the<br />

function is called the Hessian matrix of the function at P.<br />

y<br />

start<br />

x<br />

Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)<br />

Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by <strong>Numerical</strong> Recipes Software.<br />

Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable<br />

files (including this one) to any server computer, is strictly prohibited. To order <strong>Numerical</strong> Recipes books or CDROMs, visit website<br />

http://www.nr.com or call 1-800-872-7423 (North America only), or send email to directcustserv@cambridge.org (outside North America).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!