Applications of complex numbers to solve non-complex problems

I suppose the most common one on this site is an application of the Residue Theorem. That is:

$$\int_\gamma f(z) dz = 2\pi i \sum_k Res(f; z_k)$$

where $f$ is an analytic function with only finitely many isolated singularities $z_k$ inside a closed curve $\gamma$ in the complex plane.

While this theorem is clearly a result of Complex Analysis, it in fact has many uses in computing integrals along the real line. Indeed, by constructing $\gamma$ to be semicircular contours, we can immediately compute the real integral $\int_{-\infty}^\infty f(x) dx$ for functions $f(z)$ that are the complex extension of real-valued $f(x)$ (as long as $f(z)$ disappears as $|z|\rightarrow \infty$).

This typical contour $\gamma$ appears as:

A typical contour

where $j$ is an isolated singularity of $f(z)$ and we take $a\rightarrow \infty$.


Here is a straight-forward example. We attempt to compute the definite integral:

$$\int_{-\infty}^\infty \cfrac{dx}{(1+x^2)^2}$$

Defining $f(z):= \cfrac{1}{(1+z^2)^2} = \cfrac{1}{(z+i)^2(z-i)^2}$ where $z\in \mathbb{C}$, and the complex contour $\gamma_a$ to be the semicircle in the upper-half plane, we have by the Residue Theorem: $$\int_{\gamma_a} f(z) dz = 2\pi i Res(f; i) = \cfrac{2\pi i}{4i} = \cfrac{\pi}{2}$$

Now, noting that as $|z|\rightarrow \infty, |f(z)| \rightarrow 0$, so

$$ \cfrac{\pi}{2} = \lim_{a\rightarrow \infty} \int_{\gamma_a} f(z) dz = \lim_{a\rightarrow \infty} \left(\int_{-a}^a f(x) dx + \int_{|z|=a,\theta \in [0,\pi]} f(z) dz \right) = \int_{-\infty}^\infty f(x) dx$$

and we have computed our real-valued integral of a real-valued function using Complex Analysis.


I always found it pleasing how easily one can compute $\int e^{ax}\cos bx \; dx$ and $\int e^{ax}\sin bx \; dx$ by regarding them as the real and imaginary components of $\int e^{cx}\; dx$ (where $c=a+bi$).


An interesting problem is show that:

If $n$ is even then:

$$ {n \choose 0}\cos^{n}x-{n \choose 2}\cos^{n-2}x\cdot\sin^{2}x+{n \choose 4}\cos^{n-4}x\cdot\sin^{4}x-{n \choose 6}\cos^{n-6}x\cdot\sin^{6}x+...+(-1)^{n/2}{n \choose n}\sin^nx=\cos(nx)$$

That comes from the simple fact:

$$(\cos x+i\sin x)^n=\cos nx+i\sin nx$$

Just write $(\cos x+i\sin x)^n$ using binomial expansion and look to the real part.

Furthermore if we choose some values of $x$ we can find many real sums.

For example, take $x=\pi/4$:

$$\left(\frac{\sqrt{2}}{2}\right)^n\left[{n \choose 0}-{n \choose 2}+{n \choose 4}-{n \choose 6}+...+(-1)^{n/2}{n \choose n}\right]=\cos(n\pi/4)$$

We just found a way, using complex number, to calculate:

$${n \choose 0}-{n \choose 2}+{n \choose 4}-{n \choose 6}+...+(-1)^{n/2}{n \choose n}$$