11

My professor says that writing this is convenient $$\int \frac 1x \mathrm{d}x = \ln|x| + C\tag{1}$$ but wrong, since it should be written as: $$\int \frac 1x \mathrm{d}x = \begin{cases}\ln x + C &x > 0\quad(\star)\\[0.2em] \ln(-x) + C &x < 0\end{cases}$$

I was wondering why is that the case. I thought that the two were equivalent, as one can see by the definition of absolute value. In $(\star)$ the equality sign is dropped because the logarithm is not defined in $0$, but that would be the case with $(1)$ as well.

Git Gud
  • 31,356
rubik
  • 9,344
  • Are you sure you didn't misunderstand something? Perhaps he wants antiderivatives defined in an interval? – Git Gud Nov 22 '14 at 20:32
  • @GitGud: I'm fairly sure he intended to say this. He even wrote it on the blackboard. Could it be that he made a mistake? – rubik Nov 22 '14 at 20:33
  • 3
    Notice that the integral only exists, if $0$ is not in the interval $[a,b]$ – Peter Nov 22 '14 at 20:33
  • @Peter Well, the integrand only makes sense if $0$ is not there, so that doesn't add much. – Git Gud Nov 22 '14 at 20:35
  • @Peter: are you talking about definite integrals? – rubik Nov 22 '14 at 20:35
  • Yes, and in this case, you cannot simply use the antiderivate to calculate the integral. – Peter Nov 22 '14 at 20:36
  • Both ways are perfectly fine (and equivalent). My bet is that your teacher meant something else (if he did not make a mistake) – Winther Nov 22 '14 at 20:37
  • @Winther probably the posted answer from Ivo is what the teacher meant. – Tim Seguine Nov 22 '14 at 20:38
  • 1
    Yes, the formula $F(b)-F(a)$ gives a value here, but if $0$ is in the interval [a,b], the value is false because the integral does not exist. – Peter Nov 22 '14 at 20:38
  • But for intervals not containing $0$, you simply can use the antiderivate $ln|x|$ – Peter Nov 22 '14 at 20:41
  • @TimSeguine If this is the case then this is teaching meant to confuse. – Winther Nov 22 '14 at 20:43
  • 2
    @Winther: Well he probably wrote two different constant and I didn't pay enough attention (the class is huge and I'm a bit far). Ivo's observation makes sense. – rubik Nov 22 '14 at 20:45
  • @Winther I disagree. – Tim Seguine Nov 22 '14 at 20:45
  • @rubik I agree that it makes sense that this is what he meant, but we cannot apply the integral over an interval that contains $0$ so this will never be an issue. Thats why I understand you were confused. I my opinion your definition is perfectly fine and there is no problem in using it. – Winther Nov 22 '14 at 20:46
  • but $\frac{1}{x}$ makes no sence for $x=0$ – Dr. Sonnhard Graubner Nov 22 '14 at 20:48
  • 2
    @Winther If we disregard the unfortunate indefinite integral notation for a moment, the point of the teacher most likely is that the family of primitives of $\frac{1}{x}$ on its domain $\mathbb{R}\setminus {0}$ is not $\log \lvert x\rvert + C$, but $\log \lvert x\rvert + C + D\cdot \operatorname{sgn} (x)$. – Daniel Fischer Nov 22 '14 at 20:50
  • ask you Prof. for a counter example, everyone can say that your notation is not true – Dr. Sonnhard Graubner Nov 22 '14 at 20:53
  • @DanielFischer You are right and I agree that this is likely what the teacher meant, but I feel its confusing to say that the students way of doing it is wrong (because of the indefinite nature of the integral notation) – Winther Nov 22 '14 at 20:55
  • hello, Daniel why do you write $\log|x|+C+D sgn(x)$ if $x>0$ we have $\log(x)+C+D=\log(x)+C'$ and if $x<0$ then we have $\log(-x)+C-D=\log(-x)+C''$ hm, i mean that is senceless – Dr. Sonnhard Graubner Nov 22 '14 at 21:00
  • @Winther Well, IMO, using the notation $\int f(x),dx$ is already wrong. But if you use it to denote the family of primitives of $f$, then it is wrong to say that the family is ${ \log \lvert x\rvert + C : C\in\mathbb{R}}$. – Daniel Fischer Nov 22 '14 at 21:01
  • 1
    @Dr.SonnhardGraubner Using $D\cdot \operatorname{sgn} (x)$ is just a convenient way to avoid writing the case distinction here in the comments. – Daniel Fischer Nov 22 '14 at 21:05
  • 1
    @DanielFischer IMO I think we should be careful about using the word wrong about something that is a minor detail (and to a student learning about integration for the first time this is a minor detail). – Winther Nov 22 '14 at 21:09
  • 1
    Related discussion: https://golem.ph.utexas.edu/category/2012/03/reader_survey_logx_c.html – Hans Lundmark Nov 22 '14 at 21:12

2 Answers2

14

I don't see anything wrong with what you wrote there. I could only imagine a rigorous teacher commenting about the constant... it need not be the same in each interval, as in: $$\int \frac 1x \mathrm{d}x = \begin{cases}\ln x + C_1 &x > 0\\[0.2em] \ln(-x) + C_2 &x < 0\end{cases}$$

Ivo Terek
  • 77,665
9

The notation $\int \frac 1x dx$ is already ambiguous. If $f$ is defined on some open set of the real numbers, the notation $$ \int f(x) dx = RHS$$ (without borns of integration) means that the primitives on $f$ in its open set of definition are the functions that are parametrized by the RHS.

If $f$ is defined on an inverval, this simply gives $$ \int f(x)dx = F(x) + C, C \in \mathbb{R}.$$ If $f$ is defined on a union of disjoint intervals, then you should be more precised. In my opinion, it is better in this case to write a sentence of the kind:

The primitives of $\frac 1x$ on $\mathbb{R}^\ast$ are the functions defined by $\ln(-x) + C_1$ for $x < 0$ and $\ln(x) + C_2$ for $x > 0$, where $C_1$ and $C_2$ are arbitrary real constants.