← Back to Journal
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+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+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=10 = 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:

(1)∫ln⁡(sin⁡x+cos⁡x)cos⁡2x dx(2)∫x2ln⁡x(x3+1)2 dx\text{(1)}\quad \int \frac{\ln(\sin x + \cos x)}{\cos^2 x}\,dx \qquad\qquad \text{(2)}\quad \int \frac{x^2\ln x}{(x^3 + 1)^2}\,dx (3)f(0)=f(1)=0,∫01f(x) dx=1,∫01(f′(x))2 dx=12⟹f(x)=  ?\text{(3)}\quad f(0) = f(1) = 0,\quad \int_0^1 f(x)\,dx = 1,\quad \int_0^1 \big(f'(x)\big)^2\,dx = 12 \quad\Longrightarrow\quad f(x) = \;?

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+C.


Why the Constant Cancels, and Why That Makes It Free§

Recall the formula for integration by parts for two differentiable functions u(x)u(x) and v(x)v(x):

∫u(x) v′(x) dx=u(x) v(x)−∫u′(x) v(x) dx\int u(x)\,v'(x)\,dx = u(x)\,v(x) - \int u'(x)\,v(x)\,dx

Suppose that instead of taking a single antiderivative v(x)v(x) of v′(x)v'(x), we keep the constant of integration and write v(x)+Cv(x) + C, where CC is any real number. Substituting v(x)+Cv(x) + C into the right-hand side gives:

u(x)(v(x)+C)−∫u′(x)(v(x)+C) dx=u(x)v(x)+C u(x)−∫u′(x)v(x) dx−C∫u′(x) dxu(x)\big(v(x) + C\big) - \int u'(x)\big(v(x) + C\big)\,dx = u(x)v(x) + C\,u(x) - \int u'(x)v(x)\,dx - C\int u'(x)\,dx

Because ∫u′(x) dx=u(x)\int u'(x)\,dx = u(x) (up to the overall final constant of integration), the extra terms +C u(x)+C\,u(x) and −C u(x)-C\,u(x) cancel identically!

A Cleaner Layout: The D–I Table§

Standard uu and dvdv notation becomes cluttered quickly. All integration by parts ever asks is: which factor should I Differentiate (DD), and which factor should I Integrate (II)?

We can organize every calculation in a compact D–I table with three columns: Sign (alternating +,−,+,…+, -, +, \dots), DD (differentiate moving down), and II (integrate moving down):

Sign D (differentiate) I (integrate)
++ D(x)D(x) I(x)I(x)
−- D′(x)D'(x) ∫I(x) dx+C\displaystyle\int I(x)\,dx + C

To read the result from the table:

  • Multiply each DD entry diagonally down-right with the II 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\int D(x)\,I(x)\,dx = D(x)\left(\int I(x)\,dx + C\right) - \int D'(x)\left(\int I(x)\,dx + C\right)dx

How to Decide Which Factor Goes into D and Which Goes into I§

Before we even choose +C+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:

  1. Differentiating DD should simplify it. Polynomials xnx^n drop in degree with every derivative, while functions such as ln⁡x\ln x and arctan⁡x\arctan x lose their transcendental form altogether and turn into algebraic fractions.
  2. II must be directly integrable using standard formulas—if we cannot integrate II in closed form, the table cannot even start.
  3. The new horizontal product D′⋅(∫I)D' \cdot \left(\int I\right) must be easier to integrate than the original product D⋅ID \cdot 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 DD (to differentiate), and the remaining factor becomes II (to integrate).

Priority for DD Function Family Representative Examples
I Inverse trigonometric arcsin⁡x,  arccos⁡x,  arctan⁡x\arcsin x,\; \arccos x,\; \arctan x
L Logarithmic ln⁡x,  ln⁡(x+1),  ln⁡(1+ex)\ln x,\; \ln(x + 1),\; \ln(1 + e^x)
A Algebraic xn,  x,  1(x−1)2x^n,\; \sqrt{x},\; \frac{1}{(x - 1)^2}
T Trigonometric sin⁡x,  cos⁡x,  sec⁡2x\sin x,\; \cos x,\; \sec^2 x
E Exponential ex,  e−x,  axe^x,\; e^{-x},\; a^x

With our D–I setup in place, let us climb five levels—plus a bonus paradox—and see just how far +C+C can take us.


Level 1: The Warm-Up and the Root-Matching Rule§

Throughout this article, we write arctan⁡x\arctan x for the inverse tangent function (also commonly written tan⁡−1x\tan^{-1} x). Let us start with a classic integral where setting C=0C = 0 immediately creates extra work.

Example 1A: Cancelling a Quadratic Denominator§

Evaluate ∫xarctan⁡x dx\displaystyle\int x\arctan x\,dx.

Following ILATE, we differentiate arctan⁡x\arctan x (to get 11+x2\frac{1}{1 + x^2}) and integrate xx (to get x22+C\frac{x^2}{2} + C). With C=0C = 0, the bottom row leaves ∫x22(1+x2) dx\int \frac{x^2}{2(1 + x^2)}\,dx, forcing us to divide x2x^2 by 1+x21 + x^2.

Instead, look at the denominator in the DD column: 1+x21 + x^2. If we choose C=12C = \frac{1}{2}, the II column becomes x22+12=x2+12\frac{x^2}{2} + \frac{1}{2} = \frac{x^2 + 1}{2}:

Sign D I
++ arctan⁡x\arctan x xx
−- 11+x2\dfrac{1}{1 + x^2} x22+12=x2+12\dfrac{x^2}{2} + \dfrac{1}{2} = \dfrac{x^2 + 1}{2}

Read the table diagonally, then horizontally across the bottom row:

∫xarctan⁡x dx=x2+12arctan⁡x−∫11+x2⋅x2+12 dx=x2+12arctan⁡x−x2+K\int x\arctan x\,dx = \frac{x^2 + 1}{2}\arctan x - \int \frac{1}{\cancel{1 + x^2}} \cdot \frac{\cancel{x^2 + 1}}{2}\,dx = \frac{x^2 + 1}{2}\arctan x - \frac{x}{2} + K

(We write +K+K for the final arbitrary constant of integration so it never collides with the deliberate constant CC 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.

Example 1B: Even Integrating 1 Comes with a +C§

Evaluate ∫arctan⁡x dx\displaystyle\int \arctan\sqrt{x}\,dx for x>0x > 0.

The textbook route takes a substitution t=xt = \sqrt{x}, then integration by parts, then algebraic division. Instead, write the integrand as arctan⁡x⋅1\arctan\sqrt{x} \cdot 1:

Sign D I
++ arctan⁡x\arctan\sqrt{x} 11
−- 12x (1+x)\dfrac{1}{2\sqrt{x}\,(1 + x)} x+1x + 1

Integrating 11 gives x+Cx + C. The awkward factor in the DD column is 1+x1 + x, which equals zero at x=−1x = -1. Setting (−1)+C=0(-1) + C = 0 gives C=1C = 1, turning the II column into x+1x + 1. Now read the table:

∫arctan⁡x dx=(x+1)arctan⁡x−∫x+12x (1+x) dx=(x+1)arctan⁡x−x+K\int \arctan\sqrt{x}\,dx = (x + 1)\arctan\sqrt{x} - \int \frac{\cancel{x + 1}}{2\sqrt{x}\,\cancel{(1 + x)}}\,dx = (x + 1)\arctan\sqrt{x} - \sqrt{x} + K

Even the simplest possible II column—the number 11—comes with a free constant waiting to be spent.


Level 2: No Long Division, No Partial Fractions§

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.

Example 2A: Real Root, Zero Long Division§

Evaluate ∫x2ln⁡(x−1) dx\displaystyle\int x^2\ln(x - 1)\,dx for x>1x > 1.

Differentiating ln⁡(x−1)\ln(x - 1) introduces the denominator x−1x - 1, which is zero at x=1x = 1. Integrating x2x^2 gives x33+C\frac{x^3}{3} + C. Plugging in x=1x = 1 gives 13+C=0\frac{1}{3} + C = 0, so C=−13C = -\frac{1}{3}:

Sign D I
++ ln⁡(x−1)\ln(x - 1) x2x^2
−- 1x−1\dfrac{1}{x - 1} x33−13=x3−13\dfrac{x^3}{3} - \dfrac{1}{3} = \dfrac{x^3 - 1}{3}

Using the difference-of-cubes factorisation x3−1=(x−1)(x2+x+1)x^3 - 1 = (x - 1)(x^2 + x + 1), the factor x−1x - 1 cancels immediately:

∫x2ln⁡(x−1) dx=x3−13ln⁡(x−1)−13∫(x2+x+1) dx=x3−13ln⁡(x−1)−x39−x26−x3+K\int x^2\ln(x - 1)\,dx = \frac{x^3 - 1}{3}\ln(x - 1) - \frac{1}{3}\int (x^2 + x + 1)\,dx = \frac{x^3 - 1}{3}\ln(x - 1) - \frac{x^3}{9} - \frac{x^2}{6} - \frac{x}{3} + K

Example 2B: Think of a Power as the Variable§

Evaluate ∫x5arctan⁡x dx\displaystyle\int x^5\arctan x\,dx.

The denominator x2+1x^2 + 1 has no real root in xx—so instead of thinking in xx, think of u=x2u = x^2 as the variable!

In terms of uu:

  • The DD-column denominator is u+1u + 1, which equals zero at u=−1u = -1.
  • The II column is x66+C=u36+C\frac{x^6}{6} + C = \frac{u^3}{6} + C.

At u=−1u = -1, we need (−1)36+C=0\frac{(-1)^3}{6} + C = 0, which gives C=16C = \frac{1}{6}:

Sign D I
++ arctan⁡x\arctan x x5x^5
−- 1x2+1\dfrac{1}{x^2 + 1} x66+16=x6+16\dfrac{x^6}{6} + \dfrac{1}{6} = \dfrac{x^6 + 1}{6}

By the sum-of-cubes identity u3+1=(u+1)(u2−u+1)u^3 + 1 = (u + 1)(u^2 - u + 1), we have x6+1=(x2+1)(x4−x2+1)x^6 + 1 = (x^2 + 1)(x^4 - x^2 + 1), so x2+1x^2 + 1 divides right out:

∫x5arctan⁡x dx=x6+16arctan⁡x−16∫(x4−x2+1) dx=x6+16arctan⁡x−x530+x318−x6+K\int x^5\arctan x\,dx = \frac{x^6 + 1}{6}\arctan x - \frac{1}{6}\int (x^4 - x^2 + 1)\,dx = \frac{x^6 + 1}{6}\arctan x - \frac{x^5}{30} + \frac{x^3}{18} - \frac{x}{6} + K

Example 2C: Bypassing Partial Fractions§

Evaluate ∫ln⁡(x+1)(x−1)2 dx\displaystyle\int \frac{\ln(x + 1)}{(x - 1)^2}\,dx for x>−1x > -1, x≠1x \neq 1.

With C=0C = 0, integrating (x−1)−2(x - 1)^{-2} gives −1x−1-\frac{1}{x - 1}, leaving ∫dx(x+1)(x−1)\int \frac{dx}{(x + 1)(x - 1)}—a partial-fraction split. Instead, keep +C+C and plug in the root x=−1x = -1 of the DD-column denominator x+1x + 1:

−1(−1)−1+C=0  ⟹  12+C=0  ⟹  C=−12-\frac{1}{(-1) - 1} + C = 0 \implies \frac{1}{2} + C = 0 \implies C = -\frac{1}{2}

Combining the fractions turns the II column into −1x−1−12=−x+12(x−1)-\frac{1}{x - 1} - \frac{1}{2} = -\frac{x + 1}{2(x - 1)}:

Sign D I
++ ln⁡(x+1)\ln(x + 1) 1(x−1)2\dfrac{1}{(x - 1)^2}
−- 1x+1\dfrac{1}{x + 1} −1x−1−12=−x+12(x−1)-\dfrac{1}{x - 1} - \dfrac{1}{2} = -\dfrac{x + 1}{2(x - 1)}

Multiply across the bottom row and (x+1)(x + 1) cancels on contact:

∫ln⁡(x+1)(x−1)2 dx=−x+12(x−1)ln⁡(x+1)+12∫dxx−1=−x+12(x−1)ln⁡(x+1)+12ln⁡∣x−1∣+K\int \frac{\ln(x + 1)}{(x - 1)^2}\,dx = -\frac{x + 1}{2(x - 1)}\ln(x + 1) + \frac{1}{2}\int \frac{dx}{x - 1} = -\frac{x + 1}{2(x - 1)}\ln(x + 1) + \frac{1}{2}\ln|x - 1| + K

Example 2D: Spotting the Factorisation When There Are No Real Roots§

Evaluate ∫x2ln⁡(x2+x+1) dx\displaystyle\int x^2\ln(x^2 + x + 1)\,dx.

Here the DD-column denominator is x2+x+1x^2 + x + 1, whose discriminant is 12−4(1)(1)=−3<01^2 - 4(1)(1) = -3 < 0. It never equals zero for any real xx, so we cannot plug in a real root.

Yet the root-matching rule is really about making the II column a multiple of the denominator—and there is a famous identity hiding in plain sight:

x3−1=(x−1)(x2+x+1)x^3 - 1 = (x - 1)(x^2 + x + 1)

Since integrating x2x^2 gives x33+C\frac{x^3}{3} + C, choosing C=−13C = -\frac{1}{3} turns the II column into x3−13\frac{x^3 - 1}{3}, which carries x2+x+1x^2 + x + 1 as a built-in factor!

Sign D I
++ ln⁡(x2+x+1)\ln(x^2 + x + 1) x2x^2
−- 2x+1x2+x+1\dfrac{2x + 1}{x^2 + x + 1} x33−13=x3−13\dfrac{x^3}{3} - \dfrac{1}{3} = \dfrac{x^3 - 1}{3}

Multiplying across the bottom row cancels x2+x+1x^2 + x + 1 completely, leaving a simple quadratic polynomial (2x+1)(x−1)=2x2−x−1(2x + 1)(x - 1) = 2x^2 - x - 1:

∫x2ln⁡(x2+x+1) dx=x3−13ln⁡(x2+x+1)−13∫(2x+1)(x−1) dx\int x^2\ln(x^2 + x + 1)\,dx = \frac{x^3 - 1}{3}\ln(x^2 + x + 1) - \frac{1}{3}\int (2x + 1)(x - 1)\,dx =x3−13ln⁡(x2+x+1)−2x39+x26+x3+K= \frac{x^3 - 1}{3}\ln(x^2 + x + 1) - \frac{2x^3}{9} + \frac{x^2}{6} + \frac{x}{3} + K

Example 2E: When One Constant Is Not Enough§

Knowing when a tool works—and when it cannot—is part of owning it. Compare two closely related integrals:

∫x3arctan⁡x dxversus∫x2arctan⁡x dx\int x^3\arctan x\,dx \qquad \text{versus} \qquad \int x^2\arctan x\,dx

In both problems, the DD-column denominator is x2+1=u+1x^2 + 1 = u + 1, where u=x2u = x^2. For u+1u + 1 to divide the II-column polynomial cleanly after adding a constant CC, the II column itself must be expressible in terms of u=x2u = x^2.

Integral II column Can it be written using u=x2u = x^2? Does a single CC work?
∫x3arctan⁡x dx\int x^3\arctan x\,dx x44+C\dfrac{x^4}{4} + C Yes: u24+C\dfrac{u^2}{4} + C Yes: C=−14C = -\dfrac{1}{4}
∫x2arctan⁡x dx\int x^2\arctan x\,dx x33+C\dfrac{x^3}{3} + C No: x3=x⋅ux^3 = x \cdot u is an odd power No

For x3arctan⁡xx^3\arctan x, setting u=−1u = -1 in u24+C=0\frac{u^2}{4} + C = 0 gives C=−14C = -\frac{1}{4}, turning the II column into x4−14=(x2−1)(x2+1)4\frac{x^4 - 1}{4} = \frac{(x^2 - 1)(x^2 + 1)}{4}:

∫x3arctan⁡x dx=x4−14arctan⁡x−14∫(x2−1) dx=x4−14arctan⁡x−x312+x4+K\int x^3\arctan x\,dx = \frac{x^4 - 1}{4}\arctan x - \frac{1}{4}\int (x^2 - 1)\,dx = \frac{x^4 - 1}{4}\arctan x - \frac{x^3}{12} + \frac{x}{4} + K

For x2arctan⁡xx^2\arctan x, however, adding any real constant to x3x^3 gives x3+3Cx^3 + 3C, which is never divisible by x2+1x^2 + 1 (long division of x3+3Cx^3 + 3C by x2+1x^2 + 1 always leaves remainder −x+3C≠0-x + 3C \neq 0). Here the +C+C shortcut cannot cancel x2+1x^2 + 1, so we simply take C=0C = 0 and split x31+x2=x−x1+x2\frac{x^3}{1 + x^2} = x - \frac{x}{1 + x^2}:

∫x2arctan⁡x dx=x33arctan⁡x−13∫(x−x1+x2)dx=x33arctan⁡x−x26+16ln⁡(1+x2)+K\int x^2\arctan x\,dx = \frac{x^3}{3}\arctan x - \frac{1}{3}\int \left(x - \frac{x}{1 + x^2}\right)dx = \frac{x^3}{3}\arctan x - \frac{x^2}{6} + \frac{1}{6}\ln(1 + x^2) + K

Level 3: Five Dramatic Simplifications§

Once we combine mental substitutions, standard factorisations, and trigonometric identities with +C+C, intimidating integrals collapse in two lines.

Example 3A: Solving Hook Problem (2) — Avoiding a Cubic Partial-Fraction Monster§

Evaluate ∫x2ln⁡x(x3+1)2 dx\displaystyle\int \frac{x^2\ln x}{(x^3 + 1)^2}\,dx for x>0x > 0.

Notice how we apply the strategic grouping principle from our D–I discussion: put ln⁡x\ln x in DD and group x2(x3+1)2\frac{x^2}{(x^3 + 1)^2} together in II, because substituting w=x3+1w = x^3 + 1 (dw=3x2 dxdw = 3x^2\,dx) integrates it mentally to −13(x3+1)+C-\frac{1}{3(x^3 + 1)} + C.

If we set C=0C = 0, we are stuck with ∫dxx(x3+1)\int \frac{dx}{x(x^3 + 1)}—a messy cubic partial-fraction problem. Instead, look at the DD-column denominator: it is simply xx, which equals zero at x=0x = 0. Plugging x=0x = 0 into the II column gives −13+C=0-\frac{1}{3} + C = 0, so C=13C = \frac{1}{3}:

Sign D I
++ ln⁡x\ln x x2(x3+1)2\dfrac{x^2}{(x^3 + 1)^2}
−- 1x\dfrac{1}{x} −13(x3+1)+13=x33(x3+1)-\dfrac{1}{3(x^3 + 1)} + \dfrac{1}{3} = \dfrac{x^3}{3(x^3 + 1)}

One factor of xx cancels 1x\frac{1}{x} immediately, leaving x2x3+1\frac{x^2}{x^3 + 1}—an instant logarithm:

∫x2ln⁡x(x3+1)2 dx=x33(x3+1)ln⁡x−13∫x2x3+1 dx=x33(x3+1)ln⁡x−19ln⁡∣x3+1∣+K\int \frac{x^2\ln x}{(x^3 + 1)^2}\,dx = \frac{x^3}{3(x^3 + 1)}\ln x - \frac{1}{3}\int \frac{x^2}{x^3 + 1}\,dx = \frac{x^3}{3(x^3 + 1)}\ln x - \frac{1}{9}\ln|x^3 + 1| + K

Example 3B: Think of the Exponential as the Variable§

Evaluate ∫e−xln⁡(1+ex) dx\displaystyle\int e^{-x}\ln(1 + e^x)\,dx.

Think of u=exu = e^x as the variable! Then the DD-column denominator is 1+u1 + u (zero at u=−1u = -1), and the II-column antiderivative is −e−x+C=−1u+C-e^{-x} + C = -\frac{1}{u} + C. Setting −1−1+C=0-\frac{1}{-1} + C = 0 gives 1+C=01 + C = 0, so C=−1C = -1:

Sign D I
++ ln⁡(1+ex)\ln(1 + e^x) e−xe^{-x}
−- ex1+ex\dfrac{e^x}{1 + e^x} −e−x−1=−e−x(1+ex)-e^{-x} - 1 = -e^{-x}(1 + e^x)

Factoring −e−x−1=−e−x(1+ex)-e^{-x} - 1 = -e^{-x}(1 + e^x) reveals the magic on the bottom row: (1+ex)(1 + e^x) cancels and ex⋅e−x=1e^x \cdot e^{-x} = 1, leaving ∫1 dx\int 1\,dx!

∫e−xln⁡(1+ex) dx=−(1+e−x)ln⁡(1+ex)+∫1 dx=−(1+e−x)ln⁡(1+ex)+x+K\int e^{-x}\ln(1 + e^x)\,dx = -(1 + e^{-x})\ln(1 + e^x) + \int 1\,dx = -(1 + e^{-x})\ln(1 + e^x) + x + K

Example 3C: Solving Hook Problem (1) — The Trigonometric Collapse§

Evaluate ∫ln⁡(sin⁡x+cos⁡x)cos⁡2x dx\displaystyle\int \frac{\ln(\sin x + \cos x)}{\cos^2 x}\,dx on any interval where sin⁡x+cos⁡x>0\sin x + \cos x > 0 (for example, −π4<x<π2-\frac{\pi}{4} < x < \frac{\pi}{2}).

Rewrite 1cos⁡2x\frac{1}{\cos^2 x} as sec⁡2x\sec^2 x, whose antiderivative is tan⁡x+C\tan x + C. With C=0C = 0, the bottom row produces ∫tan⁡x⋅cos⁡x−sin⁡xsin⁡x+cos⁡x dx\int \tan x \cdot \frac{\cos x - \sin x}{\sin x + \cos x}\,dx—a dead end.

Instead, ask where the DD-column denominator sin⁡x+cos⁡x\sin x + \cos x equals zero: precisely when sin⁡x=−cos⁡x\sin x = -\cos x, i.e., tan⁡x=−1\tan x = -1! Setting tan⁡x+C=0\tan x + C = 0 at tan⁡x=−1\tan x = -1 gives C=1C = 1, and tan⁡x+1\tan x + 1 is literally sin⁡x+cos⁡xcos⁡x\frac{\sin x + \cos x}{\cos x}:

Sign D I
++ ln⁡(sin⁡x+cos⁡x)\ln(\sin x + \cos x) sec⁡2x\sec^2 x
−- cos⁡x−sin⁡xsin⁡x+cos⁡x\dfrac{\cos x - \sin x}{\sin x + \cos x} tan⁡x+1=sin⁡x+cos⁡xcos⁡x\tan x + 1 = \dfrac{\sin x + \cos x}{\cos x}

Multiply across the bottom row: the entire sin⁡x+cos⁡x\sin x + \cos x cancels, leaving cos⁡x−sin⁡xcos⁡x=1−tan⁡x\frac{\cos x - \sin x}{\cos x} = 1 - \tan x:

∫ln⁡(sin⁡x+cos⁡x)cos⁡2x dx=(tan⁡x+1)ln⁡(sin⁡x+cos⁡x)−∫(1−tan⁡x) dx\int \frac{\ln(\sin x + \cos x)}{\cos^2 x}\,dx = (\tan x + 1)\ln(\sin x + \cos x) - \int (1 - \tan x)\,dx =(tan⁡x+1)ln⁡(sin⁡x+cos⁡x)−x−ln⁡∣cos⁡x∣+K= (\tan x + 1)\ln(\sin x + \cos x) - x - \ln|\cos x| + K

Example 3D: A Trigonometric Identity Does the Factoring§

Evaluate ∫sin⁡2x ln⁡(1+sin⁡x) dx\displaystyle\int \sin 2x\,\ln(1 + \sin x)\,dx where 1+sin⁡x>01 + \sin x > 0.

Here the DD-column denominator is 1+sin⁡x1 + \sin x, which equals zero when sin⁡x=−1\sin x = -1. Integrating sin⁡2x\sin 2x gives −cos⁡2x2+C-\frac{\cos 2x}{2} + C.

What is the value of cos⁡2x\cos 2x when sin⁡x=−1\sin x = -1? Using the double-angle identity cos⁡2x=1−2sin⁡2x\cos 2x = 1 - 2\sin^2 x, we get cos⁡2x=1−2(−1)2=−1\cos 2x = 1 - 2(-1)^2 = -1. Plugging this into the II column gives −−12+C=12+C=0-\frac{-1}{2} + C = \frac{1}{2} + C = 0, so C=−12C = -\frac{1}{2}!

Now use cos⁡2x=2cos⁡2x−1\cos 2x = 2\cos^2 x - 1 to rewrite the II column:

−cos⁡2x2−12=−1+cos⁡2x2=−cos⁡2x-\frac{\cos 2x}{2} - \frac{1}{2} = -\frac{1 + \cos 2x}{2} = -\cos^2 x
Sign D I
++ ln⁡(1+sin⁡x)\ln(1 + \sin x) sin⁡2x\sin 2x
−- cos⁡x1+sin⁡x\dfrac{\cos x}{1 + \sin x} −cos⁡2x2−12=−cos⁡2x-\dfrac{\cos 2x}{2} - \dfrac{1}{2} = -\cos^2 x

Since cos⁡2x=1−sin⁡2x=(1−sin⁡x)(1+sin⁡x)\cos^2 x = 1 - \sin^2 x = (1 - \sin x)(1 + \sin x), the denominator 1+sin⁡x1 + \sin x cancels completely, leaving cos⁡x(1−sin⁡x)\cos x(1 - \sin x)—an immediate substitution (u=sin⁡xu = \sin x, du=cos⁡x dxdu = \cos x\,dx):

∫sin⁡2x ln⁡(1+sin⁡x) dx=−cos⁡2x ln⁡(1+sin⁡x)+∫cos⁡x (1−sin⁡x) dx\int \sin 2x\,\ln(1 + \sin x)\,dx = -\cos^2 x\,\ln(1 + \sin x) + \int \cos x\,(1 - \sin x)\,dx =−cos⁡2x ln⁡(1+sin⁡x)+sin⁡x−sin⁡2x2+K= -\cos^2 x\,\ln(1 + \sin x) + \sin x - \frac{\sin^2 x}{2} + K

Example 3E: Spending a +C in Every Row§

Evaluate ∫ln⁡2(1+x) dx\displaystyle\int \ln^2(1 + x)\,dx for x>−1x > -1.

Write the integrand as ln⁡2(1+x)⋅1\ln^2(1 + x) \cdot 1. Differentiating ln⁡2(1+x)\ln^2(1 + x) produces the denominator 1+x1 + x (root x=−1x = -1). If we integrate 11 with C=0C = 0, we get stuck with ∫2xln⁡(1+x)1+x dx\int \frac{2x\ln(1 + x)}{1 + x}\,dx. Instead, choose C=1C = 1 so the II column becomes x+1x + 1:

Sign D I
++ ln⁡2(1+x)\ln^2(1 + x) 11
−- 2ln⁡(1+x)1+x\dfrac{2\ln(1 + x)}{1 + x} x+1x + 1

The factor (1+x)(1 + x) cancels on contact, leaving a simpler logarithm integral:

∫ln⁡2(1+x) dx=(1+x)ln⁡2(1+x)−2∫ln⁡(1+x) dx\int \ln^2(1 + x)\,dx = (1 + x)\ln^2(1 + x) - 2\int \ln(1 + x)\,dx

Now apply the exact same trick to ∫ln⁡(1+x) dx\int \ln(1 + x)\,dx—integrate 11 as x+1x + 1 again so the 11+x\frac{1}{1 + x} from differentiating ln⁡(1+x)\ln(1 + x) cancels a second time:

∫ln⁡(1+x) dx=(1+x)ln⁡(1+x)−∫11+x⋅(1+x) dx=(1+x)ln⁡(1+x)−x\int \ln(1 + x)\,dx = (1 + x)\ln(1 + x) - \int \frac{1}{\cancel{1 + x}}\cdot\cancel{(1 + x)}\,dx = (1 + x)\ln(1 + x) - x

Substituting back:

∫ln⁡2(1+x) dx=(1+x)ln⁡2(1+x)−2(1+x)ln⁡(1+x)+2x+K\int \ln^2(1 + x)\,dx = (1 + x)\ln^2(1 + x) - 2(1 + x)\ln(1 + x) + 2x + K

Notice that since 2x=2(1+x)−22x = 2(1 + x) - 2 and −2-2 can be absorbed into the arbitrary constant KK, writing L=ln⁡(1+x)L = \ln(1 + x) tidies the answer into (1+x)(L2−2L+2)+K(1 + x)(L^2 - 2L + 2) + K. (Try ∫ln⁡3(1+x) dx\int \ln^3(1 + x)\,dx using the same step-by-step +1+1: you will get (1+x)(L3−3L2+6L−6)+K(1 + x)(L^3 - 3L^2 + 6L - 6) + K!)


Level 4: Definite Integrals Where C Kills the Boundary Too§

In a definite integral ∫abD(x) I(x) dx\int_a^b D(x)\,I(x)\,dx, the diagonal term becomes a boundary evaluation [D(x)⋅(∫I(x) dx+C)]ab\Big[D(x)\cdot\big(\int I(x)\,dx + C\big)\Big]_a^b. Choosing +C+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 4A: Two Birds, One Constant§

Evaluate ∫01xln⁡(1+x) dx\displaystyle\int_0^1 x\ln(1 + x)\,dx.

Root matching at x=−1x = -1 gives (−1)22+C=0  ⟹  C=−12\frac{(-1)^2}{2} + C = 0 \implies C = -\frac{1}{2}, turning the II column into x2−12=(x−1)(x+1)2\frac{x^2 - 1}{2} = \frac{(x - 1)(x + 1)}{2}:

Sign D I
++ ln⁡(1+x)\ln(1 + x) xx
−- 11+x\dfrac{1}{1 + x} x22−12=(x−1)(x+1)2\dfrac{x^2}{2} - \dfrac{1}{2} = \dfrac{(x - 1)(x + 1)}{2}

Look at the boundary term [x2−12ln⁡(1+x)]01\left[\frac{x^2 - 1}{2}\ln(1 + x)\right]_0^1:

  • At x=1x = 1, the factor x2−1x^2 - 1 equals 00.
  • At x=0x = 0, the factor ln⁡(1+x)=ln⁡1\ln(1 + x) = \ln 1 equals 00.

The entire boundary term disappears! All that remains is a trivial linear integral:

∫01xln⁡(1+x) dx=[x2−12ln⁡(1+x)]01⏟0−12∫01(x−1) dx=−12(12−1)=14\int_0^1 x\ln(1 + x)\,dx = \underbrace{\left[\frac{x^2 - 1}{2}\ln(1 + x)\right]_0^1}_{0} - \frac{1}{2}\int_0^1 (x - 1)\,dx = -\frac{1}{2}\left(\frac{1}{2} - 1\right) = \frac{1}{4}

Example 4B: Sum of Cubes Plus Vanishing Boundaries§

Evaluate ∫01x2ln⁡(x2−x+1) dx\displaystyle\int_0^1 x^2\ln(x^2 - x + 1)\,dx.

Just like Example 2D, the denominator x2−x+1x^2 - x + 1 has no real roots, but it is half of the sum-of-cubes identity:

x3+1=(x+1)(x2−x+1)x^3 + 1 = (x + 1)(x^2 - x + 1)

Choose C=13C = \frac{1}{3} so the II column becomes x3+13\frac{x^3 + 1}{3}:

Sign D I
++ ln⁡(x2−x+1)\ln(x^2 - x + 1) x2x^2
−- 2x−1x2−x+1\dfrac{2x - 1}{x^2 - x + 1} x33+13=(x+1)(x2−x+1)3\dfrac{x^3}{3} + \dfrac{1}{3} = \dfrac{(x + 1)(x^2 - x + 1)}{3}

Check the boundary term at both limits: at x=0x = 0, x2−x+1=1x^2 - x + 1 = 1, so ln⁡1=0\ln 1 = 0; at x=1x = 1, x2−x+1=1x^2 - x + 1 = 1, so ln⁡1=0\ln 1 = 0 again! The boundary term vanishes completely, leaving only a polynomial:

∫01x2ln⁡(x2−x+1) dx=[x3+13ln⁡(x2−x+1)]01⏟0−13∫01(2x−1)(x+1) dx\int_0^1 x^2\ln(x^2 - x + 1)\,dx = \underbrace{\left[\frac{x^3 + 1}{3}\ln(x^2 - x + 1)\right]_0^1}_{0} - \frac{1}{3}\int_0^1 (2x - 1)(x + 1)\,dx =−13∫01(2x2+x−1) dx=−13(23+12−1)=−118= -\frac{1}{3}\int_0^1 (2x^2 + x - 1)\,dx = -\frac{1}{3}\left(\frac{2}{3} + \frac{1}{2} - 1\right) = -\frac{1}{18}

Example 4C: Taming a Blow-Up at the Endpoint§

Evaluate ∫01ln⁡(1−x) dx\displaystyle\int_0^1 \ln(1 - x)\,dx.

Because ln⁡(1−x)→−∞\ln(1 - x) \to -\infty as x→1−x \to 1^-, this definite integral is understood as the limit lim⁡b→1−∫0bln⁡(1−x) dx\lim_{b \to 1^-} \int_0^b \ln(1 - x)\,dx. Watch what happens if we integrate by parts with C=0C = 0:

Now apply root matching at x=1x = 1: integrate 11 as x+Cx + C and pick C=−1C = -1 so the II column vanishes at x=1x = 1:

Sign D I
++ ln⁡(1−x)\ln(1 - x) 11
−- 1x−1\dfrac{1}{x - 1} x−1x - 1

As x→1−x \to 1^-, set t=1−x→0+t = 1 - x \to 0^+. By L'Hôpital's Rule, (x−1)ln⁡(1−x)=−tln⁡t=−ln⁡t1/t→0(x - 1)\ln(1 - x) = -t\ln t = -\frac{\ln t}{1/t} \to 0. Visually, compare the boundary curves y=(x+C)ln⁡(1−x)y = (x + C)\ln(1 - x) on [0,1)[0, 1): for C=0C = 0 and C=−12C = -\frac{1}{2}, the graph plunges to −∞-\infty along x=1x = 1, whereas C=−1C = -1 seals the asymptote cleanly at (1,0)(1, 0)!

Comparison of boundary terms (x + C) ln(1 - x) for C = 0, C = -1/2, and C = -1

Both endpoints of the boundary term vanish, and (x−1)(x - 1) cancels 1x−1\frac{1}{x - 1}:

∫01ln⁡(1−x) dx=[(x−1)ln⁡(1−x)]01−∫011 dx=0−1=−1\int_0^1 \ln(1 - x)\,dx = \Big[(x - 1)\ln(1 - x)\Big]_0^1 - \int_0^1 1\,dx = 0 - 1 = -1

Example 4D: Harmonic Sums from One Constant§

For any non-negative integer nn, evaluate ∫01xnln⁡(1−x) dx\displaystyle\int_0^1 x^n\ln(1 - x)\,dx.

Using the exact same root x=1x = 1, integrate xnx^n to get xn+1n+1+C\frac{x^{n+1}}{n + 1} + C and choose C=−1n+1C = -\frac{1}{n + 1}:

Sign D I
++ ln⁡(1−x)\ln(1 - x) xnx^n
−- 1x−1\dfrac{1}{x - 1} xn+1−1n+1\dfrac{x^{n+1} - 1}{n + 1}

At x=0x = 0, ln⁡1=0\ln 1 = 0. As x→1−x \to 1^-, (xn+1−1)ln⁡(1−x)=(1+x+⋯+xn)(x−1)ln⁡(1−x)→(n+1)⋅0=0(x^{n+1} - 1)\ln(1 - x) = (1 + x + \cdots + x^n)(x - 1)\ln(1 - x) \to (n + 1)\cdot 0 = 0. Both boundary endpoints vanish, and dividing xn+1−1x^{n+1} - 1 by x−1x - 1 leaves the geometric sum 1+x+⋯+xn1 + x + \cdots + x^n:

∫01xnln⁡(1−x) dx=−1n+1∫01(1+x+x2+⋯+xn) dx=−1n+1(1+12+13+⋯+1n+1)\int_0^1 x^n\ln(1 - x)\,dx = -\frac{1}{n + 1}\int_0^1 \big(1 + x + x^2 + \cdots + x^n\big)\,dx = -\frac{1}{n + 1}\left(1 + \frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{n + 1}\right)

Checking small values: n=0n = 0 gives −1-1 (recovering Example 4C), and n=2n = 2 gives −13(1+12+13)=−1118-\frac{1}{3}\left(1 + \frac{1}{2} + \frac{1}{3}\right) = -\frac{11}{18}.


Level 5: Two Puzzles Solved with Squares§

In Levels 1 through 4, +C+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+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)(0, 0), end at (1,0)(1, 0), and enclose an area of 11. How can one extra number pin down a single curve?

Integrate ∫01f(x)⋅1 dx\int_0^1 f(x) \cdot 1\,dx by parts, choosing C=−12C = -\frac{1}{2} (the midpoint of [0,1][0, 1]):

Sign D I
++ f(x)f(x) 11
−- f′(x)f'(x) x−12x - \dfrac{1}{2}

Because f(0)=f(1)=0f(0) = f(1) = 0, the boundary term [f(x)(x−12)]01\left[f(x)\left(x - \frac{1}{2}\right)\right]_0^1 vanishes immediately! That gives us one clean identity:

∫01f′(x)(x−12)dx=−∫01f(x) dx=−1\int_0^1 f'(x)\left(x - \frac{1}{2}\right)dx = -\int_0^1 f(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−12))2\Big(f'(x) + 12\big(x - \frac{1}{2}\big)\Big)^2 and expand it using the three values we know (noting ∫01(x−12)2 dx=[(x−1/2)33]01=112\int_0^1 (x - \frac{1}{2})^2\,dx = \left[\frac{(x - 1/2)^3}{3}\right]_0^1 = \frac{1}{12}):

∫01(f′(x)+12(x−12))2dx=∫01(f′(x))2 dx⏟12+24∫01f′(x)(x−12)dx⏟−1+144∫01(x−12)2dx⏟1/12\int_0^1 \left(f'(x) + 12\left(x - \frac{1}{2}\right)\right)^2 dx = \underbrace{\int_0^1 \big(f'(x)\big)^2\,dx}_{12} + 24\underbrace{\int_0^1 f'(x)\left(x - \frac{1}{2}\right)dx}_{-1} + 144\underbrace{\int_0^1 \left(x - \frac{1}{2}\right)^2 dx}_{1/12} =12−24+12=0= 12 - 24 + 12 = 0

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][0, 1]:

f′(x)+12(x−12)=0  ⟹  f′(x)=6−12xf'(x) + 12\left(x - \frac{1}{2}\right) = 0 \implies f'(x) = 6 - 12x

Integrating and using f(0)=0f(0) = 0 pins down the unique solution:

f(x)=6x−6x2=6x(1−x)f(x) = 6x - 6x^2 = 6x(1 - x)

Graph of the unique parabola f(x) = 6x(1 - x) on the unit interval showing area 1 and midpoint symmetry at x = 1/2

Let us check all four numbers: f(0)=0f(0) = 0, f(1)=0f(1) = 0, ∫016x(1−x) dx=6(12−13)=1\int_0^1 6x(1 - x)\,dx = 6\left(\frac{1}{2} - \frac{1}{3}\right) = 1, and ∫01(6−12x)2 dx=∫01(36−144x+144x2) dx=36−72+48=12\int_0^1 (6 - 12x)^2\,dx = \int_0^1 (36 - 144x + 144x^2)\,dx = 36 - 72 + 48 = 12. Every condition matches!

Why was the midpoint C=−12C = -\frac{1}{2} essential? If we had used C=0C = 0, then ∫01x2 dx=13\int_0^1 x^2\,dx = \frac{1}{3} (four times larger than 112\frac{1}{12}), and no square of the form (f′(x)+ax)2(f'(x) + a x)^2 can integrate to zero—leaving us empty-handed.

Example 5B: The Largest Possible Area§

Now try a closely related optimisation puzzle—this time with only one endpoint fixed!

This time we know f(0)=0f(0) = 0, but we know nothing about f(1)f(1). If we integrate ∫01f(x)⋅1 dx\int_0^1 f(x) \cdot 1\,dx by parts with C=0C = 0 or C=−12C = -\frac{1}{2}, the unknown number f(1)f(1) survives in the boundary term!

So we spend CC to kill the boundary at the end we know nothing about: choose C=−1C = -1 so the II column becomes x−1x - 1, which equals 00 at x=1x = 1!

Sign D I
++ f(x)f(x) 11
−- f′(x)f'(x) x−1x - 1

Now the boundary term [f(x)(x−1)]01=f(1)⋅0−f(0)⋅(−1)=0\big[f(x)(x - 1)\big]_0^1 = f(1)\cdot 0 - f(0)\cdot(-1) = 0 vanishes at both ends! That gives:

A=∫01f(x) dx=−∫01f′(x)(x−1) dx=∫01f′(x)(1−x) dxA = \int_0^1 f(x)\,dx = -\int_0^1 f'(x)(x - 1)\,dx = \int_0^1 f'(x)(1 - x)\,dx

Now bring back the square trick, this time with a free real number kk. For every k∈Rk \in \mathbb{R}, since ∫01(1−x)2 dx=13\int_0^1 (1 - x)^2\,dx = \frac{1}{3}:

0≤∫01(f′(x)−k(1−x))2dx=∫01(f′(x))2 dx⏟1−2k∫01f′(x)(1−x) dx⏟A+k2∫01(1−x)2 dx⏟1/30 \le \int_0^1 \big(f'(x) - k(1 - x)\big)^2 dx = \underbrace{\int_0^1 \big(f'(x)\big)^2\,dx}_{1} - 2k\underbrace{\int_0^1 f'(x)(1 - x)\,dx}_{A} + k^2\underbrace{\int_0^1 (1 - x)^2\,dx}_{1/3} 13k2−2A k+1≥0for all k∈R\frac{1}{3}k^2 - 2A\,k + 1 \ge 0 \qquad \text{for all } k \in \mathbb{R}

A quadratic in kk that never dips below zero must have discriminant Δ≤0\Delta \le 0:

(−2A)2−4(13)(1)≤0  ⟹  4A2≤43  ⟹  A≤13(-2A)^2 - 4\left(\frac{1}{3}\right)(1) \le 0 \implies 4A^2 \le \frac{4}{3} \implies A \le \frac{1}{\sqrt{3}}

Equality (A=13A = \frac{1}{\sqrt{3}}) holds if and only if the quadratic has a double root k=2A2/3=3A=3k = \frac{2A}{2/3} = 3A = \sqrt{3}, forcing the square inside the integral to vanish identically:

f′(x)=3 (1−x)  ⟹  f(x)=3(x−x22)f'(x) = \sqrt{3}\,(1 - x) \implies f(x) = \sqrt{3}\left(x - \frac{x^2}{2}\right)

Check: f(0)=0f(0) = 0, ∫01(f′(x))2 dx=3∫01(1−x)2 dx=1\int_0^1 (f'(x))^2\,dx = 3\int_0^1 (1 - x)^2\,dx = 1, and ∫01f(x) dx=3(12−16)=13≈0.577\int_0^1 f(x)\,dx = \sqrt{3}\left(\frac{1}{2} - \frac{1}{6}\right) = \frac{1}{\sqrt{3}} \approx 0.577.

Comparison of three curves starting at the origin with equal slope-squared integral 1 showing the concave parabola achieves the maximum area 1/sqrt(3)

Look at the contrast between our two puzzles: in Example 5A, C=−12C = -\frac{1}{2} was chosen to make the algebra close into an exact square; in Example 5B, C=−1C = -1 was forced by the endpoint where f(1)f(1) was unknown.


Bonus: The 0 = 1 Paradox§

Before we finish, let us see what happens when we forget +C+C in the most elementary integral of all: ∫1x dx\displaystyle\int \frac{1}{x}\,dx.

Set D=1xD = \frac{1}{x} and I=1I = 1:

Sign D I
++ 1x\dfrac{1}{x} 11
−- −1x2-\dfrac{1}{x^2} xx

Reading the table produces:

∫1x dx=1x⋅x−∫(−1x2)x dx=1+∫1x dx\int \frac{1}{x}\,dx = \frac{1}{x} \cdot x - \int \left(-\frac{1}{x^2}\right)x\,dx = 1 + \int \frac{1}{x}\,dx

Subtract ∫1x dx\int \frac{1}{x}\,dx from both sides, and you appear to prove 0=10 = 1!

There is no algebraic mistake anywhere. The catch is what the indefinite integral symbol actually means: ∫1x dx\int \frac{1}{x}\,dx 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\ln|x| + C_1, while the right-hand side stands for 1+ln⁡∣x∣+C21 + \ln|x| + C_2. Setting them equal simply says C1=C2+1C_1 = C_2 + 1—completely true! The extra "11" is swallowed by the constant of integration.

If you run the same step as a definite integral on any interval [a,b][a, b] (not containing 00), the diagonal boundary term is [1]ab=1−1=0\big[1\big]_a^b = 1 - 1 = 0, and the paradox disappears instantly.


Summary: Five Principles for Spending +C§

Principle What to Look For Example Payoff
1. Match the real root Make the II column zero where the DD-column denominator is zero ∫ln⁡(x+1)(x−1)2 dx\int \frac{\ln(x+1)}{(x-1)^2}\,dx with zero partial fractions
2. Spot the factorisation No real root? Aim for a2−b2a^2 - b^2, a3±b3a^3 \pm b^3, or a trig identity ∫x2ln⁡(x2+x+1) dx\int x^2\ln(x^2 + x + 1)\,dx via x3−1x^3 - 1
3. Substitute mentally View u=x2u = x^2 or u=exu = e^x as the variable to test whether one CC works ∫e−xln⁡(1+ex) dx\int e^{-x}\ln(1 + e^x)\,dx collapses to ∫1 dx\int 1\,dx
4. Kill the boundary too In definite integrals, let CC vanish at an endpoint or tame an asymptote ∫01xln⁡(1+x) dx=14\int_0^1 x\ln(1 + x)\,dx = \frac{1}{4} and ∫01ln⁡(1−x) dx=−1\int_0^1 \ln(1 - x)\,dx = -1
5. Close the algebra Spend CC to cancel an unknown endpoint or complete a zero-integral square f(x)=6x(1−x)f(x) = 6x(1 - x) and max area 13\frac{1}{\sqrt{3}}

The textbook says +C+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.


Practice Challenges§

Try solving all three problems by choosing +C+C deliberately before opening the solution shutters.

Challenge 1. Evaluate ∫ln⁡(1+x)x2 dx\displaystyle\int \frac{\ln(1 + x)}{x^2}\,dx for x>−1x > -1, x≠0x \neq 0.

Hint and Full Solution

Differentiate ln⁡(1+x)\ln(1 + x) to get 11+x\frac{1}{1 + x} (denominator vanishes at x=−1x = -1) and integrate 1x2\frac{1}{x^2} to get −1x+C-\frac{1}{x} + C.

Setting −1−1+C=0-\frac{1}{-1} + C = 0 gives C=−1C = -1, turning the II column into −1x−1=−x+1x-\frac{1}{x} - 1 = -\frac{x + 1}{x}. Reading the D–I table:

∫ln⁡(1+x)x2 dx=−x+1xln⁡(1+x)+∫1x+1⋅x+1x dx=−x+1xln⁡(1+x)+ln⁡∣x∣+K\int \frac{\ln(1 + x)}{x^2}\,dx = -\frac{x + 1}{x}\ln(1 + x) + \int \frac{1}{\cancel{x + 1}}\cdot\frac{\cancel{x + 1}}{x}\,dx = -\frac{x + 1}{x}\ln(1 + x) + \ln|x| + K

Challenge 2. Evaluate ∫01x3ln⁡(1+x) dx\displaystyle\int_0^1 x^3\ln(1 + x)\,dx.

Hint and Full Solution

Differentiate ln⁡(1+x)\ln(1 + x) to get 11+x\frac{1}{1 + x} (root x=−1x = -1) and integrate x3x^3 to get x44+C\frac{x^4}{4} + C.

At x=−1x = -1, (−1)44+C=0\frac{(-1)^4}{4} + C = 0 gives C=−14C = -\frac{1}{4}, so the II column becomes x4−14=(x+1)(x3−x2+x−1)4\frac{x^4 - 1}{4} = \frac{(x + 1)(x^3 - x^2 + x - 1)}{4}.

Notice the boundary term [x4−14ln⁡(1+x)]01\left[\frac{x^4 - 1}{4}\ln(1 + x)\right]_0^1 vanishes at both ends (x4−1=0x^4 - 1 = 0 at x=1x = 1, and ln⁡1=0\ln 1 = 0 at x=0x = 0):

∫01x3ln⁡(1+x) dx=−14∫01(x3−x2+x−1) dx=−14(14−13+12−1)=−14(−712)=748\int_0^1 x^3\ln(1 + x)\,dx = -\frac{1}{4}\int_0^1 (x^3 - x^2 + x - 1)\,dx = -\frac{1}{4}\left(\frac{1}{4} - \frac{1}{3} + \frac{1}{2} - 1\right) = -\frac{1}{4}\left(-\frac{7}{12}\right) = \frac{7}{48}

Challenge 3. Evaluate ∫ln⁡(sin⁡x+cos⁡x)sin⁡2x dx\displaystyle\int \frac{\ln(\sin x + \cos x)}{\sin^2 x}\,dx on any interval where sin⁡x+cos⁡x>0\sin x + \cos x > 0 and sin⁡x≠0\sin x \neq 0.

Hint and Full Solution

Rewrite 1sin⁡2x=csc⁡2x\frac{1}{\sin^2 x} = \csc^2 x, whose antiderivative is −cot⁡x+C-\cot x + C.

The DD-column denominator sin⁡x+cos⁡x\sin x + \cos x vanishes when cot⁡x=−1\cot x = -1. Plugging cot⁡x=−1\cot x = -1 into −cot⁡x+C=0-\cot x + C = 0 gives 1+C=01 + C = 0, so C=−1C = -1.

Thus the II column becomes:

−cot⁡x−1=−cos⁡x+sin⁡xsin⁡x-\cot x - 1 = -\frac{\cos x + \sin x}{\sin x}

Reading the D–I table, (sin⁡x+cos⁡x)(\sin x + \cos x) cancels on contact:

∫ln⁡(sin⁡x+cos⁡x)sin⁡2x dx=−(cot⁡x+1)ln⁡(sin⁡x+cos⁡x)+∫cos⁡x−sin⁡xsin⁡x dx\int \frac{\ln(\sin x + \cos x)}{\sin^2 x}\,dx = -(\cot x + 1)\ln(\sin x + \cos x) + \int \frac{\cos x - \sin x}{\sin x}\,dx =−(cot⁡x+1)ln⁡(sin⁡x+cos⁡x)+∫(cot⁡x−1) dx=−(cot⁡x+1)ln⁡(sin⁡x+cos⁡x)+ln⁡∣sin⁡x∣−x+K= -(\cot x + 1)\ln(\sin x + \cos x) + \int (\cot x - 1)\,dx = -(\cot x + 1)\ln(\sin x + \cos x) + \ln|\sin x| - x + K