# Can the logarithm quotient rule be used when numerator and denominator both have units?

Consider the example of trying to estimate exponential growth rate $\gamma$ from some series of measurements with units vs. time $y(t)$ using the model $y = y_0 \exp{(\gamma t)}$. Solving the model function gives $\gamma = \frac{d}{dt}\ln\frac{y}{y_0}$. Now, it's tempting to use the logarithm quotient rule $\ln{\frac{a}{b}} = \ln{a} - \ln{b}$ to get $\gamma = \frac{d}{dt}\left(\ln{y} - \ln{y_0}\right)$ and then drop $\frac{d}{dt}\ln{y_0}$ because $y_0$ doesn't vary with time, but now we're left with $\ln{y}$. If one writes a script to do this calculation, it does work and produces a result which is consistent with fitting the data to the exponential growth model (shown in figure 1, with the additional complication that $y-\mathrm{offset}$ takes the place of $y$).

So, what was wrong with using the log quotient rule, and why did it seem to work, anyway?

Related to What is the logarithm of a kilometer? Is it a dimensionless number? , but different because of the quotient rule and example calculation.

• Not exactly clear what your question is, but note that (d/dt)ln(y) =(dy/dt)/y = y'/y or the relative rate of change in y. This quantity is independent of the units that you use to describe y. – Samuel Weir Apr 11 '18 at 17:07
• math.stackexchange.com/questions/238390/… Does this help you? – Yuzuriha Inori Apr 11 '18 at 17:10
• @SamuelWeir Yes, I know it can be reduced to y'/y and that's why I got away with it. But the log quotient rule is ln(a/b) = ln(a) - ln(b). a and b can both have units, but a/b will be unitless, making it a legal argument to ln. So, the quotient rule is invalid if a and b have units. – EL_DON Apr 11 '18 at 18:34
• @YuzurihaInori No, that doesn't help. I understand that ln(1 meter) is illegal. The funny business is ln(2 meters / 1 meter) is legal, but applying the log quotient rule to it creates a problem. – EL_DON Apr 11 '18 at 18:35
• $\ln(a/b)=\ln(ka/kb)=\ln(ka)-\ln(kb)$. Now choose $k$ to have units inverse of $a$ and $b$. – The Photon Apr 11 '18 at 19:17

$\gamma = \frac{d}{dt}\ln\frac{y}{y_0} = \frac{1}{y/y_0} \frac{d}{dt}\left(\frac{y}{y_0}\right) = \frac{1}{y}\frac{dy}{dt}$
This gives a perfectly legal equation with no use of the logarithm rules. Also notice that the units of $y$ cancelled out completely, so if the log quotient rule had been used to get rid of $y_0$, the units of $ln(\mathrm{mm})$ would've cancelled out as well; the unphysical log(unit) part only exists in intermediate steps.
If a constant offset is involved as in the example figure, then it's $\gamma = \frac{d}{dt}\ln\frac{y-y_{off}}{y_0} = \frac{1}{(y-y_{off})/y_0} \frac{d}{dt}\left(\frac{y-y_{off}}{y_0}\right) = \frac{1}{y-y_{off}}\frac{dy}{dt}$, so the y-axis label of the bottom plot should be updated to something like y'/(y-off).