Linear and Logarithmic Interpolation - CMU

[Pages:1]Linear and Logarithmic Interpolation

Markus Deserno Max-Planck-Institut fu?r Polymerforschung, Ackermannweg 10, 55128 Mainz, Germany

(Dated: March 24, 2004)

One is occasionally confronted with the task of extracting quantitative information out of graphs. More specifically, one has found a point in a graph one is interested in, and now wants to know which precise value on the horizontal and/or vertical axis it corresponds to. These notes explain how this is done for the two cases of linear and logarithmic scale.

Linear scale

The task of interpolating between tic-marks on the scale of a graph is quite straightforward if the axis in question has a linear scale, because then one just has to do a linear interpolation. Have a look at Fig. 1. Between two tic-marks x1 and x2 we want to know the precise x-value corresponding to the marked cross. We can measure the length of the intervals a and b (simply by using a ruler). If the horizontal axis is linear, we evidently must have

x2 - x x - x1

=

b a

=

1 f

-

1

,

(1)

where we also introduced the fractional division

f

:=

a

a +

b

.

(2)

From this we get the simple linear interpolation formula

x=?

x1

x2

a

b

FIG. 1: Typical graphical read-off problem: What is the value of the abscissa at the point of the cross?

This, however, means that the logarithm of these values is on the appropriate linear scale! Hence, if the axis in Fig. 1 were in fact logarithmic, Eqn. 1 would have to be replaced by

log x2 - log x log x - log x1

=

1 f

-

1

.

(4)

Solving this for x, we find the logarithmic interpolation formula

x = f x2 + (1 - f )x1 (lin) .

(3)

x = xf2 x11-f

(log) .

(5)

Logarithmic scale

The situation is a little less straightforward if the axis is not on a linear scale but rather on a logarithmic scale. But in fact, the problem can be reduced to the previous one. A logarithmic scale simply means that values are not plotted at their "appropriate" location, but at a location proportional to the logarithm of their value.

If

for

instance

f

=

1 2

,

i. e.,

the

cross

is

exactly

between

the two tic-marks, linear interpolation would simply yield

x

=

1 2

(x1

+

x2),

the

expected

the logarithmic case we'd find x

arithmetic average. In = x1x2, the geometric

average. This makes sense, because on a logarithmic scale

the half-point between x1 and x2 has the property that if

we get it by multiplying x1 by some factor y, multiplying

once more by the same factor gives us x2. Since in this case we have y = x/x1 = x1x2/x1 = x2/x1, we have x1y2 = x1(x2/x1) = x2 -- as expected.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download