2

I had a question from a student which I'm unable to answer.

We were practicing the rule $\int \frac{f'(x)}{f(x)} \, dx=\ln(f(x))$.

A student noticed that if applied naively it gives the following two results $$\int \frac{2}{2x} \, dx = \ln(2x) +c$$ and $$\int \frac{2}{2x} \, dx = \int \frac{1}{x} \, dx = \ln(x) +c$$ which appear contradictory.

Paul Dean
  • 156
  • 6
  • 3
    By the way, the rule is $\int \frac{f'(x)}{f(x)}, dx = \ln | f(x) | + C$. – trancelocation Oct 17 '18 at 15:59
  • 2
    @trancelocation: the rule $\int\frac{f'(x)}{f(x)}, dx=\ln(f(x))+C$ is not incorrect. The absolute value is not necessary to make the rule correct. In fact, in the context where $x$ might be a complex variable $z$, the rule without the absolute value is preferred. – user52817 Oct 17 '18 at 23:35
  • @user52817: Fact is, that $(\ln (-x))' = \frac{1}{x}$ and the additive constant $C$ in $\ln x + C$ can only produce a positive factor in front of $x$ as $C = \ln c$ for $c>0$ and, hence, $\ln x + C = \ln x + \ln c = \ln (cx)$.

    Please, give a clear mathematical reasoning why going through the complex justifies the omitting of the absolute value in the rule.

    If you think of using a rule like $\log (ab) = \log a + \log b$ with complex numbers $a$ and $b$, then I have bad news for you: This rule is not valid anymore for complex numbers as we know it from the reals.

    – trancelocation Oct 18 '18 at 01:26
  • 1
    @trancelocation: the point is that $G(z)=\ln(|z|)$ is not analytic as a function of a complex variable $z$. In other words, $G'(z)$ does not exist, so $G(z)$ cannot be an antiderivative for $\ln(z)$. The antiderivative for $\frac{1}{z}$ is $\ln(z)$. – user52817 Oct 18 '18 at 20:22
  • I would also like to comment that if your definition of $\ln(x)$ is the definite integral $\int_0^x \frac{1}{t} \textrm{d} t$, then this computation is essentially the proof of the fact that $\ln(ab) = \ln(a)+\ln(b)$. – Steven Gubkin Oct 18 '18 at 21:34
  • @user52817: Let $f(x)$ be a real, continuously differentiable function on $\mathbb{R}$ while $\color{blue}{f(x) <0}$ for all $x$. Then $\int \frac{f'(x)}{f(x)},dx = \ln (\color{blue}{-}f(x) ) + C = \ln \color{blue}{|}f(x)\color{blue}{|} + C$. Maybe you confuse the absolute value in the reals with the absolute value in the complex plane. The real expression $|x|$ flips at most the sign while $|z| $ is completely different for $z \in \mathbb{C}\setminus\mathbb{R}$. So, $\ln |f(z)|$ does not correspond to the real $\ln |f(x)|$ but rather $\ln (-f(z))$ does. – trancelocation Oct 19 '18 at 16:00
  • @Steven Gubkin: It is $\int^x_{\color{red}{1}}\frac{1}{t}, dt$. – trancelocation Oct 19 '18 at 16:18
  • @trancelocation Oops! – Steven Gubkin Oct 19 '18 at 16:37
  • @trancelocation Look at the discussion here between equations 4 and 7. http://mathworld.wolfram.com/IndefiniteIntegral.html – user52817 Oct 21 '18 at 16:39
  • user52817: The part you are referring to is not maths but the private opinion of the author from a computer-algebraic point of view. I am surprised to see something like this on a site like Wolfram Mathworld. Reducing the appearance of $\int \frac{1}{x}dx= \ln|x| + C$ to "elementary textbooks" seems intentionally pejorative and is complete nonsense. Pointing out the problem with $0$ during "real integration" while simultaneously writing $\int_{-2}^{-1} \frac{dz}{z}$ without even mentioning the path-dependence of such an integral is quite embarrassing. – trancelocation Oct 22 '18 at 16:18
  • 5
    I removed a bunch of comments above, some as I felt they were inappropriate some as they became obsolete or went too far from the subject at hand. Sorry it took so long. – quid Oct 27 '18 at 16:36

2 Answers2

10

As guest mentioned in a comment, the two expressions are equivalent. Suppose $x > 0$ so the logarithm is defined without any problems.

For logarithms, $\log(2x) = \log (2) + \log (x)$. Consider graphing $x \mapsto \log (x)$ and $x \mapsto \log (2x)$, and maybe their difference, to illustrate. A good window would be $x=1\ldots 10$, $y=0\ldots 5$, as recommended by user52817.

Hence, the first integral equals $\log (x) + \log (2) + C_1$, where $C_1$ is the constant of integration.

The second integral equals $\log (x) + C_2$, where $C_2$ is the constant of integration.

To see that these are the same thing, choose $C_1 = C_2 - \log(2)$.

In particular, as $C_1$ goes through all the real numbers, and as $C_2$ does so, you get precisely the same collections of functions from both integrals.


This would be a nice moment to discuss the meaning of the constant of integration, and of the indefinite integral in general. You might want to see this questions and answers for motivation: Should we avoid indefinite integrals?

This might also be useful: Explaining the symbols in definite and indefinite integrals

Tommi
  • 7,018
  • 2
  • 25
  • 54
  • Extra credit if you mix in "mantissa" and "characteristic". ;-) – guest Oct 17 '18 at 16:22
  • 1
    Many thanks. I will gladly use the opportunities offered.

    In my defense for not seeing this straight away I'm citing fatigue due to being at the end of a long term :)

    – Paul Dean Oct 19 '18 at 08:47
  • 1
    @PaulDean Never be ashamed of asking "stupid" questions. Not asking the question does not teach you anything, while asking does, potentially. – Tommi Oct 19 '18 at 08:53
5

Show your students this integral as well (maybe later): Find $\int \sec^2x\tan x\,dx$.

Method 1: $u = \sec x, \,du = \sec x \tan x \,dx$

$\int \sec^2x\tan x\,dx = \int u\,du = \frac{u^2}{2} + C = \frac{\sec^2 x}{2} + C$.

Method 2: $u = \tan x, \,du = \sec^2 x \,dx$

$\int \sec^2x\tan x\,dx = \int u\,du = \frac{u^2}{2} + C = \frac{\tan^2 x}{2} + C$.

How can this be?

Well, those two answers are the same up to a constant. $\sec^2 x = \tan^2 x + 1$.

Chris Cunningham
  • 21,474
  • 6
  • 63
  • 148