A Two-Line Collapse: The Logistic Reflection Trick
2026-04-20
The Problem
Evaluate
$$\int_{-1}^{1} \frac{dx}{(e^x+1)(x^2+1)}.$$This is a classical MIT Integration Bee problem. On a first read it looks discouraging: the logistic factor $1/(e^x+1)$ has no elementary antiderivative against $1/(x^2+1)$, and the product does not yield to partial fractions, integration by parts, substitution, or any of the standard tricks one learns in a first calculus course.
The answer is $\pi/4$, and it falls out in two lines.
Why It Looks Impossible
Each factor is familiar on its own:
- $\dfrac{1}{e^x+1}$ is the logistic function β the Fermi–Dirac distribution in statistical mechanics, the sigmoid in machine learning. Bounded between $0$ and $1$, monotone decreasing, with no closed-form antiderivative against polynomials.
- $\dfrac{1}{x^2+1}$ integrates to $\arctan x$.
Their product has no obvious closed form, and numerical integration confirms the integral is some real number near $0.785$. The question is: why that real number?
The answer is symmetry — but not the symmetry one expects.
The Trick
Let $I$ denote the integral. Apply the reflection substitution $u = -x$, $du = -dx$. The limits flip ($x=-1 \to u=1$, $x=1 \to u=-1$), and after re-flipping them:
$$I = \int_{-1}^{1} \frac{du}{(e^{-u}+1)(u^2+1)}.$$Multiply top and bottom of the logistic factor by $e^u$:
$$\frac{1}{e^{-u}+1} = \frac{e^u}{1+e^u},$$which gives a second expression for the same integral:
$$I = \int_{-1}^{1} \frac{e^u\,du}{(e^u+1)(u^2+1)}.$$Now add the two expressions for $I$ (renaming $u$ back to $x$ in the second):
$$2I = \int_{-1}^{1} \frac{1}{(e^x+1)(x^2+1)}\,dx + \int_{-1}^{1} \frac{e^x}{(e^x+1)(x^2+1)}\,dx.$$Combine over the common denominator, and the numerator telescopes:
$$2I = \int_{-1}^{1} \frac{1 + e^x}{(e^x+1)(x^2+1)}\,dx = \int_{-1}^{1} \frac{dx}{x^2+1}.$$The logistic factor is gone. What remains is the textbook arctangent integral:
$$2I = \big[\arctan x\big]_{-1}^{1} = \frac{\pi}{4} - \left(-\frac{\pi}{4}\right) = \frac{\pi}{2}.$$Therefore
$$\boxed{\,I = \frac{\pi}{4}.\,}$$Why This Works: The Logistic Identity
The silent engine of the whole computation is the identity
$$\frac{1}{e^x+1} + \frac{1}{e^{-x}+1} = 1 \qquad \text{for every real } x.$$A direct check: multiply top and bottom of the second term by $e^x$:
$$\frac{1}{e^{-x}+1} = \frac{e^x}{1+e^x} = \frac{e^x}{e^x+1}.$$Then
$$\frac{1}{e^x+1} + \frac{1}{e^{-x}+1} = \frac{1}{e^x+1} + \frac{e^x}{e^x+1} = \frac{1 + e^x}{e^x+1} = 1.$$This identity says: the logistic function at $x$ and its reflection at $-x$ are complementary, summing to the constant $1$. Whatever $1/(e^x+1)$ takes away, $1/(e^{-x}+1)$ restores.
When this complementary pair is multiplied by any even function $g(x) = g(-x)$, the reflection trick collapses the problem:
$$\int_{-a}^{a} \frac{g(x)}{e^x+1}\,dx = \frac{1}{2}\int_{-a}^{a} g(x)\,dx.$$The integrand $g(x)/(e^x+1)$ is, on average over the symmetric interval, exactly half of $g(x)$ — because pairing $x$ with $-x$ redistributes the logistic weight to sum to $1$.
In the problem at hand, $g(x) = 1/(x^2+1)$ is even, so the integral equals half of $\int_{-1}^{1} dx/(x^2+1) = \pi/2$, giving $\pi/4$.
The Structural Pattern: King-Style Symmetry
This is a specific instance of a broader technique sometimes called the King’s Property of definite integrals: on any interval $[a,b]$, for any integrable $f$,
$$\int_a^b f(x)\,dx = \int_a^b f(a+b-x)\,dx,$$and so
$$\int_a^b f(x)\,dx = \frac{1}{2}\int_a^b \big[f(x) + f(a+b-x)\big]\,dx.$$When the reflected function $f(a+b-x)$ combines with $f(x)$ into something much simpler — a constant, a polynomial, or a function without the hard factor — the integral becomes tractable.
On a symmetric interval $[-a,a]$, King’s Property specializes to reflection across the origin: $f(x) \leftrightarrow f(-x)$. The logistic problem above is this specialization applied to the logistic–even pair.
Other classical appearances:
- $\displaystyle\int_0^{\pi} \frac{x \sin x}{1+\cos^2 x}\,dx$: under $x \mapsto \pi - x$, the $x$ in the numerator pairs with $\pi - x$, summing to the constant $\pi$. The integral reduces to a standard trigonometric one.
- $\displaystyle\int_0^{\pi/2} \frac{dx}{1 + \tan^{\alpha} x}$ for any real $\alpha$: the reflection $x \mapsto \pi/2 - x$ pairs $\tan^{\alpha} x$ with $\cot^{\alpha} x$, summing to $1$. Answer: $\pi/4$, independent of $\alpha$.
The unifying principle: find a reflection $\sigma$ of the interval under which $f(x) + f(\sigma(x))$ collapses dramatically. The original hard integrand may have no closed form; the symmetrized version often does.
One Diagnostic
Any integrand of the form
$$\frac{\text{(even function of } x\text{)}}{e^x+1}$$on a symmetric interval evaluates to half the integral of the even function alone. No computation of the logistic factor is ever required.
This diagnostic is worth keeping in the back of one’s mind: whenever the logistic function or the Fermi distribution shows up inside an integral over a symmetric domain, check whether the rest of the integrand has the right parity. If it does, the answer is a one-line simplification.
εθ ιδΉεγ
Reversal is the motion of the Way.
β γιεΎ·ηΆγεεη« Β· Laozi, Tao Te Ching, Ch. 40