Integrating 1/x with units (logarithm)

Click For Summary
SUMMARY

The discussion centers on the mathematical implications of integrating the function ##\frac{1}{x}##, specifically addressing the expression $$\int_a ^b \frac{1}{x} dx=\ln{b}-\ln{a}=\ln{\frac{b}{a}}$$ when units are involved. Participants argue that while the final result is dimensionless, the intermediate steps raise concerns about the validity of logarithmic rules due to unit cancellation. A proposed solution is to redefine the antiderivative as ##\ln{\frac{\left|x\right|}{\left[x\right]}}+C## to maintain dimensional consistency. The conversation highlights the complexities of integrating functions with units and the need for clear mathematical definitions.

PREREQUISITES
  • Understanding of integral calculus, specifically the integration of rational functions.
  • Familiarity with logarithmic functions and their properties.
  • Knowledge of dimensional analysis and the role of units in mathematical expressions.
  • Basic concepts of Riemann sums and their application in integration.
NEXT STEPS
  • Explore the concept of dimensional analysis in mathematical contexts.
  • Learn about the properties of logarithmic functions and their applications in calculus.
  • Investigate the implications of integrating functions with units in physics and engineering.
  • Study the formal definitions of logarithmic functions and their series expansions.
USEFUL FOR

Mathematicians, physicists, engineers, and students interested in the integration of functions with units and the implications of dimensional analysis in mathematical expressions.

greypilgrim
Messages
581
Reaction score
44
Hi.

What exactly is happening mathematically when you integrate ##\frac{1}{x}##
$$\int_a ^b \frac{1}{x} dx=\ln{b}-\ln{a}=\ln{\frac{b}{a}}$$
if there's units? Sure, they cancel if you write the result as ##\ln{\frac{b}{a}}##, but the intermediate step is not well-defined, so why should log rules even be justified?
 
Physics news on Phys.org
greypilgrim said:
Hi.

What exactly is happening mathematically when you integrate ##\frac{1}{x}##
$$\int_a ^b \frac{1}{x} dx=\ln{b}-\ln{a}=\ln{\frac{b}{a}}$$
if there's units?
You multiply the dimension of ##\left[\dfrac{1}{x}\right]## with the dimension of ##\left[dx\right]## ...
greypilgrim said:
Sure, they cancel if you write the result as ##\ln{\frac{b}{a}}##, but the intermediate step is not well-defined, so why should log rules even be justified?
... and the intermediate step is even more directly an area built from ##1/x## and ##x## in the Riemann sums.
 
  • Like
Likes   Reactions: topsquark
We could substitute ##x=y \times 1##, where ##y## is unitless. This would make the entire expression unitless.
 
  • Like
Likes   Reactions: topsquark
greypilgrim said:
Hi.

What exactly is happening mathematically when you integrate ##\frac{1}{x}##
$$\int_a ^b \frac{1}{x} dx=\ln{b}-\ln{a}=\ln{\frac{b}{a}}$$
if there's units? Sure, they cancel if you write the result as ##\ln{\frac{b}{a}}##, but the intermediate step is not well-defined, so why should log rules even be justified?
You think we should just throw out a Mathematical result because the units are somewhat troublesome? Yeeouch!

Let y = cx where c is a constant factor to make y unitless. Then do the integration.

-Dan
 
  • Like
Likes   Reactions: Hill
fresh_42 said:
You multiply the dimension of ##\left[\dfrac{1}{x}\right]## with the dimension of ##\left[dx\right]## ...

... and the intermediate step is even more directly an area built from ##1/x## and ##x## in the Riemann sums.
Sure, the result is dimensionless, but if ##\left[dx\right]=\left[a\right]=\left[b\right]\neq 1##, then ##\ln{b}-\ln{a}## is ill-defined, isn't it?

topsquark said:
You think we should just throw out a Mathematical result because the units are somewhat troublesome?
Of course not, it's more that algebra with units usually works out perfectly except in this one case (at least this is the only exception I can think of).

I think the fix is that the proper antiderivative of ##\frac{1}{x}## isn't actually ##\ln{\left|x\right|}+C## but ##\ln{\frac{\left|x\right|}{\left[x\right]}}+C##.
 
greypilgrim said:
Sure, the result is dimensionless, but if ##\left[dx\right]=\left[a\right]=\left[b\right]\neq 1##, then ##\ln{b}-\ln{a}## is ill-defined, isn't it?

You say that ##a=v(a)\cdot u(a)## and ##b=v(b)\cdot u(b)## where ##v(\cdot)## is the value and ##u(\cdot)## is the unit. Now you assume ##u(a)=u(b)## and compare the dimensionless quantity
$$
\log\left(\dfrac{a}{b}\right)=\log\left(\dfrac{v(a)u(a)}{v(b)u(b)}\right)=\log\left(\dfrac{v(a)}{v(b)}\right)=\log v(a)-\log v(b)
$$
with
\begin{align*}
\log\left(\dfrac{a}{b}\right)&=\log(a)-\log(b)=\log(v(a)\cdot u(a))-\log(v(b)\cdot u(b))\\&=
\left(\log v(a) + \log u(a)\right)-\left(\log v(b)+\log u(b) \right)=\log v(a)-\log v(b)
\end{align*}
where the units cancel, too.

Your confusion comes only because you leave out the details.
 
  • Like
Likes   Reactions: topsquark
greypilgrim said:
Hi.

What exactly is happening mathematically when you integrate ##\frac{1}{x}##
$$\int_a ^b \frac{1}{x} dx=\ln{b}-\ln{a}=\ln{\frac{b}{a}}$$
if there's units? Sure, they cancel if you write the result as ##\ln{\frac{b}{a}}##, but the intermediate step is not well-defined, so why should log rules even be justified?
What units!!! The problem has no units in it.
 
greypilgrim said:
Of course not, it's more that algebra with units usually works out perfectly except in this one case (at least this is the only exception I can think of).

I think the fix is that the proper antiderivative of ##\frac{1}{x}## isn't actually ##\ln{\left|x\right|}+C## but ##\ln{\frac{\left|x\right|}{\left[x\right]}}+C##.
Your first expression is correct, the second makes no sense what-so-ever. It isn't the correct antiderivative!

Look again at my comment about defining a constant c such that cx is unitless.

-Dan
 
fresh_42 said:
\begin{align*}
\left(\log v(a) + \log u(a)\right)-\left(\log v(b)+\log u(b) \right)=\log v(a)-\log v(b)
\end{align*}
This step requires ##\log u(a)=\log u(b)## which requires ##\log u(\cdot)## to be defined, so how is the logarithm of a unit defined?
 
  • #10
greypilgrim said:
This step requires ##\log u(a)=\log u(b)## which requires ##\log u(\cdot)## to be defined, so how is the logarithm of a unit defined?
You confuse different aspects again. The logarithm of a unit ##u## is simply ##\log u,## a formal concept. If you ask for physical relevance you need to come up with an example for ##a=v(a)\cdot u(a) =e^{b}=e^{v(b)\cdot u(b)}## first. You cannot switch the burden of proof. I am fine with dimensionless ##a## and ##b.##
 
  • #11
greypilgrim said:
Hi.

What exactly is happening mathematically when you integrate ##\frac{1}{x}##
$$\int_a ^b \frac{1}{x} dx=\ln{b}-\ln{a}=\ln{\frac{b}{a}}$$
if there's units? Sure, they cancel if you write the result as ##\ln{\frac{b}{a}}##, but the intermediate step is not well-defined, so why should log rules even be justified?
This is discussed in some depth here:

https://math.ucr.edu/home/baez/physics/General/logs.html
 
  • #12
fresh_42 said:
The logarithm of a unit is simply a formal concept. If you ask for physical relevance
I'm not asking for physical relevance (which is why I posted in the maths forum), just a clean mathematical definition. This is analysis, where ##\log## is often defined by its series. Well I guess you can formally write down the series of the log of a unit, but for subtraction questions about convergence arise.

PeroK said:
This is discussed in some depth here:

https://math.ucr.edu/home/baez/physics/General/logs.html
Thank you, this seems to exactly address the issue.

topsquark said:
Your first expression is correct, the second makes no sense what-so-ever. It isn't the correct antiderivative!

Look again at my comment about defining a constant c such that cx is unitless.
My second expression is exactly equation (7) in that link (except that I focused on the special case ##x_0=1\cdot [x]##).

But I just googled and apparently the use of square brackets ##[\cdot]## isn't consistent, some sources use it for dimension, others for the unit (which obviously depends on the unit system). I meant the latter, unit.
 
  • #13
greypilgrim said:
I'm not asking for physical relevance (which is why I posted in the maths forum), just a clean mathematical definition. This is analysis, where ##\log## is often defined by its series. Well I guess you can formally write down the series of the log of a unit, but for subtraction questions about convergence arise.
But there are no units in mathematics!
 
  • #14
martinbn said:
But there are no units in mathematics!
I'm really confused by that statement and have never heard of anything like that before. So all the calculations in physics are not mathematical? Maths isn't the language of science after all? What about all the algebraic operations done with units as if they were variables, like multiplying and cancelling?

The question about what kind of mathematical object units are is apparently not such an easy one though, Terry Tao wrote an article about this:
https://terrytao.wordpress.com/2012/12/29/a-mathematical-formalisation-of-dimensional-analysis/
 
  • Like
Likes   Reactions: fresh_42
  • #15
greypilgrim said:
My second expression is exactly equation (7) in that link (except that I focused on the special case ##x_0=1\cdot [x]##).
Oh. I missed the [ ] in the denominator. My bad.

Still, the y = cx is the standard prescription for this.

-Dan
 
  • Like
Likes   Reactions: SammyS
  • #16
Setting y=cx does not help. Changing the integration parameter to y introduces a factor of c, which cancels the 1/c. But then switching the integration limits to y introduces another factor of c, so the result is simply ln(cy) with no insight gained.

As far as I can see the insight is gained by appreciating that the integral is only physically valid because it is the difference of two logs. Noting that you can also write the indefinite integral as ln(b/c) where c is an integration constant with the same dimensions as b.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
  • · Replies 19 ·
Replies
19
Views
4K