You are on page 1of 13

At

the end of the period, you should be


able to:
Use Quadratic interpolation to find the
maximum of a function.
Use Newtons method to find the
maximum of a function.

Root location and optimization are related in the


sense that both involve guessing and searching for
a point on a function.
Root location involve searching for zeros of a
function while optimization involves searching for
either the minimum or the maximum.
The optimum is the point where the curve is flat,
these corresponds to the x value where the
derivative f(x) is equal to zero.
Additionally, the second derivative f(x), indicates
whether the optimum is a minimum or a maximum: if
f(x)<0 the point is a maximum; if f(x)>0 the point
is a minimum.

Quadratic Interpolation
Quadratic interpolation takes advantage of the
fact that a second order polynomial often provides
a good approximation to the shape of f(x) near an
optimum.
If we have three points that jointly bracket an
optimum, we can fit a parabola to the points.
Then we can differentiate it, set the result equal
to zero, and solve for an estimate of the optimal x.

It can be shown through


manipulation that the result is

some

algebraic

f x0 x12 x 2 2 f x1 x 2 2 x0 2 f x 2 x0 2 x12
x3
2 f x0 x1 x 2 2 f x1 x 2 x0 2 f x 2 x0 x1

Where x0 , x1 , and x2 are the initial guesses, and


x3 is the value of x that corresponds to the
maximum value of the quadratic fit to the guesses.

Example:
Use quadratic interpolation to approximate the
maximum of
x2
f x 2 sin x

10

with initial guesses of 0, 1, and 4


Solution:
The points are (0,0), (1,1.5829), (4, -3.1136)
x3 1.5055, f 1.5055 1.7691
Since the new value is to the right of x1 and the
new point is higher than the intermediate point
we discard x0.

Solution:
The new points are (1,1.5829), (1.5055, 1.7691),
(4, -3.1136) so
x3 1.4903, f 1.4903 1.7714
The process can be repeated, with the following
result
x3 1.4256, f 1.4256 1.7757
x3 1.4266,

f 1.4266 1.7757

x3 1.4275,

f 1.4275 1.7757

Newtons Method:
The Newton-Raphson method is an open method
that finds the root of a function using
f xi
xi 1 xi
f xi
A similar open approach can be used to find the
optimum of f(x) by defining a new function ,
g(x) = f(x), leading to the equation
f xi
xi 1 xi
f xi
To find the minimum or maximum of f(x).

Example:
Use Newtons
maximum of

method

to

approximate

x2
f x 2 sin x
10

with initial guesses of 2.5


Solution:
The first and second derivatives are
f x 2 cos x

f x 2 sin x

1
5

the

Solution:
Substitute the derivatives to the equation
x i 1

x
2 cos x i
5
xi
1
2 sin x i
5

Substitute the initial guess

x1 0.99508 f x 1.57859

The process can be repeated, with the following


result x 2 1.46901 f x 1.77385
x 3 1.42764 f x 1.77573
x4 1.42755 f x 1.77573

Exercise:
Find the extrema of the function

f x 5 sin2 x 2 x 4 x
2

Using Newtons method


Using Quadratic Interpolation method

Resources
Numerical Methods Using Matlab, 4th Edition,
2004 by John H. Mathews and Kurtis K. Fink
Holistic Numerical Methods Institute by Autar
Kaw and Jai Pau.
Numerical Methods for Engineers by Chapra
and Canale

You might also like