[Math] Applications of complex numbers to solve non-complex problems

applicationsbig-listcomplex numberssoft-question

Recently I asked a question regarding the diophantine equation $x^2+y^2=z^n$ for $x, y, z, n \in \mathbb{N}$, which to my surprise was answered with the help complex numbers. I find it fascinating that for a question which only concerns integers, and whose answers can only be integers, such an elegant solution comes from the seemingly unrelated complex numbers – looking only at the question and solution one would never suspect that complex numbers were lurking behind the curtain!

Can anyone give some more examples where a problem which seems to deal entirely with real numbers can be solved using complex numbers behind the scenes? One other example which springs to mind for me is solving a homogeneous second order differential equation whose coefficients form a quadratic with complex roots, which in some cases gives real solutions for real coefficients but requires complex arithmetic to calculate.

(If anyone is interested, the original question I asked can be found here: $x^2+y^2=z^n$: Find solutions without Pythagoras!)

EDIT:

I just wanted to thank everyone for all the great answers! I'm working my way through all of them, although some are beyond me for now!

Best Answer

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.