4
$\begingroup$

Many textbooks include $\int \frac{1}{x} dx = \ln |x| + c$ in their list of antiderivative formulas, with the absolute value. Correspondingly, they do the same with the antiderivative of $\tan x$ or similar.

Is it productive to introduce the complication of the absolute value in a practically oriented course, when under time pressure? The alternative is to try to restrict ourselves to positive $x$.

My concerns are that one still needs to be careful not to include the singularity at 0 when writing definite integrals and the absolute value hides this. Some texts will omit the absolute value which can be confusing to students. So do most computer algebra systems, which operate with complex numbers by default.

$\endgroup$
2
  • 6
    $\begingroup$ Note $\int\frac{1}{x}\,dx = \ln|x|+C$ is incorrect when $x$ is a complex variable. And $\int\frac{1}{x}\,dx = \ln x +C$ is correct, but of course—even for $x<0$ real—$C$ could be a complex constant. The question is: What should we teach in a "baby" course, restricted to real numbers? $\endgroup$ Oct 2 at 13:45
  • 1
    $\begingroup$ @GeraldEdgar Yes, that is precisely the question I am asking. $\endgroup$
    – Hnrt
    Oct 2 at 14:32

4 Answers 4

10
$\begingroup$

Even $\int \frac{1}{x} \textrm{ d}x = \ln(|x|) + C$ is incorrect.

It should be

$$ \int \frac{1}{x} \textrm{ d}x = \begin{cases} \ln(x) + C_1 \textrm{ if $x > 0$}\\ \ln(-x) + C_2 \textrm{ if $x < 0$}\\ \end{cases} $$

Personally, I think that it would be best to include some problems where this issue arises naturally, and resolve it through thinking about it rather than memorizing another arcane aspect of a formula without understanding it.

$\endgroup$
8
  • 2
    $\begingroup$ Do you have an example of such a problem, where the issue arises naturally? $\endgroup$ Oct 2 at 12:56
  • 4
    $\begingroup$ Re: what books say—in Stewart, there is a disclaimer in the section on indefinite integrals: "We adopt the convention that when a formula for a general indefinite integral is given, it is valid only on an interval." You can see it in this MSE question. I looked through several other popular texts and didn't find any similar disclaimers, however. Some texts were careful when stating initial value problems to restrict them to specific intervals, others weren't. $\endgroup$ Oct 2 at 14:37
  • 2
    $\begingroup$ Good answer. We could say something like $\int\frac{1}{x}\, x=\ln(x)+c$ where $c$ is "locally constant," i.e., constant on connected open sets. When $x<0$, do not be surprised if $c$ is imaginary. The problem I have with the absolute value is that $|z|$ is not differentiable (complex analytic). $\endgroup$
    – user52817
    Oct 2 at 20:06
  • 3
    $\begingroup$ @Raciquel I want an antiderivative $F$ of a function $f$ to have the same domain as $f$. $\endgroup$ Oct 4 at 10:57
  • 2
    $\begingroup$ Me, too. Well, I rather think Stewart is better for the typical setting of first-year calculus. But are there many textbooks that give you what want? Not Stewart = Breusch (1967); not APEX Calculus; not really OpenStax, though their loose language may be open to a couple of interpretations, one that includes my example and possibly another that is your definition. I don't have many texts at hand though. $\endgroup$
    – Raciquel
    Oct 4 at 18:09
3
$\begingroup$

Absolute value or no absolute value, there will be students that attempt to integrate over infinite discontinuities anyway. Leaving off the absolute value in $\int \frac{1}{x}\,\mathrm{d}x = \ln|x| + C$ may stop them from blindly attempting to evaluate $\int_{-1}^2 \frac{1}{x}\,\mathrm{d}x$, but what about $\int_{-1}^2 \frac{1}{x^2}\,\mathrm{d}x$?

I agree with Steven's approach of having students encounter a problem and, through resolving it, arrive at a deeper understanding. So I would suggest giving the formula $\int \frac{1}{x}\,\mathrm{d}x = \ln|x| + C$ and asking students to attempt to evaluate something like $\int_{-1}^2 \frac{1}{x}\,\mathrm{d}x$. Let them get it wrong, and have them realize that their answer is wrong by asking them to perform some sort of check.

It may be beneficial to start with $\int_{-1}^2 \frac{1}{x^2}\,\mathrm{d}x$, as this integral is unambiguously divergent. Whereas for $\int_{-1}^2 \frac{1}{x}\,\mathrm{d}x$, students might want to make some sort of symmetry argument, cf. Cauchy principal value.

$\endgroup$
4
  • 1
    $\begingroup$ It feels like discussing why $\int_{-1}^2 \frac{1}{x} dx = \ln 2$ is "wrong" is a very deep rabbit hole, and realistically there isn't enough time for it. There's no obvious way to discover why this is wrong. It agrees with intuition (symmetry argument), so simply stating that according to our definition of an integral this is divergent would not feel satisfying for students. A smart student will feel that something's wrong here, perhaps our definition is not a sufficiently useful formalization of what might be real physical problem? There's a reason the concept of principal values exists. $\endgroup$
    – Hnrt
    Oct 2 at 16:19
  • 1
    $\begingroup$ But if we talk about Cauchy principal values, then we are in way too deep and probably already ran out of time. The quote from the book in your comment on the other answer seems like a good enough way to handle it. It makes it clear that we always need to keep in mind how large that interval might be. $\endgroup$
    – Hnrt
    Oct 2 at 16:19
  • $\begingroup$ @Hnrt I agree that there’s no time to discuss principal values. But I think it’s fine if students don’t “discover” why the integral diverges. My priority is that students remember that we can’t naively integrate over an infinite discontinuity. And this really only needs to be brought to students’ attention once we start discussing improper integrals, not earlier. No matter what kind of disclaimer we give, I think students won't really understand the importance until they see the formula's breaking point for themselves. $\endgroup$ Oct 2 at 21:35
  • $\begingroup$ If your concern is not about students misapplying the formula when evaluating definite integrals but about finding antiderivatives and solving initial value problems, that seems different to me. In that case, I do think students should be aware of the notion of the "maximum interval of existence" for a solution to an IVP. Larry Riddle wrote an article on this for AP Calculus teachers. $\endgroup$ Oct 2 at 21:44
3
$\begingroup$

One reason to discuss the anti-derivative of $\frac{1}{x}$ also for negative $x$ is that some (or many, depending on your audience) students will needs it later on when they learn about ordinary differential equations.

For instance, consider the very simple initial value problem $$ \begin{cases} \dot x(t) = x(t), \\ x(0) = x_0. \end{cases} $$ As we all know its solution is given by $x(t) = x_0 e^t$ for all $t \in \mathbb{R}$. But assume that you don't know the solution, yet (for instance, if you're a student taking an ODE course) and try to find it by using separation of variables. This gives $$ \int 1 \, \mathrm{d}t = \int \frac{1}{x} \, \mathrm{d}x. $$ Assume now that you only learnt that the anti-derivative of $\frac{1}{x}$ is $\ln x + c$ for positive $x$ - it happens to easily that you forget about the sign restriction and just blindly apply the formula. You thus get $$ t = \ln x(t) + c \qquad (*) $$ for a constant $c \in \mathbb{R}$ and hence, $x(t) = e^{-c} e^t$. The initial condition finally yields $e^{-c} = x_0$. But this cannot be true if $x_0$ is negative. (Unless one allows for complex $c$ - which is a pain here, since you then need to draw the complex logarithm of a negative number, which means that you cannot use the principal branch of the complex logarithm - in any case, this moves quite deep into the territory of complex analysis for such an innocent differential equation over the real field).

By the way, to add further to the confusion, the same problem does at first glance not arise if you do the separation of variables by using definite integrals instead of indefinite integrals. This gives you $$ \int_0^t 1 \, \mathrm{d}s = \int_{x_0}^{x(t)} \frac{1}{x} \, \mathrm{d}x, $$ thus (if makes again the mistake to believe that $\ln x$ were an anti-derivative of $\frac{1}{x}$ for postive and negative $x$) $$ t = \ln x(t) - \ln x_0 = \ln \frac{x(t)}{x_0}, \qquad (**) $$ and hence $x(t) = x_0 e^t$ - which is the correct solution formula. Yet, we made the same error as above, by taking $\ln x$ as a (presumed) anti-derivative of $\frac{1}{x}$ even for negative $x$. But the error cancels out for the following reason: Solutions cannot cross equilibrium points, so $x(t)$ always has the same sign as $x(0)$. So if $x(0)$ is negative, so is $x(t)$ and hence the correct computation in $(**)$ for negative $x(0)$ is actually $$ t = \ln (-x(t)) - \ln (-x_0) = \ln \frac{-x(t)}{-x_0} = \ln \frac{x(t)}{x_0}, $$ which just happens to give the same result as our incorrect (for $x(0) < 0$) computation above.

To sum up: If one learns the anti-derivative of $\frac{1}{x}$ only for positive $x$ and happens to forget about this restriction later on (which is a very easily made mistake), one gets a mess when working with initial value problems. The same method (separation of variables) can then lead either to correct or incorrect result, depending on how precisely one applies the method.

By the way, in case that you find the example discussed above too artificial (because the initial value problem is so simple) - a similar issue appears, for instance, for the logistic equation.

$\endgroup$
-1
$\begingroup$

Note that the derivative of $\log x$ has a Dirac delta term: https://mathoverflow.net/questions/127601/does-the-derivative-of-log-have-a-dirac-delta-term

This involves the principal value.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.