Integral of 1/x: Recognize the Logarithmic Antiderivative Away From Zero

By Vegard Gjerde Based on Masterful Learning 9 min read
integral-of-1-over-x calculus integrals math learning-strategies

Integral of 1/x replaces 1xdx\int \frac{1}{x}\,dx with lnx+C\ln\left|x\right| + C, preserving the antiderivative family on intervals that stay away from zero. It applies where x0x \neq 0; in practice, that means you should not present one real antiderivative statement as covering a domain that passes through the undefined point. That move-selection habit is exactly what the Unisium Study System trains.

Unisium hero image titled Integral of 1/x showing the principle equation and a conditions card.
The integral of 1x\frac{1}{x} relation 1xdx=lnx+C\int \frac{1}{x}\,dx = \ln\left|x\right| + C with the condition x0x \neq 0.

On this page: The Principle | Conditions | Failure Modes | EE Questions | Retrieval Practice | Practice Ground | Solve a Problem | Related Principles | FAQ | How This Fits


The Principle

The move: Replace 1xdx\int \frac{1}{x}\,dx with lnx+C\ln\left|x\right| + C.

The invariant: This preserves the antiderivative family on any interval where the original integrand stays defined.

Pattern: 1xdxlnx+C\int \frac{1}{x}\,dx \quad\longrightarrow\quad \ln\left|x\right| + C

Legal ✓Illegal ✗
On (0,)(0,\infty), $\int 1/x,dx \to \lnx

The left-hand move is legal because the interval stays away from 00, so 1x\frac{1}{x} has a real antiderivative there. The right-hand move is an applicability failure, not a syntax failure: the pattern looks right, but an interval crossing 00 breaks the condition because the integrand is undefined at that point.


Conditions of Applicability

Condition: x0x \neq 0

Before applying, check: are you working on an interval that stays entirely on one side of 00, so the integrand really is 1x\frac{1}{x} throughout the step?

If the condition is violated: there is no single real antiderivative across that interval, so writing lnx+C\ln\left|x\right| + C as though nothing happened hides a domain break.

  • The condition is a domain guard. It tells you the reciprocal function is defined at the points where you are claiming an antiderivative.
  • The absolute value in lnx\ln\left|x\right| matters because the valid antiderivative family must cover both positive and negative intervals separately.
  • If the domain you are using passes through 00, do not present the result as one real antiderivative statement across that whole domain. The pattern alone does not license the move.

See indefinite integral as antiderivative for the object this rule preserves, compare the nearby integral power rule to see why n=1n=-1 is the exceptional exponent, and connect the output to the inverse-direction derivative of ln(x).

Want the complete framework behind this guide? Read Masterful Learning.


Common Failure Modes

Failure mode: treat x1dx\int x^{-1}\,dx as though it came from the usual power rule family or ignore the interval crossing 00 → you either miss the logarithm or claim one antiderivative across a domain break.

Debug: ask two questions before integrating: “Is the exponent really 1-1?” and “Am I staying on an interval where x0x \neq 0 the whole time?”


Elaborative Encoding

Use these questions to build deep understanding. (See Elaborative Encoding for the full method.)

Within the Principle

  • Why is xndx\int x^n\,dx usually another power, but the exponent n=1n=-1 produces a logarithm instead?
  • What does the condition x0x \neq 0 protect here: the algebraic pattern match, the existence of the integrand, or both?

For the Principle

  • When you see 1x\frac{1}{x} inside a longer integrand, what quick check tells you whether the logarithmic antiderivative is available immediately?
  • Why does lnx\ln\left|x\right| keep the antiderivative valid on both positive and negative intervals, even though ln(x)\ln(x) alone does not?

Between Principles

  • How does this rule differ from the integral power rule, and why is n=1n=-1 the one place where the usual power antiderivative fails?

Generate an Example

  • Build a reciprocal-looking integral where the shape suggests this rule, but the stated interval makes the move invalid. What part of the condition failed?

Retrieval Practice

Answer from memory, then click to reveal and check. (See Retrieval Practice for the full method.)

State the move in one sentence: _____Replace the integral of 1/x with ln|x| + C on intervals where x is not 0.
Write the canonical equation: _____1xdx=lnx+C\int \frac{1}{x}\,dx = \ln\left|x\right| + C
State the canonical condition: _____x0x \neq 0

Practice Ground

Use these exercises to build move-selection fluency. (See Self-Explanation for how to use worked examples effectively.)

Procedure Walkthrough

Starting from (1x+3x2)dx\int \left(\frac{1}{x} + 3x^2\right)\,dx, find an antiderivative on (0,)(0,\infty).

StepExpressionOperation
0(1/x+3x2)dx\int (1/x + 3x^2)\,dx
11/xdx+3x2dx\int 1/x\,dx + \int 3x^2\,dxIntegral sum rule on the interval (0,)(0,\infty), where both component integrals exist
2$\lnx
3$\lnx
4$\lnx

Drills

Forward step (Format A)

Apply the principle once. Assume you are working on (0,)(0,\infty).

1xdx\int \frac{1}{x}\,dx

Reveal

1xdx=lnx+C\int \frac{1}{x}\,dx = \ln\left|x\right| + C

The condition holds on (0,)(0,\infty) because xx never reaches 00 there.


Apply the principle once inside the larger integral. Assume you are working on an interval where x<0x<0.

(1x+4)dx\int \left(\frac{1}{x} + 4\right)\,dx

Reveal

Split or identify the reciprocal term, then apply the rule to that term:

(1x+4)dx=lnx+4x+C\int \left(\frac{1}{x} + 4\right)\,dx = \ln\left|x\right| + 4x + C

The condition still holds because the interval stays away from 00 even on the negative side.


Apply the principle after rewriting the integrand in reciprocal form. Assume you are working on a domain where x0x \neq 0.

x1dx\int x^{-1}\,dx

Reveal

Since x1=1xx^{-1} = \frac{1}{x}, this is the same canonical pattern:

x1dx=lnx+C\int x^{-1}\,dx = \ln\left|x\right| + C


[Negative] On the interval [2,3][-2,3], should you apply the rule directly to this indefinite integral?

1xdx\int \frac{1}{x}\,dx

Reveal

No. The interval crosses 00, so the condition x0x \neq 0 fails somewhere in the claimed domain. This is the central near-miss for the rule: the local shape is correct, but the interval makes the move unavailable as one real antiderivative statement.


Integrate this expression on (0,)(0,\infty).

(1x+x2)dx\int \left(\frac{1}{x} + x^2\right)\,dx

Reveal

(1x+x2)dx=lnx+x33+C\int \left(\frac{1}{x} + x^2\right)\,dx = \ln\left|x\right| + \frac{x^3}{3} + C

The reciprocal term uses the logarithmic antiderivative, and the polynomial term uses the power rule.


Action label (Format B)

What was done between these two states? Assume you are working on a domain where x0x \neq 0.

1xdxlnx+C\int \frac{1}{x}\,dx \quad\longrightarrow\quad \ln\left|x\right| + C

Reveal

The integral of 1/x1/x rule was applied: the reciprocal integrand was replaced by its logarithmic antiderivative.


What was done between these two states on (0,)(0,\infty)?

(1x+7x)dxlnx+7xdx\int \left(\frac{1}{x} + 7x\right)\,dx \quad\longrightarrow\quad \ln\left|x\right| + \int 7x\,dx

Reveal

The reciprocal term was integrated using the integral of 1/x1/x rule, while the remaining term was left for a later step.


[Negative] A student writes the following step. What is the correct action label for what went wrong?

x1dxx00+C\int x^{-1}\,dx \quad\longrightarrow\quad \frac{x^0}{0} + C

Reveal

The student misapplied the integral power rule at the exceptional exponent n=1n=-1. The correct move is to switch to the logarithmic antiderivative:

x1dx=lnx+C\int x^{-1}\,dx = \ln\left|x\right| + C

The tempting move is invalid because the power-rule denominator would be n+1=0n+1 = 0.


Transition identification (Format C)

Which transitions use the integral of 1/x1/x rule on the interval (0,)(0,\infty)?

TransitionFromTo
0→1(1/x+2x)dx\int (1/x + 2x)\,dx1/xdx+2xdx\int 1/x\,dx + \int 2x\,dx
1→21/xdx+2xdx\int 1/x\,dx + \int 2x\,dx$\ln
2→3$\ln\leftx\right
Reveal

Only transition 1→2 uses the integral of 1/x1/x rule.

  • 0→1 is the integral sum rule.
  • 1→2 is the logarithmic antiderivative step for 1x\frac{1}{x}.
  • 2→3 evaluates the remaining power integral.

Which of these proposed applications are eligible?

  1. On (2,)(2,\infty): 1xdxlnx+C\int \frac{1}{x}\,dx \to \ln\left|x\right| + C
  2. On (,3)(-\infty,-3): 1xdxlnx+C\int \frac{1}{x}\,dx \to \ln\left|x\right| + C
  3. On (1,1)(-1,1): 1xdxlnx+C\int \frac{1}{x}\,dx \to \ln\left|x\right| + C
Reveal

Eligible applications: 1 and 2.

  • 1 is valid because the interval stays positive and never hits 00.
  • 2 is valid because the interval stays negative and never hits 00.
  • 3 is invalid because the interval crosses 00, so the condition fails on the stated domain.

Goal micro-chain (Format D)

Starting from (1x+5x4)dx\int \left(\frac{1}{x} + 5x^4\right)\,dx, reach a finished antiderivative on (0,)(0,\infty) in the minimum number of moves.

Reveal

One efficient chain is:

  1. (1x+5x4)dx1xdx+5x4dx\int \left(\frac{1}{x} + 5x^4\right)\,dx \to \int \frac{1}{x}\,dx + \int 5x^4\,dx
  2. lnx+5x4dx\to \ln\left|x\right| + 5\int x^4\,dx
  3. lnx+x5+C\to \ln\left|x\right| + x^5 + C

The first move is the integral sum rule, the second uses both the integral of 1/x1/x rule and the constant multiple rule, and the last evaluates the power integral.


Solve a Problem

Apply what you’ve learned with Problem Solving.

Problem: Starting from (1x+2x31)dx\int \left(\frac{1}{x} + 2x^3 - 1\right)\,dx, find an antiderivative on (0,)(0,\infty).

Full solution
StepExpressionMove
0(1/x+2x31)dx\int (1/x + 2x^3 - 1)\,dx
11/xdx+2x3dx1dx\int 1/x\,dx + \int 2x^3\,dx - \int 1\,dxIntegral sum rule, valid on (0,)(0,\infty) because all three component integrals exist there
2$\ln\leftx\right
3$\lnx
4$\lnx

PrincipleRelationship
Indefinite integral as antiderivativeExplains what it means for $\ln\left
Integral power ruleShows the neighboring rule that works for xnx^n except at the exceptional exponent n=1n=-1
Derivative of ln(x)Runs the inverse direction: differentiating the logarithm returns the reciprocal on its real domain

FAQ

What is the integral of 1/x1/x?

The antiderivative is lnx+C\ln\left|x\right| + C. The absolute value matters because the reciprocal function has separate positive and negative intervals, and the logarithm has to match both of them.

Why is the answer not just ln(x)+C\ln(x) + C?

ln(x)\ln(x) only works on the positive side of the real line. The antiderivative for 1x\frac{1}{x} uses lnx\ln\left|x\right| so the same formula differentiates back to 1x\frac{1}{x} on any interval where x0x \neq 0.

When is the rule valid?

It is valid where x0x \neq 0. In practice, that means you should not use one real antiderivative statement across a domain that passes through 00.

Why can’t I use the usual power rule on x1x^{-1}?

Because the power-rule denominator would become n+1=0n+1 = 0. That is exactly why x1x^{-1} is the exceptional exponent that switches to a logarithm instead of another power.

What is the most common near-miss?

Treating the pattern as valid on an interval such as [1,1][-1,1] just because the integrand looks like 1x\frac{1}{x}. The shape is right, but the domain crosses 00, so the rule is not available there as one real antiderivative statement.


How This Fits in Unisium

In Unisium, the integral of 1/x1/x rule sits at a useful boundary: it looks like a simple reciprocal pattern, but it forces you to slow down and check the interval before executing. That makes it a strong test of move selection rather than raw execution. The guide pairs naturally with retrieval practice, self-explanation, and the broader principle structures view so the logarithmic exception becomes easy to recognize under pressure.

Explore further:

Ready to make this exception automatic? Start practicing with Unisium or explore the full learning framework in Masterful Learning.

Masterful Learning book cover

Masterful Learning

The study system for physics, math, & programming that works: retrieval, connection, explanation, problem solving, and more.

Read the book (opens in new tab) ISBN 979-8-2652-9642-9

Ready to apply this strategy?

Join Unisium and start implementing these evidence-based learning techniques.

Start Learning with Unisium Read More Guides

Want the complete framework? This guide is from Masterful Learning.

Learn about the book →