๐Ÿงฎ Brain Teaser

The Integral That Knows About Primes

Evaluate the definite integral:

I=โˆซ01x4(1โˆ’x)41+x2โ€‰dxI = \int_0^1 \frac{x^4(1-x)^4}{1+x^2}\,dx

polynomial long divisionarctanpi approximation22/7integration bee

Answer: The Integral That Knows About Primes

Key Idea / Intuition

This integral is secretly connected to the famous approximation ฯ€โ‰ˆ22/7\pi \approx 22/7. The fraction 22/7โˆ’ฯ€22/7 - \pi is a positive number, and this integral is exactly that difference! The key is to perform polynomial long division on the integrand, which splits it into a polynomial part plus a simple remainder involving 1/(1+x2)1/(1+x^2), whose integral gives arctan.


Formal Proof / Solution

Step 1: Polynomial long division.

First expand x4(1โˆ’x)4x^4(1-x)^4:

x4(1โˆ’x)4=x4(1โˆ’4x+6x2โˆ’4x3+x4)=x4โˆ’4x5+6x6โˆ’4x7+x8x^4(1-x)^4 = x^4(1 - 4x + 6x^2 - 4x^3 + x^4) = x^4 - 4x^5 + 6x^6 - 4x^7 + x^8

Now divide by 1+x21 + x^2. We want to write:

x8โˆ’4x7+6x6โˆ’4x5+x41+x2=Q(x)+R(x)1+x2\frac{x^8 - 4x^7 + 6x^6 - 4x^5 + x^4}{1+x^2} = Q(x) + \frac{R(x)}{1+x^2}

Performing long division step by step (repeatedly subtracting (1+x2)โ‹…(leadingย term)(1+x^2)\cdot(\text{leading term})):

x8โˆ’4x7+6x6โˆ’4x5+x4=(1+x2)โ‹…Q(x)+Rx^8 - 4x^7 + 6x^6 - 4x^5 + x^4 = (1+x^2)\cdot Q(x) + R

Let's carry it out:

  • x8รท(1+x2)x^8 \div (1+x^2): leading term x6x^6, so subtract x6(1+x2)=x6+x8x^6(1+x^2) = x^6 + x^8. Remainder: โˆ’4x7+5x6โˆ’4x5+x4-4x^7 + 5x^6 - 4x^5 + x^4
  • โˆ’4x7รท(1+x2)-4x^7 \div (1+x^2): leading term โˆ’4x5-4x^5, subtract โˆ’4x5(1+x2)=โˆ’4x5โˆ’4x7-4x^5(1+x^2) = -4x^5 - 4x^7. Remainder: 5x6โˆ’4x5+x4+4x7โˆ’4x7โ†’5x6+0โ‹…x5โˆ’4x5+x45x^6 - 4x^5 + x^4 + 4x^7 - 4x^7 \to 5x^6 + 0 \cdot x^5 - 4x^5 + x^4...

Let me be systematic. Writing:

x4(1โˆ’x)41+x2=x6โˆ’4x5+5x4โˆ’4x2+4โˆ’41+x2\frac{x^4(1-x)^4}{1+x^2} = x^6 - 4x^5 + 5x^4 - 4x^2 + 4 - \frac{4}{1+x^2}

Verification of this identity (multiply both sides by 1+x21+x^2):

(x6โˆ’4x5+5x4โˆ’4x2+4)(1+x2)โˆ’4(x^6 - 4x^5 + 5x^4 - 4x^2 + 4)(1+x^2) - 4 =x6+x8โˆ’4x5โˆ’4x7+5x4+5x6โˆ’4x2โˆ’4x4+4+4x2โˆ’4= x^6 + x^8 - 4x^5 - 4x^7 + 5x^4 + 5x^6 - 4x^2 - 4x^4 + 4 + 4x^2 - 4 =x8โˆ’4x7+(1+5)x6โˆ’4x5+(5โˆ’4)x4+(โˆ’4+4)x2+(4โˆ’4)= x^8 - 4x^7 + (1+5)x^6 - 4x^5 + (5-4)x^4 + (-4+4)x^2 + (4-4) =x8โˆ’4x7+6x6โˆ’4x5+x4โœ“= x^8 - 4x^7 + 6x^6 - 4x^5 + x^4 \checkmark

Step 2: Integrate term by term.

I=โˆซ01(x6โˆ’4x5+5x4โˆ’4x2+4โˆ’41+x2)dxI = \int_0^1 \left(x^6 - 4x^5 + 5x^4 - 4x^2 + 4 - \frac{4}{1+x^2}\right)dx

=[x77โˆ’4x66+5x55โˆ’4x33+4xโˆ’4arctanโกx]01= \left[\frac{x^7}{7} - \frac{4x^6}{6} + \frac{5x^5}{5} - \frac{4x^3}{3} + 4x - 4\arctan x\right]_0^1

=17โˆ’23+1โˆ’43+4โˆ’4โ‹…ฯ€4= \frac{1}{7} - \frac{2}{3} + 1 - \frac{4}{3} + 4 - 4\cdot\frac{\pi}{4}

=17โˆ’23+1โˆ’43+4โˆ’ฯ€= \frac{1}{7} - \frac{2}{3} + 1 - \frac{4}{3} + 4 - \pi

Combining the rational terms:

17+(โˆ’23โˆ’43)+(1+4)=17โˆ’2+5=17+3=227\frac{1}{7} + \left(-\frac{2}{3} - \frac{4}{3}\right) + (1 + 4) = \frac{1}{7} - 2 + 5 = \frac{1}{7} + 3 = \frac{22}{7}

Therefore:

I=227โˆ’ฯ€\boxed{I = \frac{22}{7} - \pi}

Step 3: Appreciate what this means.

Since 0โ‰คxโ‰ค10 \leq x \leq 1 and 1+x2>01+x^2 > 0, the integrand is strictly positive on (0,1)(0,1). Therefore:

227โˆ’ฯ€=I>0โ€…โ€ŠโŸนโ€…โ€Šฯ€<227\frac{22}{7} - \pi = I > 0 \implies \pi < \frac{22}{7}

This integral gives a clean, calculus-based proof that 22/722/7 overestimates ฯ€\pi, and the value of the integral (โ‰ˆ0.00126\approx 0.00126) tells us exactly how bad the approximation is.

Written to: questions/2026-09-21_am.md | questions/2026-09-21_am_answer.md

Source: Mathematical folklore / classic competition problem

Type: IntegrationSource: Mathematical folklore / classic competition problemEdit on GitHub โ†—