Logarithmic scale - interpolation

In summary, linear interpolation can be used to find y for a known x on a linear scale plot, using the formula y = y1 + (x-x1)(y2-y1)/(x2-x1). On a log-log plot, the same formula can be used by simply replacing all y and x values with their logarithms.
  • #1
FEAnalyst
346
147
TL;DR Summary
How can I interpolate between two values on a logarithmic scale plot?
Hi,

knowing the coordinates of two points: ##(x_1,y_1)## and ##(x_2,y_2)## on a linear scale plot, I can use linear interpolation to get ##y## for a point of known ##x## using the formula below: $$y=y_1+(x−x_1) \frac{(y_2−y_1)}{(x_2−x_1)}$$
But how does it look like in the case of logarithmic scale (log-log plot)? How can I get ##y## for known ##x## when I have the coordinates of two other points? So far I haven't found any working formula for that.

Thanks in advance for your help.
 
Mathematics news on Phys.org
  • #2
FEAnalyst said:
when I have the coordinates of two other points?
You have to specify what you mean by that ! Example: Plot ##y = x^3## on log-log paper. Suppose you want to interpolate between ##(3,27)## and ##(4,64)## to find ##3.75^3## (is 52.73).

1619110562193.png


Do you have the coordinates of those points as found on the axis, or in mm on the paper ?

In the first case your $$y-y1=(x−x_1) \frac{(y_2−y_1)}{(x_2−x_1)}$$is still 'valid' in the logarithm world$$
\log{y\over y_1} = \log{x\over x_1}*{\log(y_2/y_1)\over \log(x_2/x_1)}$$as you can easily check with a calculator (or excel ?:) ):
1619109772500.png


In the second case you do something similar, but you already have the logarithms.
1619110493181.png


##\ ##
 
  • Like
Likes FEAnalyst
  • #3
Just replace all y values by log(y) and all x-values by log(x). That's all. That's exactly what a log-log plot does. Your result is then log(y), but of course you can recover y using y = exp(log(y)).
 
  • Like
Likes FEAnalyst

FAQ: Logarithmic scale - interpolation

What is a logarithmic scale?

A logarithmic scale is a type of scale used in graphs and charts where the values on the scale increase or decrease exponentially. This means that each increment on the scale represents a multiplication or division by a constant factor, rather than a fixed amount.

How is interpolation used with a logarithmic scale?

Interpolation is used with a logarithmic scale to estimate values between known data points. This is done by using the logarithmic relationship between the data points to calculate the corresponding value on the scale.

What are the advantages of using a logarithmic scale?

One advantage of using a logarithmic scale is that it can visually represent a wide range of values on a single graph. This makes it useful for displaying data that covers a large range of magnitudes, such as in scientific or financial data.

How do you convert data from a linear scale to a logarithmic scale?

To convert data from a linear scale to a logarithmic scale, you can use a logarithmic function to transform the data. For example, if the data is on a linear scale from 1 to 10, you can use the logarithmic function log10(x) to convert it to a logarithmic scale.

Can a logarithmic scale be used for any type of data?

A logarithmic scale is most commonly used for data that has a wide range of values, such as in scientific or financial data. However, it can also be used for other types of data if the relationship between the data points follows a logarithmic pattern.

Similar threads

Replies
3
Views
1K
Replies
20
Views
3K
Replies
1
Views
913
Replies
5
Views
2K
Replies
9
Views
2K
Replies
7
Views
1K
Replies
2
Views
891
Back
Top