Why the Domain Matters
An antiderivative is a function whose derivative equals a given function. When working on one interval, the familiar rule is that antiderivatives differ by a constant. But the rule depends on the domain: if it consists of separate intervals, there is no requirement that the constants on those intervals agree.
The function \(1/x\) makes this issue clear. It is defined for every real number except \(0\), so its domain has a negative interval and a positive interval separated by a gap. Differentiation tests values locally; it does not compare the values of a function across a point where the function is not defined.
Antiderivatives on an Open Domain
We will consider open subsets of the real line that are unions of disjoint open intervals. These intervals are the components of the domain: each is a maximal interval contained in the domain. For example, the domain \(\mathbb{R}\setminus\{0\}\) has the two components \((-\infty,0)\) and \((0,\infty)\).
This definition asks for the derivative equality at every point in the domain. It does not impose a condition at points outside the domain. In particular, if a point lies in a gap between two components, the definition does not require \(F\) to be defined there or to match across it.
Why Constants Are Independent
Suppose \(F\) and \(G\) are both antiderivatives of the same function \(f\) on an interval \(I\). Their difference \(H=G-F\) has derivative \(H'(x)=G'(x)-F'(x)=f(x)-f(x)=0\). By the Mean Value Theorem, a differentiable function with zero derivative throughout an interval is constant there: for any \(a,b\in I\), the theorem gives a point \(c\) between them such that \(H(b)-H(a)=H'(c)(b-a)=0\). Thus \(H(a)=H(b)\).
This argument compares any two points in the same interval. If the domain has two separate components, there is no interval inside the domain joining a point in one component to a point in the other. The argument therefore establishes a constant on each component, but does not establish that those constants are equal.
To see the converse, take \(x\in I_j\). The constant \(C_j\) does not vary with \(x\) within that interval, so \((F_j(x)+C_j)'=F_j'(x)=f(x)\). This holds at every point of every component. The theorem makes no claim that an antiderivative exists when there is no antiderivative on some component; it describes the full family once one antiderivative has been found on each component.
Worked Example: The Full Family for One Over \(x\)
Worked Example: The Full Family for One Over \(x\)
Find all antiderivatives of \(f(x)=1/x\) on \(D=\mathbb{R}\setminus\{0\}\).
The domain has two components: \(I_-=(-\infty,0)\) and \(I_+=(0,\infty)\). On both, \(\ln|x|\) is defined. Its derivative is \(1/x\), because the derivative of \(\ln|x|\) is \((1/|x|)\) times the derivative of \(|x|\), which is \(\operatorname{sgn}(x)\); hence \(\operatorname{sgn}(x)/|x|=1/x\) for \(x\ne0\).
Choose a constant \(C_-\) on the negative interval and a constant \(C_+\) on the positive interval. The full family is
Check the derivative on each component. If \(x<0\), then \(F'(x)=(\ln|x|)' + (C_-)'=1/x+0=1/x\). If \(x>0\), then \(F'(x)=(\ln|x|)' + (C_+)'=1/x+0=1/x\). Thus the derivative equals \(f\) at every point of \(D\). There is no condition requiring \(C_-=C_+\), because \(0\) is not in the domain.
The notation \(\ln|x|+C\) is often used when the domain is understood to lie within one interval not containing zero. On the entire domain \(\mathbb{R}\setminus\{0\}\), writing only one \(C\) gives a particular subset of the antiderivatives: those for which the constants on both components happen to match.
Worked Example: A Polynomial on Two Components
Worked Example: A Polynomial on Two Components
Find all antiderivatives of \(f(x)=3x^2-4x\) on \(D=(-\infty,-1)\cup(1,\infty)\).
First find an antiderivative formula on either interval. Since \((x^3)'=3x^2\) and \((-2x^2)'=-4x\), a base antiderivative is \(F_0(x)=x^3-2x^2\). The domain has two components, so use separate constants:
For \(x<-1\), differentiating gives \(3x^2-4x+0=3x^2-4x\). For \(x>1\), differentiating gives the same result, \(3x^2-4x+0=3x^2-4x\). Therefore the displayed formula is an antiderivative throughout \(D\), with no requirement that \(C_1\) equal \(C_2\). The omitted interval \([-1,1]\) supplies no derivative condition connecting the two pieces.
Worked Example: Three Separate Constants
Worked Example: Three Separate Constants
Find all antiderivatives of \(f(x)=2x\) on \(D=\mathbb{R}\setminus\{0,2\}\).
The three components are \((-\infty,0)\), \((0,2)\), and \((2,\infty)\). A base antiderivative on each is \(x^2\), since \((x^2)'=2x\). Assign constants \(C_1,C_2,C_3\) to the three components:
On the first component, \(F'(x)=2x+0=2x\). On the second component, \(F'(x)=2x+0=2x\). On the third component, \(F'(x)=2x+0=2x\). Hence the derivative check succeeds at every point of the domain. The excluded points \(0\) and \(2\) separate three components, so each can carry its own constant.
A Common Mistake: Using Only One Constant
A frequent error is to assume that the familiar \(+C\) always means one constant for the entire domain, even when the domain has multiple components. For \(1/x\), this leads to the claim that every antiderivative on \(\mathbb{R}\setminus\{0\}\) must be \(\ln|x|+C\). That claim misses valid functions.
On the negative component, \(F'(x)=1/x\); on the positive component, \(F'(x)=1/x+0=1/x\). So this is an antiderivative on the full domain. It cannot be written as \(\ln|x|+C\) with one constant \(C\): the negative component would require \(C=0\), while the positive component would require \(C=4\). The correction is to use a separate constant for each component.
How to Find the Full Family
When a domain has gaps, a careful method prevents constants from being lost. First identify the interval components, then find one antiderivative on each, and finally add one independent constant to each formula. The derivative check is performed within each component.
Find the maximal intervals contained in the domain. Points excluded from the domain can separate otherwise adjacent intervals.
Use the relevant basic antiderivative formula on that interval.
Do not equate constants unless an additional condition explicitly relates the values on different components.
Differentiate each piece on its own interval and verify that the result is the original function there.
Why This Matters
Knowing the domain is part of knowing the antiderivative problem. A derivative condition controls how a function changes within each interval where it is defined. It does not, by itself, control the difference between values on disconnected pieces. Therefore, the statement “antiderivatives differ by a constant” must be interpreted on an interval; on a domain with multiple interval components, the constant can vary from one component to another.
This distinction matters when describing a complete answer. One formula with one constant may give valid antiderivatives, but it need not give all of them. A full family must include every independent choice allowed by the domain, and each proposed choice can be checked by differentiating component by component.
Check Your Understanding
For each question, pay attention to the domain as well as the derivative.
- How many independent constants are needed to describe antiderivatives on \(\mathbb{R}\setminus\{0\}\)?
- Why does a function with zero derivative have one constant value on an interval?
- Write the full family of antiderivatives of \(2x\) on \((-\infty,1)\cup(1,\infty)\).
- Does the derivative condition for \(1/x\) on \(\mathbb{R}\setminus\{0\}\) require the negative-side and positive-side constants to match? Explain.
- What derivative check should be performed when a domain has three interval components?