Chenyang Yuan

# Street-Fighting Mathematics

During the winter break, I was reading this book called Street-Fighting Mathematics, which is a cool book teaching tricks and approximations for various calculations. I strongly suggest reading through it if you want to strengthen your mathematical arsenal. In one of the chapters, the reader is invited to give an approximate answer to this integral within 5 minutes, correct to $5\%$:

But I took a complex analysis class last fall, and I can get the exact answer to this in 5 minutes too! In this post I’ll show you how to do this exactly and approximately, and I think both methods are pretty cool.

First the exact answer. We are going to convert this into a contour integral by making the substitution $z = e^{i\theta}$:

Where the new integral is computed over the unit circle. On the unit circle $\bar{z} = \frac{1}{z}$, and we can apply the residue theorem to get:

Since the residue is the coefficient of the $\frac{1}{z}$ term in the expansion, we can find it in terms of the binomial coefficient:

This is a pretty powerful trick to solve trigonometric integrals, but in the end it’s still hard to estimate the order of magnitude of the exact answer without a calculator. Here is where the approximate method shines. We first approximate $\cos \theta$ with a Taylor series, then use the fact that $(1 - \epsilon)^n \approx e^{- \epsilon n}$:

The exact answer is $0.250036963481$, about $0.015\%$ off. I like both methods.