Logarithms and non-linear data
In a nutshell
Often you will be presented with sets of data which share a non-linear relationship. Logarithms can be used to identify and linearise non-linear trends in data.
Note: In most cases, you will see log(x)to mean log10(x).
The case where y=axn
Given a non-linear relationship of the form y=axn, you can apply the logarithm with base 10 (or indeed any base) and use logarithm laws to obtain a linear relationship between log(y) and log(x):
ylog(y)log(y)=axn=log(axn)=nlog(x)+log(a)
Comparing this with an equation of the form Y=mX+c, you have that log(y) and log(x) are linearly related with m=n and c=log(a). The graph of log(y) against log(x) forms a straight line with slope n and y-intercept log(a).
Example 1
The kinetic energy of a thrown baseball in joules is equal to K=21mv2, where m is the mass of the ball in kg, and v is the speed of the ball in ms−1. Throughout a sequence of experiments, the speed and kinetic energy of the ball are measured to 1 d.p. at various times:
Create a table of values for log(K) against log(v) to 2 d.p., and use it to plot log(K) against log(v). Draw a line of best fit through these points, and use it to estimate the value of m to 2 d.p..
Your table of values will look like:
Graphing these points, and putting a line of best fit through them (which should have a slope of approximately 2) looks like:
By taking the logarithm of both sides of K=21mv2, you have
log(K)log(K)log(K)log(K)=log(21mv2)=log(21m)+log(v2)=log(21m)+2log(v)=2log(v)+log(21m)
This gives the linear equation for the line above. The y-intercept is approximately −1.13. Thus you find that −1.13=log(21m), and so m=2×10−1.13=0.148…
Therefore, to 2 d.p. the mass of the baseball is approximately 0.15kg.
The case where y=abx
Given a non-linear relationship of the form y=abx, you can apply the logarithm with base 10 (or indeed any base) and use logarithm laws to obtain a linear relationship between log(y) and x:
ylog(y)log(y)=abx=log(abx)=xlog(b)+log(a)
Comparing this with an equation of the form Y=mX+c, you have that log(y) and x are linearly related with m=log(b) and c=log(a). So the slope of the graph of the equation log(y)=log(b)x+log(a) is log(b), and the y-intercept is log(a).