Indefinite Integral of 1/x
The indefinite integral of the function \(f(x)=x^{-1}=\frac{1}{x}\) is the natural logarithm of the absolute value of \(x\), plus an arbitrary constant of integration. \[ \int \frac{1}{x}\,dx=\ln|x|+C \]
Here, \(\ln|x|\) is the natural logarithm of the absolute value of \(x\), and \(C\) is the constant of integration.
This formula applies whenever \(x\neq 0\), since the function \(f(x)=\frac{1}{x}\) is undefined at \(x=0\).
Why Does Integrating 1/x Give a Natural Logarithm?
To understand why the integral of \(\frac{1}{x}\) involves a natural logarithm, I'll start with a familiar differentiation rule.
Consider the function
\[ f(x)=\ln|x| \]
Its derivative is
\[ f'(x)=\frac{1}{x} \]
Since integration reverses differentiation, this tells me that \(\ln|x|\) is an antiderivative of \(\frac{1}{x}\).
Adding the arbitrary constant of integration gives
\[ \int \frac{1}{x}\,dx=\ln|x|+C \]
But why do I need the absolute value?
The reason is that \(\frac{1}{x}\) is defined for both positive and negative values of \(x\), whereas the natural logarithm \(\ln x\) is defined over the real numbers only when \(x>0\).
To see how the absolute value accounts for both cases, I'll examine them separately.
When \(x>0\), the absolute value of \(x\) is simply \(x\). Therefore,
\[ D_x[\ln|x|]=D_x[\ln x]=\frac{1}{x} \]
When \(x<0\), the absolute value of \(x\) is \(-x\). Applying the chain rule gives
\[ D_x[\ln|x|]=D_x[\ln(-x)] =\frac{1}{-x}\cdot(-1)=\frac{1}{x} \]
In both cases, differentiating \(\ln|x|\) gives \(\frac{1}{x}\).
Thus, for every \(x\neq 0\),
\[ D_x[\ln|x|]=\frac{1}{x} \]
This confirms why the absolute value appears in the integration formula. It allows the same expression to work on both sides of zero, even though the function itself is undefined at \(x=0\).
Note. The usual power rule for integration does not apply to \(\frac{1}{x}=x^{-1}\), because the exponent is \(n=-1\). If I substitute this value into the general formula \[ \int x^n\,dx=\frac{x^{n+1}}{n+1}+C \] I obtain \[
\frac{x^{-1+1}}{-1+1}=\frac{x^0}{0}=\frac{1}{0} \] The denominator is zero, so the expression is undefined. This means the power rule cannot be used when the exponent is \(-1\). Instead, I use the logarithmic integration formula: \[ \int\frac{1}{x}\,dx=\ln|x|+C \]
Worked Example
Now I'll apply the formula to a simple example.
Consider the indefinite integral
\[ \int \frac{3}{x}\,dx \]
First, I use the constant multiple rule for integration to take the constant 3 outside the integral.
\[ =3\int \frac{1}{x}\,dx \]
Next, I apply the formula for the integral of \(\frac{1}{x}\).
\[ =3\ln|x|+C \]
The final result is
\[ \int \frac{3}{x}\,dx=3\ln|x|+C \]
Checking the Result
One way to check an indefinite integral is to differentiate the result. If the derivative matches the original integrand, the integration is correct.
I'll differentiate the expression I just obtained:
\[ \frac{d}{dx}(3\ln|x|+C) \]
The derivative of the constant \(C\) is zero, while the derivative of \(\ln|x|\) is \(\frac{1}{x}\).
Therefore,
\[ =3\cdot\frac{1}{x} \]
\[ =\frac{3}{x} \]
The derivative is exactly the original integrand, \(\frac{3}{x}\). This confirms that the result is correct.
Why Doesn't the Power Rule Apply?
There is one important detail worth understanding about this integral.
The function \(\frac{1}{x}\) can also be written as a power of \(x\) with a negative exponent:
\[ \frac{1}{x}=x^{-1} \]
For most power functions, I can find the indefinite integral using the power rule for integration:
\[ \int x^n\,dx=\frac{x^{n+1}}{n+1}+C \]
However, this formula has one important restriction: it works only when \(n\neq -1\).
To understand why, I'll substitute \(n=-1\) into the formula:
\[ \frac{x^{-1+1}}{-1+1}=\frac{x^0}{0} \]
The denominator becomes zero, making the expression undefined. As a result, the power rule cannot be applied.
This is why \(\frac{1}{x}\) is a special case in integration. Unlike other power functions, its antiderivative involves the natural logarithm rather than another power of \(x\).
For \(x\neq 0\), the appropriate formula is
\[ \int \frac{1}{x}\,dx=\ln|x|+C \]
Remember that the domain excludes zero. More precisely, the constant of integration may take different values on the intervals \(x<0\) and \(x>0\), since these are separate intervals of the function's domain.
