Recently I asked a question regarding the diophantine equation x2+y2=zn for x,y,z,n∈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: x2+y2=zn: 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!

**Answer**

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

∫γf(z)dz=2πi∑kRes(f;zk)

where f is an analytic function with only finitely many isolated singularities zk inside a closed curve γ 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 γ to be semicircular contours, we can immediately compute the real integral ∫∞−∞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|→∞).

This typical contour γ appears as:

where j is an isolated singularity of f(z) and we take a→∞.

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

∫∞−∞dx(1+x2)2

Defining f(z):=1(1+z2)2=1(z+i)2(z−i)2 where z∈C, and the complex contour γa to be the semicircle in the upper-half plane, we have by the Residue Theorem:

∫γaf(z)dz=2πiRes(f;i)=2πi4i=π2

Now, noting that as |z|→∞,|f(z)|→0, so

π2=lima→∞∫γaf(z)dz=lima→∞(∫a−af(x)dx+∫|z|=a,θ∈[0,π]f(z)dz)=∫∞−∞f(x)dx

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

**Attribution***Source : Link , Question Author : acernine , Answer Author : NoseKnowsAll*