0% found this document useful (0 votes)
2 views

EEPC102 Module 4 Lesson 2

Quadratic interpolation is a method that approximates the shape of a function near an optimum using a second-order polynomial. The process involves selecting three points, finding the quadratic equation that passes through them, and iteratively refining the points to converge on the optimum value. An example demonstrates this technique by approximating the maximum of a specific function, showing rapid convergence within five iterations.

Uploaded by

cuzz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

EEPC102 Module 4 Lesson 2

Quadratic interpolation is a method that approximates the shape of a function near an optimum using a second-order polynomial. The process involves selecting three points, finding the quadratic equation that passes through them, and iteratively refining the points to converge on the optimum value. An example demonstrates this technique by approximating the maximum of a specific function, showing rapid convergence within five iterations.

Uploaded by

cuzz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Lesson 2

 Quadratic Interpolation

Quadratic/Parabolic 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 figure below.

Graphical description of quadratic/parabolic interpolation.

Steps:
• Select 3 points (x0, x1 and x2) that contains only 1 optimum point of a
function.
• Only one quadratic will pass through these points. Find the equation of
this quadratic.
• Equate its first derivative to zero and find its optimum point, x3.

𝑓(𝑥0 )(𝑥1 2 − 𝑥2 2 ) + 𝑓 (𝑥1 )(𝑥2 2 − 𝑥0 2 ) + 𝑓 (𝑥2 )(𝑥0 2 − 𝑥1 2 )


𝑥3 =
2𝑓 (𝑥0 )(𝑥1 − 𝑥2 ) + 2𝑓 (𝑥1 )(𝑥2 − 𝑥0 ) + 2𝑓(𝑥2 )(𝑥0 − 𝑥1 )

• Similar to the Golden Section Search, narrow the interval by discarding


one of the points.
• Continue with the remaining 3 points and calculate a new optimum (x3).
• Iterate like this and stop when the approximate relative error drops
below the tolerance value.

EEPC102 Module IV
Example:

Use quadratic interpolation to approximate the maximum of


𝑥2
( )
𝑓 𝑥 = 2𝑠𝑖𝑛𝑥 −
10
With initial guesses of 𝑥0 = 0, 𝑥1 = 1, and 𝑥2 = 4

Solution: The values at the three guesses can be evaluated,


𝑥0 = 0 𝑓 (𝑥0 ) = 0
𝑥1 = 1 𝑓 (𝑥1 ) = 1.5829
𝑥2 = 4 𝑓 (𝑥2 ) = −3.1136

And substituted into the formula

𝑓 (𝑥0 )(𝑥1 2 − 𝑥2 2 ) + 𝑓 (𝑥1 )(𝑥2 2 − 𝑥0 2 ) + 𝑓 (𝑥2 )(𝑥0 2 − 𝑥1 2 )


𝑥3 =
2𝑓 (𝑥0 )(𝑥1 − 𝑥2 ) + 2𝑓 (𝑥1 )(𝑥2 − 𝑥0 ) + 2𝑓 (𝑥2 )(𝑥0 − 𝑥1 )
0(12 − 42 ) + 1.5829(42 − 02 ) + (−3.1136)(02 − 12 )
𝑥3 = = 1.5055
2(0)(1 − 4) + 2(1.5829)(4 − 0) + 2(−3.1136)(0 − 1)

which has a function value of f(1.5055) = 1.7691.

Next, a strategy similar to the golden-section search can be employed to


determine which point should be discarded. Because the function value for the
new point is higher than for the intermediate point (𝑥1 ) and the new x value is
to the right of the intermediate point, the lower guess (𝑥0 ) is discarded.
Therefore, for the next iteration,

𝑥0 = 1 𝑓 (𝑥0 ) = 1.5829
𝑥1 = 1.5055 𝑓 (𝑥1 ) = 1.7691
𝑥2 = 4 𝑓 (𝑥2 ) = −3.1136
Substituting:

1.5829(1.50552 − 42 ) + 1.7691(42 − 12 ) + (−3.1136)(12 − 1.50552 )


𝑥3 =
2(1.5829)(1.5055 − 4) + 2(1.7691)(4 − 1) + 2(−3.1136)(1 − 1.5055)
= 1.4903

which has a function value of f(1.4903) = 1.7714. The process can be repeated,
with the results tabulated below:

i 𝑥0 𝑓 (𝑥0 ) 𝑥1 𝑓(𝑥1 ) 𝑥2 𝑓(𝑥2 ) 𝑥3 𝑓(𝑥3 )


1 0.0000 0.0000 1.0000 1.5829 4.0000 -3.1136 1.5055 1.7691

EEPC102 Module IV
2 1.0000 1.5829 1.5055 1.7691 4.0000 -3.1136 1.4903 1.7714
3 1.0000 1.5829 1.4903 1.7714 1.5055 1.7691 1.4256 1.7757
4 1.0000 1.5829 1.4256 1.7757 1.4903 1.7714 1.4266 1.7757
5 1.4256 1.7757 1.4266 1.7757 1.4903 1.7714 1.4275 1.7757

Thus, within five iterations, the result is converging rapidly on the true value of
1.7757 at x=1.4276.

EEPC102 Module IV

You might also like