# [Physics] Units inside a logarithm

dimensional analysisunits

I have troubles understanding a seemingly simple integral in a physical context. Take a look at $\int_{V_1}^{V_2} \frac{\mathrm{d}V}{V}$ which appears in isothermal expansions (V being the volume of a gas). Now of course the result is $\ln{V_2}-\ln{V_1}$ or using log laws $\ln{\frac{V_2}{V_1}}$.

The first expression would require you to evaluate the logarithm of a unit of volume which to my unterstanding is impossible. The second expression makes sense, though. How can you account for this apparent discrepancy?

There is no discrepancy in the value of the difference of the logs $$\log(V_1)-\log(V_2)$$ and the value of the log of the ratio $$\log{V_1/V_2}\;.$$ And neither of these depends on the choice of units. This is because, for both the difference and the ratio, the units cancel. For example, suppose I represent the "units" as a number "U" such that $$V=\alpha U\;,$$ where $\alpha$ is unitless.
Then $$\log(V_1)-\log(V_2)=\log(\alpha_1 U)-\log(\alpha_2 U)=\log(\alpha_1)+\log(U)-\log(\alpha_2)-\log(U)$$ $$=\log(\alpha_1)-\log(\alpha_2)\;.$$
And, similarly, $$\log(V_1/V_2)=\log(\frac{\alpha_1 U}{\alpha_2 U})=\log(\frac{\alpha_1}{\alpha_2})\;.$$
Not much else to say but that... Clearly, trying to interpret $\log(V_1)$ on its own doesn't make sense since changing the unit changes the numerical value... but the interpretation and sensibleness of the difference of the logs certainly makes sense and is independent of the choice of units.