file last modified Thur 5 Mar 1996
n.b., need modern version of netscape to read this document correctly.
We have seen how to perform a univariant optimization where we minimize the a function of single variable f(x). Now we will see how to adapt this for multivariant optimization where we want to minimize a function of many variables f(X) (where X is a vector:
- Choose a search direction Di
- Use a line minimization method (e.g., Golden Section) to minimize f(Xi +
Di) by varying the scalar
.
- Replace Xi+1 = Xi +
minDi
- Have we converged? (An important question)
- YES: Output result and Stop.
- NO: go back to step 3.
.
This can be an awful choice even for a 2D function:

(Xi) .

In practice steepest descents is normally used without
line searches. Instead some initial path length
is choosen and a step of this length
is taken down the unit vector in the direction of the
force. If the step produces an increase in energy
then the step length has got to large and it is
halved for the next step. But if the step produces a decrease
then it may be far to small and the step length is increased
by 20%. This is called crude
steepest descents and you will use it in the
mini-project the pseudo-code is:
= 0.001.
- Find potential energy PE = f(Xi) and force vector F = -
(Xi)
- is PE < PEold?
- YES:
= 1.2
![]()
- NO :
= 0.5
![]()
- Di= Fi
- Replace Xi+1 = Xi +
Di
- Store PEold =PE
- Have we converged? Is the rms force |Fi| < 0.001 ?
- YES: Output result and Stop.
- NO: go back to step 3.
The conjugate gradients method chooses search directions using information gained from previous searches. This is in contrast to steepest descents in which all previous information is ignored and the search direction is set to the force vector Fi. The search directions for Fletcher-Reeves Conjugate gradients are given:
Di-1 Thus the search direction for step i depends on the the direction for the previous step (i-1) as well as the current force vector.
The routine can be given in pseudo-code:
- Find potential energy PE(Xi) and force vector F = -
(Xi)
- Choose a search direction:
is remainder[(i-1)/ND] = 0 ?
- yes: Di = Fi
- no: Di = Fi +
Di-1
- Use a line minimization method to minimize PE(Xi +
Di) by varying the scalar
.
- Replace Xi+1 = Xi +
minDi
- Have we converged:
rms force |Fi| < pre-set limit ?
- YES: Output result and Stop.
- NO: go back to step 3.
DitHDj = 0This is important because for a quadratic surface conjugate search directions result in the following relations:
when i is not equal to j
Di.Fj = 0To see what this basically means consider that we do a line search along a particular direction thus ensuring the gradient along the direction is zero. If the next direction is conjugate to the first the subsequent search will not affect the gradient along the original direction. Thus by looking along n (independent) directions for an n-dimensional space we get n directions for which the gradient is zero i.e., the gradient is zero in directions. For a n-dimensional space quadratic surface a conjugate gradients method will converge in n or less steps.
Fi.Fj = 0
when i is not equal to j
On to next section: Lecture 3(a) Newtonian methods