# antiderivatives of $\frac1{x-1}$

I was told to find the anti-derivative of this problem: $$\int\frac{2x^2-13x+18}{x-1} dx$$
I solved the problem - first dividing and then finding the anti-derivative: $$x^2-11x+7(\ln(x-1))+c$$
The given answer was the same as mine, but they put the $$x-1$$ in $$\ln(x-1)$$ in absolute value - $$\ln|x-1|$$. Why?

• $\int {\mathrm{dx}\over x} = \ln|x| +C$ Jul 25, 2019 at 15:43
• General reminder even to many professional mathematicians: The family of all antiderivatives of $1/x$ is given by $\begin{cases} \log(x)+C \text { for } x > 0 \\ \log(-x)+D \text{ for } x < 0 \end{cases}$ for possibly different constants $C,D \in \mathbb R$. The other formula as quoted above is the imprecise version which is, unfortunately, taught in many calculus textbooks, presumably because it's short and already allows nitpicking with the absolute value. Jul 25, 2019 at 16:23

Because the domain of $$\ln$$. it will not allow negative numbers inside ;)

Consider what happens if $$x<1$$: The original function makes complete sense, so there ought to be an antiderivative, but your expression doesn't make sense. Calculate it, and $$\ln(1-x)$$ appears. The two antiderivatives for $$x<1$$ and $$x>1$$ are most easily stitched together with an absolute value.

A lot of people are telling you it's a domain error, but I will try to give an explanation for a beginner level calculus student looking at this problem. This isn't exactly your problem, but explains why we include the absolute value around $$\ln|x|$$.

Look at this integral

$$\int_{-2}^{-1} \dfrac{1}{x} dx$$

Now if you graph this function it is very clear that this function is defined on this interval, so you should be able to take the area under the curve right?

Since you know that the antiderivative of $$\frac{1}{x}$$ is $$\ln(x)$$, the result should be

$$\ln(x)|_{-2}^{-1} = \ln(-1) - \ln(-2)$$

Wait, that's illegal! $$\ln(x)$$ is not defined for $$x\leq 0$$ (well unless we're in complex plane, but thats a whole other can of worms)! So in order to make sure this integral is correctly evaluated for $$x<0$$, we need to place absolute value signs around the argument

$$\int_{-2}^{-1} \dfrac{1}{x} dx = \ln|-1| - \ln|-2| = -\ln2$$

• This is the best answer here (+1) Jul 25, 2019 at 15:48
• -1. Saying "oh, the formula I [falsely] believe to be true does not work -- well ok, I just put an absolute value sign at a place where it seems useful" is not the kind of argument I expect from my calculus students. Jul 25, 2019 at 16:14
• A better argument would be "hey, look at the graph: the area which that integral measures would be the same as $\int_1^2 \frac{1}{x}dx$, but it's beneath the $x$-axis, so it gets a negative value". And then in a next step one could generally get $\int_a^b \frac{1}{x} dx = - \int_{-b}^{-a} \frac{1}{x}dx$. And then, that a general antiderivative of $1/x$ on $(-\infty, 0)$ is given by $-ln(-x) +C$. Jul 25, 2019 at 16:19
• @TorstenSchoeneberg Nvm, misread the limits. Jul 25, 2019 at 17:04

Hint: Since we have $$\int\frac{1}{x}dx=ln(|x|)+C$$