3

Is it proper to integrate an expression such as $\displaystyle \int \frac 1 {x~\mathrm{J}} \, dx$, where $x$ is in the physical unit of Joules (J)?

The result is $\ln \dfrac x J + \text{constant}$. However, I don't know how to take the natural log of a Joule, or if that is even permitted. My safer approach would be to take the units out of the expression before integrating, by treating the unit expression as a constant:

$$1~J~\int \frac{1}{x~J~(1/J)} \, dt$$

Yet I have been told by a mathematician that this is not necessary. Do you have recommendations to proceed?

  • 2
    Can you give a context for this integration? Note that if $x$ is in Joules, probably $dx$ is also in Joules, so they will cancel in this case – Andrei Apr 29 '17 at 17:38
  • It is for a similar expression to derive Newton's Law of Cooling. The real integral expression I am using is in Joules/Kelvin instead of Joules, while the dx is still in J. – Mark Ciotola Apr 29 '17 at 18:00
  • You should not need to. You will probably need to use a definite integral, and then you have something like $\ln(x)-\ln(x_0)=\ln\frac{x}{x_0}$, so the units will cancel – Andrei Apr 29 '17 at 18:04
  • I see what you mean, but I need to be able to provide an indefinite integral. – Mark Ciotola Apr 29 '17 at 18:08
  • Would $\ln(x~meters)$ ever be a proper expression? – Mark Ciotola Apr 29 '17 at 19:27
  • Never. You can just multiply (divide) physical quantities, or add/subtract them if they are the same. Logarithms, or trigonometric functions, or exponentials, all are of dimensionless quantities – Andrei Apr 30 '17 at 02:05

3 Answers3

3

It is proper to integrate units, but in physics, you can often guess them at the end. This is probably why you were told it wasn't necessary. Since an integral is a sum of the integrand multiplied by tiny portions of the differential, say $dt$, which would have the unit time. For example, we have $E=\int_{0}^{t}Pdt$. $E$ is in Joules, $P$ is in Joules/second, and $dt$ is in seconds. Thus we simply multiply the units of $dt$ by the units of $P$ to get Joules, and everything works out.

As for your example, we have $\int\frac{1}{x}dx$. Since both $x$ and $dx$ are in joules, the Joules unit cancels out and we are left with a dimensionless variable inside the exponent, which is exactly what we want, as it is not correct to take the natural log of a unit, as you yourself stated.

Isaac Browne
  • 8,076
1

It is perfectly proper, and one should bear in mind the units of $dx$. For example, if $f(x)$ is in meters per second and $dx$ is in seconds, the $f(x)\,dx$ is in meters, and so is the integral. So you have $$ \int \underbrace{\qquad \frac 1 x \qquad}_{\large1/\text{Joules}} \quad \underbrace{\qquad dx \qquad}_{\large\text{Joules}}. $$ The units cancel and one has a dimensionless quantity.

  • So for integrals that result in a logarithmic expression, we need to make sure the integrand is in units that cancel those in the differential, correct? So then any other units need to be taken out of the integrand prior to integration, correct? – Mark Ciotola Apr 29 '17 at 19:25
  • @MarkCiotola : No$,\ldots,$If you have, for example, $$ \int_a^b \frac c x , dx $$ and $x$ is in Joules and $c$ is in meters, then the Joules cancel and you get an answer in meters. You get $c(\log_e b - \log_e a) = c \log_e(b/a),$ and the thing whose logarithm is taken is dimensionless, but it is multiplied by something that is not dimensionless. $\qquad$ – Michael Hardy Apr 29 '17 at 19:30
0

Thank you for all of the answers. Your comments helped cleanup my confusion.

When integrations are performed in a purely symbolic manner, the units are implied without explicitly stating them. So from a perspective of unit analysis, some integration results don't seem to make sense. However, if one is actually plugging numbers (with units) into the formula, or considering discrete integrals, then those units are explicitly stated, and the results do make sense. Michael Hardy's answer was a good example.