🧮 Brain Teaser
Integration
The King's Integral
2026-06-13
✏︎

The King's Integral

Evaluate:

I=0π/2sinxsinx+cosxdxI = \int_0^{\pi/2} \frac{\sin x}{\sin x + \cos x}\, dx

symmetrysubstitutiontrigonometric integralKing's rule

Answer: The King's Integral

Key Idea / Intuition

The integrand doesn't simplify easily by substitution or antiderivatives. The trick is to pair the integral with its "mirror image" obtained by the substitution xπ2xx \mapsto \frac{\pi}{2} - x, which swaps sin\sin and cos\cos. When you add the original integral to its mirror, the integrand becomes exactly 11, so the sum is trivial to compute.


Formal Proof / Solution

Step 1: Define the mirror integral.

Let I=0π/2sinxsinx+cosxdx.I = \int_0^{\pi/2} \frac{\sin x}{\sin x + \cos x}\, dx.

Apply the substitution xπ2xx \mapsto \dfrac{\pi}{2} - x. Since sin ⁣(π2x)=cosx\sin\!\left(\tfrac{\pi}{2}-x\right) = \cos x and cos ⁣(π2x)=sinx\cos\!\left(\tfrac{\pi}{2}-x\right) = \sin x, and the limits stay 0π/20 \to \pi/2:

I=0π/2cosxcosx+sinxdx.I = \int_0^{\pi/2} \frac{\cos x}{\cos x + \sin x}\, dx.

Step 2: Add the two expressions.

2I=0π/2sinxsinx+cosxdx+0π/2cosxcosx+sinxdx=0π/2sinx+cosxsinx+cosxdx=0π/21dx=π2.2I = \int_0^{\pi/2} \frac{\sin x}{\sin x + \cos x}\, dx + \int_0^{\pi/2} \frac{\cos x}{\cos x + \sin x}\, dx = \int_0^{\pi/2} \frac{\sin x + \cos x}{\sin x + \cos x}\, dx = \int_0^{\pi/2} 1\, dx = \frac{\pi}{2}.

Step 3: Conclude.

I=π4.\boxed{I = \frac{\pi}{4}.}


Why this is beautiful: The integrand looks asymmetric and resistant to elementary antidifferentiation, yet the answer π/4\pi/4 is perfectly clean. The "King's rule" (pairing with the complement substitution xa+bxx \mapsto a+b-x on [a,b][a,b]) is a universal trick that transforms a hard-looking rational-trigonometric integrand into 11.

Source: Classic integration bee / mathematical folklore

Type: IntegrationSource: Classic integration bee / mathematical folkloreEdit on GitHub ↗