In short

Periodic functions have a special integral property: \int_0^{nT} f(x)\,dx = n\int_0^T f(x)\,dx, and the integral over one period is the same no matter where you start. The property \int_0^{2a} f(x)\,dx = \int_0^a [f(x) + f(2a-x)]\,dx collapses a double-length integral into a single one. The King's property — adding an integral to its reflected version — is the most versatile trick for competitive problems, turning complicated integrands into clean computations.

Here is a JEE-style integral that stops most students cold:

\int_0^{\pi} x\ln(\sin x)\,dx

The integrand involves x, \ln, and \sin all tangled together. No substitution works. Integration by parts generates integrals that are even harder. The antiderivative cannot be expressed in elementary functions.

Yet the answer is -\frac{\pi^2}{2}\ln 2, and you can get it using the properties in this article — without ever finding an antiderivative. The key is the King's property, combined with a clever use of the double-length integral property.

Periodic functions and their integrals

A function f is periodic with period T if f(x + T) = f(x) for all x. The functions \sin x and \cos x are periodic with period 2\pi. The function \tan x is periodic with period \pi. The function |\sin x| is periodic with period \pi.

Periodic functions have a powerful integral property.

Integral of a periodic function over one period

If f has period T, then for any real number a:

\int_a^{a+T} f(x)\,dx = \int_0^T f(x)\,dx

The integral over any interval of length T is the same.

Proof. Write \int_a^{a+T} f(x)\,dx. Substitute u = x - a, so du = dx, and when x = a, u = 0; when x = a+T, u = T:

\int_a^{a+T} f(x)\,dx = \int_0^T f(u + a)\,du

Since f is periodic with period T, and adding a to the argument is equivalent to shifting the starting point, we need to show \int_0^T f(u+a)\,du = \int_0^T f(u)\,du.

Split \int_0^T f(u+a)\,du = \int_0^{T-a} f(u+a)\,du + \int_{T-a}^T f(u+a)\,du (assuming 0 \leq a \leq T; the general case follows by reducing a modulo T).

In the second piece, substitute v = u + a - T: when u = T - a, v = 0; when u = T, v = a. So \int_{T-a}^T f(u+a)\,du = \int_0^a f(v + T)\,dv = \int_0^a f(v)\,dv (using periodicity).

In the first piece, substitute v = u + a: when u = 0, v = a; when u = T - a, v = T. So \int_0^{T-a} f(u+a)\,du = \int_a^T f(v)\,dv.

Adding: \int_a^T f(v)\,dv + \int_0^a f(v)\,dv = \int_0^T f(v)\,dv.

The integral "does not see" where you start — only how long the interval is.

Extending to multiple periods

An immediate consequence:

\int_0^{nT} f(x)\,dx = n\int_0^T f(x)\,dx

Proof. Split [0, nT] into n intervals of length T: [0, T], [T, 2T], ..., [(n-1)T, nT]. By interval splitting:

\int_0^{nT} f(x)\,dx = \sum_{k=0}^{n-1} \int_{kT}^{(k+1)T} f(x)\,dx

Each piece equals \int_0^T f(x)\,dx by the period-shift property. There are n such pieces.

Example. \int_0^{6\pi} |\sin x|\,dx. The function |\sin x| has period \pi, and 6\pi = 6 periods. So:

\int_0^{6\pi} |\sin x|\,dx = 6\int_0^{\pi} |\sin x|\,dx = 6\int_0^{\pi} \sin x\,dx = 6[-\cos x]_0^{\pi} = 6 \cdot 2 = 12

Without the periodic property, you would need to split the integral at every multiple of \pi and handle each arch separately.

Shifting the origin freely

The period-shift property also means:

\int_{a}^{a+nT} f(x)\,dx = n\int_0^T f(x)\,dx

for any a and any positive integer n. You can start the integration anywhere — the result depends only on how many periods you cover.

The \int_0^{2a} property

The double-length property

\int_0^{2a} f(x)\,dx = \int_0^a \bigl[f(x) + f(2a - x)\bigr]\,dx

Proof. Split \int_0^{2a} f(x)\,dx = \int_0^a f(x)\,dx + \int_a^{2a} f(x)\,dx.

In the second integral, substitute u = 2a - x, so du = -dx. When x = a, u = a; when x = 2a, u = 0:

\int_a^{2a} f(x)\,dx = \int_a^0 f(2a - u)(-du) = \int_0^a f(2a - u)\,du

So \int_0^{2a} f(x)\,dx = \int_0^a f(x)\,dx + \int_0^a f(2a-x)\,dx = \int_0^a [f(x) + f(2a-x)]\,dx.

The special case: when f(2a - x) = f(x)

If f(2a - x) = f(x) for all x in [0, a], then:

\int_0^{2a} f(x)\,dx = 2\int_0^a f(x)\,dx

The function has a symmetry around x = a, and the integral over [0, 2a] is just twice the integral over [0, a].

The special case: when f(2a - x) = -f(x)

If f(2a - x) = -f(x), then:

\int_0^{2a} f(x)\,dx = 0

The function is "anti-symmetric" around x = a, and the two halves cancel.

Example. Is \int_0^{2\pi} \sin^3 x\,dx = 0? Check: \sin^3(2\pi - x) = [-\sin x]^3 = -\sin^3 x. Yes — the condition f(2a-x) = -f(x) holds with a = \pi. So the integral is 0.

You can verify: \sin^3 x from 0 to \pi is a positive hump, and from \pi to 2\pi is a negative hump of the same shape. They cancel exactly.

The King's property

The King's property is not a single formula — it is a technique: take a definite integral, apply the reflection substitution x \to a + b - x (or x \to a - x on [0, a]), add the result to the original, and exploit the cancellation.

The name "King's property" is used primarily in Indian competitive math circles. It refers to the dominant role this technique plays in integral evaluation — it is the "king" of definite integral properties.

The idea was already used in the opening problem of the previous article: \int_0^{\pi/2} \frac{\sin x}{\sin x + \cos x}\,dx. Here is the general pattern:

Pattern. For integrals of the form \int_0^a \frac{g(x)}{g(x) + g(a-x)}\,dx:

I = \int_0^a \frac{g(x)}{g(x) + g(a-x)}\,dx

Apply x \to a - x:

I = \int_0^a \frac{g(a-x)}{g(a-x) + g(x)}\,dx

Add:

2I = \int_0^a \frac{g(x) + g(a-x)}{g(x) + g(a-x)}\,dx = \int_0^a 1\,dx = a
I = \frac{a}{2}

Any integral of this form equals half the length of the interval — regardless of what g is.

More examples of the King's property

Example 1. \int_0^1 \frac{x^5}{x^5 + (1-x)^5}\,dx.

Here g(x) = x^5, a = 1, and g(1-x) = (1-x)^5. By the pattern above, I = 1/2.

Example 2. \int_0^{\pi/2} \frac{\sqrt{\sin x}}{\sqrt{\sin x} + \sqrt{\cos x}}\,dx.

Here g(x) = \sqrt{\sin x} and g(\pi/2 - x) = \sqrt{\cos x}. So I = \pi/4.

Example 3. \int_0^{\pi/2} \frac{\sin^n x}{\sin^n x + \cos^n x}\,dx = \frac{\pi}{4} for any n > 0.

This works for every positive value of n — integer, rational, or irrational. The King's property does not care about the specific function; it cares about the symmetry.

Example 1: King's property with logarithms

Evaluate \displaystyle I = \int_0^{\pi/2} \ln(\tan x)\,dx.

Step 1. Apply the reflection: replace x with \pi/2 - x.

I = \int_0^{\pi/2} \ln\bigl(\tan(\pi/2 - x)\bigr)\,dx = \int_0^{\pi/2} \ln(\cot x)\,dx

Why: \tan(\pi/2 - x) = \cot x. The reflection swaps tangent and cotangent.

Step 2. Add the original and reflected integrals.

2I = \int_0^{\pi/2} \ln(\tan x)\,dx + \int_0^{\pi/2} \ln(\cot x)\,dx = \int_0^{\pi/2} \ln(\tan x \cdot \cot x)\,dx

Why: \ln a + \ln b = \ln(ab). Logarithms convert addition into multiplication.

Step 3. Simplify.

\tan x \cdot \cot x = 1, \quad \text{so} \quad 2I = \int_0^{\pi/2} \ln(1)\,dx = \int_0^{\pi/2} 0\,dx = 0

Why: \ln 1 = 0. The product of tangent and cotangent is always 1.

Step 4. Conclude.

I = 0

Why: 2I = 0 implies I = 0. The positive values of \ln(\tan x) for x > \pi/4 exactly cancel the negative values for x < \pi/4.

Result: \displaystyle\int_0^{\pi/2} \ln(\tan x)\,dx = 0.

The function $\ln(\tan x)$ on $(0, \pi/2)$. It is negative for $x < \pi/4$ (where $\tan x < 1$) and positive for $x > \pi/4$ (where $\tan x > 1$). The two regions have equal absolute area, so the integral is zero. The King's property proves this without computing any area at all.

Example 2: The opening problem solved

Evaluate \displaystyle I = \int_0^{\pi} x\ln(\sin x)\,dx.

Step 1. Apply the reflection: replace x with \pi - x.

I = \int_0^{\pi} (\pi - x)\ln(\sin(\pi - x))\,dx = \int_0^{\pi} (\pi - x)\ln(\sin x)\,dx

Why: \sin(\pi - x) = \sin x, so the logarithm is unchanged. Only the x factor becomes \pi - x.

Step 2. Add the original and reflected integrals.

2I = \int_0^{\pi} x\ln(\sin x)\,dx + \int_0^{\pi} (\pi - x)\ln(\sin x)\,dx = \int_0^{\pi} \pi\ln(\sin x)\,dx
2I = \pi\int_0^{\pi} \ln(\sin x)\,dx

Why: x + (\pi - x) = \pi, eliminating the variable x from the coefficient.

Step 3. Evaluate \int_0^{\pi} \ln(\sin x)\,dx using the double-length property.

By the property \int_0^{2a} f(x)\,dx = \int_0^a [f(x) + f(2a-x)]\,dx with a = \pi/2:

\int_0^{\pi} \ln(\sin x)\,dx = \int_0^{\pi/2} [\ln(\sin x) + \ln(\sin(\pi - x))]\,dx = \int_0^{\pi/2} 2\ln(\sin x)\,dx

The standard result (proved by a Fourier series argument or by the substitution x = \pi/2 - t combined with the identity \sin x \cdot \sin(\pi/2 - x)) is:

\int_0^{\pi/2} \ln(\sin x)\,dx = -\frac{\pi}{2}\ln 2

So \int_0^{\pi} \ln(\sin x)\,dx = 2 \cdot \left(-\frac{\pi}{2}\ln 2\right) = -\pi\ln 2.

Why: the integral \int_0^{\pi/2} \ln(\sin x)\,dx = -\frac{\pi}{2}\ln 2 is a classical result. The double-length property shows the integral over [0, \pi] is exactly twice this.

Step 4. Substitute back.

2I = \pi \cdot (-\pi\ln 2) = -\pi^2\ln 2
I = -\frac{\pi^2}{2}\ln 2

Why: divide by 2.

Result: \displaystyle\int_0^{\pi} x\ln(\sin x)\,dx = -\frac{\pi^2}{2}\ln 2.

The integrand $x\ln(\sin x)$ on $(0, \pi)$. It dives to $-\infty$ near both endpoints (where $\sin x \to 0$, making $\ln(\sin x) \to -\infty$), but the singularities are integrable. The area between this curve and the $x$-axis, counted with sign, is $\pi^2\ln 2/2$ — a result obtainable only through the King's property and the classical log-sine integral.

Common confusions

Going deeper

If you can apply the periodic, double-length, and King's properties to evaluate definite integrals, you are equipped for most competitive exam problems. The material below proves the classical log-sine integral and shows how the King's property connects to a deeper symmetry principle.

Proof of \int_0^{\pi/2} \ln(\sin x)\,dx = -\frac{\pi}{2}\ln 2

Let I = \int_0^{\pi/2} \ln(\sin x)\,dx.

Step 1. By the reflection property (x \to \pi/2 - x), I = \int_0^{\pi/2} \ln(\cos x)\,dx as well.

Step 2. Add:

2I = \int_0^{\pi/2} [\ln(\sin x) + \ln(\cos x)]\,dx = \int_0^{\pi/2} \ln(\sin x\cos x)\,dx = \int_0^{\pi/2} \ln\!\left(\frac{\sin 2x}{2}\right)dx
= \int_0^{\pi/2} \ln(\sin 2x)\,dx - \int_0^{\pi/2} \ln 2\,dx = \int_0^{\pi/2} \ln(\sin 2x)\,dx - \frac{\pi}{2}\ln 2

Step 3. In \int_0^{\pi/2} \ln(\sin 2x)\,dx, substitute t = 2x:

\int_0^{\pi/2} \ln(\sin 2x)\,dx = \frac{1}{2}\int_0^{\pi} \ln(\sin t)\,dt

By the double-length property (since \sin(\pi - t) = \sin t):

\int_0^{\pi} \ln(\sin t)\,dt = 2\int_0^{\pi/2} \ln(\sin t)\,dt = 2I

So \int_0^{\pi/2} \ln(\sin 2x)\,dx = \frac{1}{2} \cdot 2I = I.

Step 4. Substitute back into Step 2:

2I = I - \frac{\pi}{2}\ln 2
I = -\frac{\pi}{2}\ln 2

The proof is self-referential: the integral I appears on both sides of the equation, and solving for I gives the answer. This kind of "functional equation" technique — where you set up a relationship that the integral must satisfy, then solve algebraically — is characteristic of the King's property at its most elegant.

The symmetry principle behind the King's property

The King's property works because of a symmetry in the domain of integration. The substitution x \to a - x on [0, a] is a reflection: it maps the interval to itself, swapping left and right. If the integrand transforms in a predictable way under this reflection, you can exploit the relationship.

More abstractly: if \sigma: [a, b] \to [a, b] is any measure-preserving bijection (a transformation that maps the interval to itself without distorting lengths), then \int_a^b f(x)\,dx = \int_a^b f(\sigma(x))\,dx. The reflection \sigma(x) = a + b - x is the simplest such transformation.

This principle extends to higher dimensions. Double integrals over symmetric regions can be simplified by analogous symmetry arguments — reflecting over a line, rotating by 90°, or exchanging variables. The King's property is the one-dimensional instance of a very general idea.

A collection of results derived from these properties

For reference, here are classical definite integrals that follow from the techniques in this article:

Integral Value Key technique
\int_0^{\pi/2} \frac{\sin^n x}{\sin^n x + \cos^n x}\,dx \frac{\pi}{4} King's property
\int_0^{\pi/2} \ln(\sin x)\,dx -\frac{\pi}{2}\ln 2 King + functional equation
\int_0^{\pi} x f(\sin x)\,dx \frac{\pi}{2}\int_0^{\pi} f(\sin x)\,dx King's property
\int_0^{n\pi} |\sin x|\,dx 2n Periodicity
\int_0^{2\pi} \sin^{2k+1} x\,dx 0 f(2a-x) = -f(x)
\int_{-a}^a \frac{f(x)}{1 + e^x}\,dx \int_0^a f(x)\,dx King's + even f

The last entry is worth noting: if f is even, then \int_{-a}^a \frac{f(x)}{1+e^x}\,dx = \int_0^a f(x)\,dx. The proof uses x \to -x and adds. This appears frequently in JEE Advanced.

Where this leads next