In May 2018 a Twitter post captured the attention of Satya Majumdar and Emmanuel Trizac of Université Paris–Sud/CNRS in France. The tweet, from Fermat’s Library, offered Borwein integrals as a cautionary tale for inductive reasoning. The equations integrate over products of sin(*ax*)/*ax*, where *a* takes a different value for each factor and each variant of Borwein integral. For the type of Borwein integral in the tweet, the integral of one factor (first equation in the tweet) yields *π*/2. The integral of the product of two factors (second equation), of three factors (third equation), and even of seven factors is also *π*/2. But the integral of eight factors (last equation) is shy of *π*/2 by less than 10^{−10}. Although mathematicians found an expression for when the result changes, they lack an intuitive understanding why. To fill that gap, Majumdar and Trizac have offered a way to visualize the behavior of Borwein integrals using one-dimensional random walkers.

The Borwein integral: why pattern generalization sometimes can go wrong pic.twitter.com/zXN23NL0WM

— Fermat’s Library (@fermatslibrary) October 22, 2017

An infinite number of random walkers are initially spread out evenly along an infinitely long line and can share the same position. As all the walkers take a random step, the number of walkers that leave a position, let’s call it position zero, is the same as the number of walkers that land on that same position. No matter how many steps the random walkers take, the total number at position zero stays the same.

But what if the random walkers occupy a finite space? If they are evenly distributed from −1 to 1 (left panel of the figure), the Fourier transform of that rectangular distribution in *x* is sin(*k*)/*k* in terms of the conjugate variable *k*. The first Borwein integral in the tweet can be reimagined as the Fourier transform of sin(*k*)/*k* evaluated at position zero, or the density of random walkers at the origin. For those walkers at zero, the distribution looks the same as the case with walkers spread to infinity.

If the random walkers take a step with sizes from −1/3 to 1/3, the second integral calculates the density of walkers at position zero. Another step of up to ±1/5 produces the situation in the third integral, and so on. With each step, the random walkers spread out more (middle and right panels), but it takes seven steps for the number of walkers at the origin, and thus the Borwein integral, to change. That’s because the origin behaves the same as the infinite case until it realizes that there were no walkers beyond ±1 at the beginning; that information takes time to travel to the origin. A random walker acting as a messenger can only travel 1/3 + 1/5 + 1/7 +… The steps add up to the required 1 only by the seventh (1/15) step.

Majumdar and Trizac’s method applies to other Borwein and related integrals and more dimensions. Their intuitive picture does more than reveal when the results of the integrals change; it also offers a way to avoid directly calculating those potentially complicated integrals. Instead, a mathematician can simply calculate the density of random walkers at a specific point. (S. N. Majumdar, E. Trizac, *Phys. Rev. Lett.* **123**, 020201, 2019)