Page 157 - Compact Numerical Methods For Computers
P. 157
146 Compact numerical methods for computers
Example 12.5. Minimum of a function of one variable
Suppose we wish to buy some relatively expensive item, say a car, a house or a
new computer. The present era being afflicted by inflation at some rate r, we will
pay a price
t
P(1 + r)
at some time t after the present. We can save at s dollars (pounds) per unit time,
and when we buy we can borrow money at an overall cost of (F – 1) dollars per
dollar borrowed, that is, we must pay back F dollars for every dollar borrowed. F
can be evaluated given the interest rate R and number of periods N of a loan as
N N
F = NR (1 + R ) /[(1 + R ) – 1].
Then, to minimise the total cost of our purchase, we must minimise
t
S(t) = ts + [P(1 + r) – ts]F
t
= ts(1 – F) + FP(1 + r) .
This has an analytic solution
t = 1n{(F – 1)s/[FP ln(1 + r)]}/ln(1 + r).
However, it is easy to construct examples for which analytic solutions are harder
to obtain, for instance by changing inflation rate r with time.
12.2. DIFFICULTIES ENCOUNTERED IN THE SOLUTION OF
OPTIMISATION AND NONLINEAR-EQUATION PROBLEMS
It is usually relatively easy to state an optimisation or nonlinear-equation prob-
lem. It may even be straightforward, if tedious, to find one solution. However, to
find the solution of interest may be very nearly impossible.
In unconstrained minimisation problems the principal difficulty arises due to
local minima. If the global minimum is sought, these local minima will tend to
attract algorithms to themselves much as sand bunkers attract golf balls on the
course. That is to say, there may be no reason why a particular local minimum will
be found; equally there is no reason why it will not. The nonlinear-equation
problem which arises by setting the derivatives of the function to zero will have
solutions at each of these local minima. Local maxima and saddle points will also
cause these equations to be satisfied.
Unfortunately, very little research has been done on how to get the desired
solution. One of the very few studies of this problem is that of Brown and
Gearhart (1971) who discuss deflation techniques to calculate several solutions of
simultaneous nonlinear equations. These methods seek to change the equations
being solved so that solutions already found are not solutions of the modified
equations. The interested reader will also find an excellent discussion of the
difficulties attendant on solving nonlinear equations and minimisation problems in
Acton (1970, chaps 2 and 14). The traditional advice given to users wishing to
avoid unwanted solutions is always to provide starting values for the parameters
which are close to the expected answer. As Brown and Gearhart (1971) have