Solution

Solve the following integrals:

\(\displaystyle{\int_{2}^{3} \dfrac{1}{x} \, dx}\)

\(\displaystyle{\int_{-3}^{-2} \dfrac{1}{x} \, dx}\)

A good starting point is to draw a diagram.

As \(\tfrac{1}{x}\) is an odd function, the two shaded areas that represent the integrals should be the same. However, one of the areas is below the \(x\)-axis which suggests that \[\displaystyle{\int_{-3}^{-2} \dfrac{1}{x} \, dx} = - \displaystyle{\int_{2}^{3} \dfrac{1}{x} \, dx}.\]

Does this match with our geometrical reasoning at the beginning? We thought that \[\displaystyle{\int_{-3}^{-2} \dfrac{1}{x} \, dx} = - \displaystyle{\int_{2}^{3} \dfrac{1}{x} \, dx},\]

and using the laws of logarithms we can show that \(\ln \frac{2}{3} = -\ln \frac{3}{2}\), which is as expected.

Taking the absolute value of \(x\) means that we aren’t trying to take the logarithm of a negative number. Why is it possible to do this? We explore below why the integral can be written in this form.

Sketch the following functions along with their gradient functions on the same set of axes.

\(f(x) = \ln (x)\)

\(g(x) = \ln (-x)\)

What are the domains of \(f(x)\) and \(g(x)\)?

The domain of \(f(x) = \ln x\) is \(x > 0\) and the domain of \(g(x) = \ln(-x)\) is \(x < 0\).

Using your sketch to help you, write down the derivatives of \(f(x)\) and \(g(x)\).

The gradient function of \(f(x)\) is \(f'(x) = \tfrac{1}{x}, x >0\).

As \(\ln(-x)\) is a reflection of \(\ln x\) in the \(y\)-axis, the gradient of \(\ln(-x)\) will be the negative of the gradient of \(\ln x\) at symmetrical points. By also looking at the sketch of the gradient function of \(g(x)\), it seems reasonable to conclude that \(g'(x) = \tfrac{1}{x}\), when \(x <0\).

If you already know the chain rule, you may have calculated the gradient of \(g(x)\) this way:
\[\begin{align*}
g'(x) &= \dfrac{1}{-x} \times -1 \\
&= \dfrac{1}{x}.
\end{align*}\]

What do you notice about the derivatives \(f'(x)\) and \(g'(x)\)?

Interestingly, the two functions \(f\) and \(g\), differentiate to different sections of the same function, \(\tfrac{1}{x}\). It seems that the function \(\tfrac{1}{x}\) has two different antiderivatives, depending on the domain. This means we can write the integral of \(\tfrac{1}{x}\) as a piecewise function.

The absolute value sign isn’t there to let us take logarithms of negative numbers, but because we are actually combining two different antiderivative functions. While writing \(\ln |x|\) is a way to encompass both functions, we need to be careful that we remember that it is two separate functions, one for \(x > 0\) and one for \(x < 0\).