30 min readCalculusIndefinite IntegrationDefinite Integration
Never Drop the +C: The Hidden Power of the Constant in Integration by Parts
Study Controls
Nearly every calculus textbook gives the same quiet footnote when introducing integration by parts: when integrating the second function, ignore the constant of integration +C, because it cancels out in the final answer.
That statement is mathematically true—and yet obeying it blindly throws away one of the sharpest tools in high-school calculus. Keeping +C and choosing it on purpose turns long division and partial fractions into two-line mental algebra, wipes out boundary terms in definite integrals, resolves the classic 0=1 paradox, and even lets us determine an entire unknown function from just four numbers.
Look at the three problems below. Every single one can be solved using nothing beyond standard algebra, factorisation, elementary limits, and the fact that a square is never negative:
By the end of this essay, we will crack all three—along with a whole ladder of integrals and puzzles—using one simple habit: never drop the +C.
Why the Constant Cancels, and Why That Makes It Free§
Recall the formula for integration by parts for two differentiable functions u(x) and v(x):
∫u(x)v′(x)dx=u(x)v(x)−∫u′(x)v(x)dx
Suppose that instead of taking a single antiderivative v(x) of v′(x), we keep the constant of integration and write v(x)+C, where C is any real number. Substituting v(x)+C into the right-hand side gives:
Standard u and dv notation becomes cluttered quickly. All integration by parts ever asks is: which factor should I Differentiate (D), and which factor should I Integrate (I)?
We can organize every calculation in a compact D–I table with three columns: Sign (alternating +,−,+,…), D (differentiate moving down), and I (integrate moving down):
Sign
D (differentiate)
I (integrate)
+
D(x)
I(x)
−
D′(x)
∫I(x)dx+C
To read the result from the table:
Multiply each D entry diagonally down-right with the I entry one row below, attaching that row's sign.
Multiply the final row horizontally (with its sign) and place an integral sign around it.
With one step, the table reproduces integration by parts with our free constant included:
∫D(x)I(x)dx=D(x)(∫I(x)dx+C)−∫D′(x)(∫I(x)dx+C)dx
How to Decide Which Factor Goes into D and Which Goes into I§
Before we even choose +C, a D–I table succeeds or stalls based on how we assign the two factors. As developed in detail in our Integration by Parts tutorial, a good split obeys three practical principles:
Differentiating D should simplify it. Polynomials xn drop in degree with every derivative, while functions such as lnx and arctanx lose their transcendental form altogether and turn into algebraic fractions.
I must be directly integrable using standard formulas—if we cannot integrate I in closed form, the table cannot even start.
The new horizontal product D′⋅(∫I) must be easier to integrate than the original product D⋅I.
To apply these principles quickly, students commonly use the priority mnemonic ILATE (often written LIATE, since inverse trigonometric and logarithmic functions sit at the same top priority): whichever factor appears earlier in the list is chosen as D (to differentiate), and the remaining factor becomes I (to integrate).
Priority for D
Function Family
Representative Examples
I
Inverse trigonometric
arcsinx,arccosx,arctanx
L
Logarithmic
lnx,ln(x+1),ln(1+ex)
A
Algebraic
xn,x,(x−1)21
T
Trigonometric
sinx,cosx,sec2x
E
Exponential
ex,e−x,ax
With our D–I setup in place, let us climb five levels—plus a bonus paradox—and see just how far +C can take us.
Throughout this article, we write arctanx for the inverse tangent function (also commonly written tan−1x). Let us start with a classic integral where setting C=0 immediately creates extra work.
Following ILATE, we differentiate arctanx (to get 1+x21) and integrate x (to get 2x2+C). With C=0, the bottom row leaves ∫2(1+x2)x2dx, forcing us to divide x2 by 1+x2.
Instead, look at the denominator in the D column: 1+x2. If we choose C=21, the I column becomes 2x2+21=2x2+1:
Sign
D
I
+
arctanx
x
−
1+x21
2x2+21=2x2+1
Read the table diagonally, then horizontally across the bottom row:
(We write +K for the final arbitrary constant of integration so it never collides with the deliberate constant C chosen inside the table.)
Notice that we were not merely getting lucky. This works because of the Factor Theorem from polynomial algebra: whenever two expressions share a root, they share a common factor that cancels out.
The textbook route takes a substitution t=x, then integration by parts, then algebraic division. Instead, write the integrand as arctanx⋅1:
Sign
D
I
+
arctanx
1
−
2x(1+x)1
x+1
Integrating 1 gives x+C. The awkward factor in the D column is 1+x, which equals zero at x=−1. Setting (−1)+C=0 gives C=1, turning the I column into x+1. Now read the table:
The root-matching rule routinely wipes out two of the slowest algebraic chores in integration: polynomial long division and partial-fraction decomposition. Better still, we never need complex numbers to handle quadratic denominators—simple substitutions and standard factorisations do all the work.
With C=0, integrating (x−1)−2 gives −x−11, leaving ∫(x+1)(x−1)dx—a partial-fraction split. Instead, keep +C and plug in the root x=−1 of the D-column denominator x+1:
−(−1)−11+C=0⟹21+C=0⟹C=−21
Combining the fractions turns the I column into −x−11−21=−2(x−1)x+1:
Sign
D
I
+
ln(x+1)
(x−1)21
−
x+11
−x−11−21=−2(x−1)x+1
Multiply across the bottom row and (x+1) cancels on contact:
Knowing when a tool works—and when it cannot—is part of owning it. Compare two closely related integrals:
∫x3arctanxdxversus∫x2arctanxdx
In both problems, the D-column denominator is x2+1=u+1, where u=x2. For u+1 to divide the I-column polynomial cleanly after adding a constant C, the I column itself must be expressible in terms of u=x2.
Integral
I column
Can it be written using u=x2?
Does a single C work?
∫x3arctanxdx
4x4+C
Yes: 4u2+C
Yes:C=−41
∫x2arctanxdx
3x3+C
No: x3=x⋅u is an odd power
No
For x3arctanx, setting u=−1 in 4u2+C=0 gives C=−41, turning the I column into 4x4−1=4(x2−1)(x2+1):
For x2arctanx, however, adding any real constant to x3 gives x3+3C, which is never divisible by x2+1 (long division of x3+3C by x2+1 always leaves remainder −x+3C=0). Here the +C shortcut cannot cancel x2+1, so we simply take C=0 and split 1+x2x3=x−1+x2x:
Once we combine mental substitutions, standard factorisations, and trigonometric identities with +C, intimidating integrals collapse in two lines.
Example 3A: Solving Hook Problem (2) — Avoiding a Cubic Partial-Fraction Monster§
Evaluate ∫(x3+1)2x2lnxdx for x>0.
Notice how we apply the strategic grouping principle from our D–I discussion: put lnx in D and group (x3+1)2x2 together in I, because substituting w=x3+1 (dw=3x2dx) integrates it mentally to −3(x3+1)1+C.
If we set C=0, we are stuck with ∫x(x3+1)dx—a messy cubic partial-fraction problem. Instead, look at the D-column denominator: it is simply x, which equals zero at x=0. Plugging x=0 into the I column gives −31+C=0, so C=31:
Sign
D
I
+
lnx
(x3+1)2x2
−
x1
−3(x3+1)1+31=3(x3+1)x3
One factor of x cancels x1 immediately, leaving x3+1x2—an instant logarithm:
Example 3B: Think of the Exponential as the Variable§
Evaluate ∫e−xln(1+ex)dx.
Think of u=ex as the variable! Then the D-column denominator is 1+u (zero at u=−1), and the I-column antiderivative is −e−x+C=−u1+C. Setting −−11+C=0 gives 1+C=0, so C=−1:
Sign
D
I
+
ln(1+ex)
e−x
−
1+exex
−e−x−1=−e−x(1+ex)
Factoring −e−x−1=−e−x(1+ex) reveals the magic on the bottom row: (1+ex) cancels and ex⋅e−x=1, leaving ∫1dx!
Example 3C: Solving Hook Problem (1) — The Trigonometric Collapse§
Evaluate ∫cos2xln(sinx+cosx)dx on any interval where sinx+cosx>0 (for example, −4π<x<2π).
Rewrite cos2x1 as sec2x, whose antiderivative is tanx+C. With C=0, the bottom row produces ∫tanx⋅sinx+cosxcosx−sinxdx—a dead end.
Instead, ask where the D-column denominator sinx+cosx equals zero: precisely when sinx=−cosx, i.e., tanx=−1! Setting tanx+C=0 at tanx=−1 gives C=1, and tanx+1 is literally cosxsinx+cosx:
Sign
D
I
+
ln(sinx+cosx)
sec2x
−
sinx+cosxcosx−sinx
tanx+1=cosxsinx+cosx
Multiply across the bottom row: the entire sinx+cosx cancels, leaving cosxcosx−sinx=1−tanx:
Example 3D: A Trigonometric Identity Does the Factoring§
Evaluate ∫sin2xln(1+sinx)dx where 1+sinx>0.
Here the D-column denominator is 1+sinx, which equals zero when sinx=−1. Integrating sin2x gives −2cos2x+C.
What is the value of cos2x when sinx=−1? Using the double-angle identity cos2x=1−2sin2x, we get cos2x=1−2(−1)2=−1. Plugging this into the I column gives −2−1+C=21+C=0, so C=−21!
Now use cos2x=2cos2x−1 to rewrite the I column:
−2cos2x−21=−21+cos2x=−cos2x
Sign
D
I
+
ln(1+sinx)
sin2x
−
1+sinxcosx
−2cos2x−21=−cos2x
Since cos2x=1−sin2x=(1−sinx)(1+sinx), the denominator 1+sinx cancels completely, leaving cosx(1−sinx)—an immediate substitution (u=sinx, du=cosxdx):
Write the integrand as ln2(1+x)⋅1. Differentiating ln2(1+x) produces the denominator 1+x (root x=−1). If we integrate 1 with C=0, we get stuck with ∫1+x2xln(1+x)dx. Instead, choose C=1 so the I column becomes x+1:
Sign
D
I
+
ln2(1+x)
1
−
1+x2ln(1+x)
x+1
The factor (1+x) cancels on contact, leaving a simpler logarithm integral:
∫ln2(1+x)dx=(1+x)ln2(1+x)−2∫ln(1+x)dx
Now apply the exact same trick to ∫ln(1+x)dx—integrate 1 as x+1 again so the 1+x1 from differentiating ln(1+x) cancels a second time:
Notice that since 2x=2(1+x)−2 and −2 can be absorbed into the arbitrary constant K, writing L=ln(1+x) tidies the answer into (1+x)(L2−2L+2)+K. (Try ∫ln3(1+x)dx using the same step-by-step +1: you will get (1+x)(L3−3L2+6L−6)+K!)
Level 4: Definite Integrals Where C Kills the Boundary Too§
In a definite integral ∫abD(x)I(x)dx, the diagonal term becomes a boundary evaluation [D(x)⋅(∫I(x)dx+C)]ab. Choosing +C wisely can do double duty: not only does it cancel the denominator inside the remaining integral, it can also make the boundary term vanish at the endpoints—or even save an integral that otherwise blows up.
Example 4B: Sum of Cubes Plus Vanishing Boundaries§
Evaluate ∫01x2ln(x2−x+1)dx.
Just like Example 2D, the denominator x2−x+1 has no real roots, but it is half of the sum-of-cubes identity:
x3+1=(x+1)(x2−x+1)
Choose C=31 so the I column becomes 3x3+1:
Sign
D
I
+
ln(x2−x+1)
x2
−
x2−x+12x−1
3x3+31=3(x+1)(x2−x+1)
Check the boundary term at both limits: at x=0, x2−x+1=1, so ln1=0; at x=1, x2−x+1=1, so ln1=0 again! The boundary term vanishes completely, leaving only a polynomial:
Because ln(1−x)→−∞ as x→1−, this definite integral is understood as the limit limb→1−∫0bln(1−x)dx. Watch what happens if we integrate by parts with C=0:
Now apply root matching at x=1: integrate 1 as x+C and pick C=−1 so the I column vanishes at x=1:
Sign
D
I
+
ln(1−x)
1
−
x−11
x−1
As x→1−, set t=1−x→0+. By L'Hôpital's Rule, (x−1)ln(1−x)=−tlnt=−1/tlnt→0. Visually, compare the boundary curves y=(x+C)ln(1−x) on [0,1): for C=0 and C=−21, the graph plunges to −∞ along x=1, whereas C=−1 seals the asymptote cleanly at (1,0)!
Both endpoints of the boundary term vanish, and (x−1) cancels x−11:
For any non-negative integer n, evaluate ∫01xnln(1−x)dx.
Using the exact same root x=1, integrate xn to get n+1xn+1+C and choose C=−n+11:
Sign
D
I
+
ln(1−x)
xn
−
x−11
n+1xn+1−1
At x=0, ln1=0. As x→1−, (xn+1−1)ln(1−x)=(1+x+⋯+xn)(x−1)ln(1−x)→(n+1)⋅0=0. Both boundary endpoints vanish, and dividing xn+1−1 by x−1 leaves the geometric sum 1+x+⋯+xn:
In Levels 1 through 4, +C reacted to a denominator or boundary blow-up already visible in the integrand. In Level 5, there is no denominator at all—we spend +C proactively to make the algebra close into a perfect square.
Example 5A: Solving Hook Problem (3) — Find a Function from Four Numbers§
At first glance, this looks impossible: infinitely many curves start at (0,0), end at (1,0), and enclose an area of 1. How can one extra number pin down a single curve?
Integrate ∫01f(x)⋅1dx by parts, choosing C=−21 (the midpoint of [0,1]):
Sign
D
I
+
f(x)
1
−
f′(x)
x−21
Because f(0)=f(1)=0, the boundary term [f(x)(x−21)]01 vanishes immediately! That gives us one clean identity:
∫01f′(x)(x−21)dx=−∫01f(x)dx=−1
Now use the simplest inequality in algebra: a square is never negative, so its integral can never be negative either. Consider the integral of the square (f′(x)+12(x−21))2 and expand it using the three values we know (noting ∫01(x−21)2dx=[3(x−1/2)3]01=121):
The integral of a continuous non-negative square is zero! The only way that can happen is if the quantity inside the square is zero everywhere on [0,1]:
f′(x)+12(x−21)=0⟹f′(x)=6−12x
Integrating and using f(0)=0 pins down the unique solution:
f(x)=6x−6x2=6x(1−x)
Let us check all four numbers: f(0)=0, f(1)=0, ∫016x(1−x)dx=6(21−31)=1, and ∫01(6−12x)2dx=∫01(36−144x+144x2)dx=36−72+48=12. Every condition matches!
Why was the midpoint C=−21 essential? If we had used C=0, then ∫01x2dx=31 (four times larger than 121), and no square of the form (f′(x)+ax)2 can integrate to zero—leaving us empty-handed.
Now try a closely related optimisation puzzle—this time with only one endpoint fixed!
This time we know f(0)=0, but we know nothing about f(1). If we integrate ∫01f(x)⋅1dx by parts with C=0 or C=−21, the unknown number f(1) survives in the boundary term!
So we spend C to kill the boundary at the end we know nothing about: choose C=−1 so the I column becomes x−1, which equals 0 at x=1!
Sign
D
I
+
f(x)
1
−
f′(x)
x−1
Now the boundary term [f(x)(x−1)]01=f(1)⋅0−f(0)⋅(−1)=0 vanishes at both ends! That gives:
A=∫01f(x)dx=−∫01f′(x)(x−1)dx=∫01f′(x)(1−x)dx
Now bring back the square trick, this time with a free real number k. For everyk∈R, since ∫01(1−x)2dx=31:
0≤∫01(f′(x)−k(1−x))2dx=1∫01(f′(x))2dx−2kA∫01f′(x)(1−x)dx+k21/3∫01(1−x)2dx31k2−2Ak+1≥0for all k∈R
A quadratic in k that never dips below zero must have discriminant Δ≤0:
(−2A)2−4(31)(1)≤0⟹4A2≤34⟹A≤31
Equality (A=31) holds if and only if the quadratic has a double root k=2/32A=3A=3, forcing the square inside the integral to vanish identically:
f′(x)=3(1−x)⟹f(x)=3(x−2x2)
Check: f(0)=0, ∫01(f′(x))2dx=3∫01(1−x)2dx=1, and ∫01f(x)dx=3(21−61)=31≈0.577.
Look at the contrast between our two puzzles: in Example 5A, C=−21 was chosen to make the algebra close into an exact square; in Example 5B, C=−1 was forced by the endpoint where f(1) was unknown.
Before we finish, let us see what happens when we forget +C in the most elementary integral of all: ∫x1dx.
Set D=x1 and I=1:
Sign
D
I
+
x1
1
−
−x21
x
Reading the table produces:
∫x1dx=x1⋅x−∫(−x21)xdx=1+∫x1dx
Subtract ∫x1dx from both sides, and you appear to prove 0=1!
There is no algebraic mistake anywhere. The catch is what the indefinite integral symbol actually means: ∫x1dx is not a single function, but an entire family of functions differing by an arbitrary constant. The left-hand side stands for ln∣x∣+C1, while the right-hand side stands for 1+ln∣x∣+C2. Setting them equal simply says C1=C2+1—completely true! The extra "1" is swallowed by the constant of integration.
If you run the same step as a definite integral on any interval [a,b] (not containing 0), the diagonal boundary term is [1]ab=1−1=0, and the paradox disappears instantly.
Make the I column zero where the D-column denominator is zero
∫(x−1)2ln(x+1)dx with zero partial fractions
2. Spot the factorisation
No real root? Aim for a2−b2, a3±b3, or a trig identity
∫x2ln(x2+x+1)dx via x3−1
3. Substitute mentally
View u=x2 or u=ex as the variable to test whether one C works
∫e−xln(1+ex)dx collapses to ∫1dx
4. Kill the boundary too
In definite integrals, let C vanish at an endpoint or tame an asymptote
∫01xln(1+x)dx=41 and ∫01ln(1−x)dx=−1
5. Close the algebra
Spend C to cancel an unknown endpoint or complete a zero-integral square
f(x)=6x(1−x) and max area 31
The textbook says +C cancels, so you may ignore it. It does cancel—and that is precisely why it is free. In mathematics, free parameters are meant to be spent.