Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I was just looking at a calculus textbook preparing my class for next week on complex numbers. I found it interesting to see as an exercise a way to calculate the usual freshman calculus integrals $\int e^{ax}\cos{bx}\ dx$ and $\int e^{ax}\sin{bx}\ dx$ by taking the real and imaginary parts of the "complex" integral $\int e^{(a + bi)x} \ dx$.

So my question is if you know of other "relatively interesting" results that can be obtained easily by using complex numbers.

It may be something that one can present to engineering students taking the usual calculus sequence, but I'm also interested in somewhat more advanced examples (if they're available under the condition that the process to get them is somewhat easy, or not too long). Thank you all.

share|improve this question
I suppose this needs to be made community wiki but I have no idea of how to do that. –  Adrián Barquero Sep 18 '10 at 23:56
edit the question and check the Community Wiki checkbox you'll find somewhere on that page. –  Mariano Suárez-Alvarez Sep 19 '10 at 0:07
Thanks Mariano, I hadn't seen that before. –  Adrián Barquero Sep 19 '10 at 0:13
«The shortest path between two truths in the real domain passes through the complex domain. » Jacques Hadamard dixit. And he surely knew what he was talking about! –  Mariano Suárez-Alvarez Sep 19 '10 at 0:21
The first chapter of Visual Complex Analysis by Tristan Needham has some fantastic answers to this question. –  Zach Conn Sep 19 '10 at 12:20
show 1 more comment

19 Answers

up vote 40 down vote accepted

There are too many examples to count. Let me just mention one that is particularly concrete: how many subsets of an $n$-element set have a cardinality divisible by $3$ (or any positive integer $k$)? In other words, how do we evaluate

$$\sum_{k=0}^{\lfloor \frac{n}{3} \rfloor} {n \choose 3k}$$

in closed form? Although the statement of this problem does not involve complex numbers, the answer does: the key is what is known in high school competition circles as the roots of unity filter and what is known among real mathematicians as the discrete Fourier transform. Starting with the generating function

$$(1 + x)^n = \sum_{k=0}^n {n \choose k} x^k$$

we observe that the identity

$$1 + \omega^k + \omega^{2k} = \begin{cases} 3 \text{ if } 3 \mid k \\\ 0 \text{ otherwise} \end{cases}$$

where $\omega = e^{ \frac{2 \pi i}{3} }$ is a primitive third root of unity implies that

$$\sum_{k=0}^{ \lfloor \frac{n}{3} \rfloor} {n \choose 3k} = \frac{(1 + 1)^n + (1 + \omega)^n + (1 + \omega^2)^n}{3}.$$

Since $1 + \omega = -\omega^2$ and $1 + \omega^2 = - \omega$, this gives

$$\sum_{k=0}^{ \lfloor \frac{n}{3} \rfloor} {n \choose 3k} = \frac{2^n + (-\omega)^n + (-\omega^2)^n}{3}.$$

This formula can be stated without complex numbers (either by using cosines or listing out cases) but both the statement and the proof are much cleaner with it. More generally, complex numbers make their presence known in combinatorics in countless ways; for example, they are pivotal to the theory of asymptotics of combinatorial sequences. See, for example, Flajolet and Sedgewick's Analytic Combinatorics.

share|improve this answer
Wow!!! This is a really nice example. –  Adrián Barquero Sep 19 '10 at 3:00
@Adrián Barquero: the effects are more subtle if 3 is replaced by a larger number, but still pronounced. If 3 is replaced by d the answer is asymptotically 2^n/d, but the error in this approximation is controlled by the largest of the terms among (1 + zeta^i)^n where zeta is a primitive dth root of unity. In other words, these terms matter whether or not you believe that complex numbers exist. –  Qiaochu Yuan Sep 19 '10 at 4:08
add comment

Without complex numbers, it's a mystery why the power series for $1/(1+ x^2)$ centered at the origin has radius of convergence 1. The function is infinitely differentiable, no strange behavior at 1 or -1, etc.

But in the complex domain, there are singularities at $\pm i$ which explains why the radius of convergence is 1.

share|improve this answer
Thanks John, this is a good example. –  Adrián Barquero Sep 19 '10 at 1:24
@Adrian: this is termed the "Runge phenomenon" in numerics circles; one practical thing to get from this is that just because a (real) function is smooth everywhere does not necessarily imply it can be approximated well by a polynomial. Any poles in the complex plane can and will affect the quality of any attempt at approximating a function. –  J. M. Sep 19 '10 at 2:40
I learned about it only recently, and it seems a very nice result to me. –  Pandora Sep 19 '10 at 14:19
add comment

As Dylan Wilson comments in Byron's link, you can derive most of trigonometric identities thanks to Euler's formula:

$$ e^{i\theta} = \cos \theta + i \sin \theta \ . $$

For instance, I never could learn by heart the formula for the cosine or the sine of the sum of two angles, but on one hand

$$ e^{i(\alpha + \beta)} = e^{i\alpha} \cdot e^{i\beta} = (\cos\alpha \cos\beta -\sin\alpha\sin\beta) + i (\sin\alpha\cos\beta + \cos\alpha \sin\beta) \ . $$

And on the other hand:

$$ e^{i(\alpha + \beta)} = \cos(\alpha + \beta) + i\sin(\alpha + \beta) \ . $$


$$ \cos(\alpha + \beta) = \cos\alpha \cos\beta -\sin\alpha\sin\beta $$


$$ \sin(\alpha + \beta) = \sin\alpha\cos\beta + \cos\alpha \sin\beta \ . $$

share|improve this answer
oh my gosh. this whole time? –  Justin L. Sep 19 '10 at 7:56
I don't like memorizing formulae either. +1 :D –  J. M. Sep 19 '10 at 9:32
It just makes life that much simpler :) –  Dylan Wilson Sep 21 '10 at 19:08
Just FYI: The angle sum/difference formulas for sine and cosine can be relatively-easily remembered by this cheer: "sine cosine SIGN cosine sine! / cosine cosine CO-SIGN sine sine!" (In hyperbolic trig, replace "CO-SIGN" with "SIGN".) –  Blue Jan 24 '13 at 3:34
@Blue Its better to remember them by repeatedly using it rather than those silly cheers. –  Sawarnik Mar 6 at 22:22
add comment

I came across this slick proof of Heron's formula on artofproblemsolving.com the other day. Heron's formula yields the area of a triangle given the lengths of its three sides: $$A = \sqrt{s(s-a)(s-b)(s-c)}$$ where $ s = \frac{1}{2}(a+b+c)$. The entire proof, by high schooler Miles Dillon Edwards, is reproduced here.

alt text

Let $I$ be the center of the incircle of $\triangle ABC$. Let $a = y + z$, $b = x + z$, and $c = x + y$ be the lengths of the sides opposite $A$, $B$, and $C$, respectively, and let $s = x + y + z$ be the semiperimeter of the triangle. Clearly $2 \alpha + 2 \beta + 2 \gamma = 2\pi$, so $\alpha + \beta + \gamma = \pi$. Now notice that $$(r + ix)(r + iy)(r + iz) = (u e^{i \alpha})(v e^{i \beta})(w e^{i \gamma}) = u v w e^{i(\alpha+\beta+\gamma)} = u v w e^{\pi i} = −uvw.$$ Therefore $$0 = \text{Im}[(r + ix)(r + iy)(r + iz)] = r^2(x + y + z) − xyz,$$ so $$r = \sqrt{\frac{x y z}{x + y + z}} = \sqrt{\frac{(s-a)(s-b)(s-c)}{s}}$$. Thus the area of $\triangle ABC$ is $$\frac{r a}{2} + \frac{r b}{2} + \frac{r c}{2} = r s = \sqrt{s(s-a)(s-b)(s-c)}$$

share|improve this answer
Neat and slick, +1. –  Soham Chowdhury Apr 4 '13 at 5:04
add comment

I'd like to mention another combinatorial result, this time about asymptotics. Let $a_n$ denote the number of ways that $n$ horses can finish in a race (with ties); in other words, $a_n$ is the number of "lists of (nonempty) sets" with $n$ total members. Generating function methods allow you to deduce that

$$A(z) = \sum_{n=0}^{\infty} \frac{a_n}{n!} z^n = \frac{1}{1 - (1 - e^z)} = \frac{1}{2 - e^z}.$$

This function is meromorphic, so the asymptotic behavior of $a_n$ is controlled by its poles. The dominant pole occurs at $z = \ln 2$ with residue $-\frac{1}{2}$, which means that the asymptotic behavior of $a_n$ is given by

$$\frac{a_n}{n!} \approx \frac{1}{2 (\ln 2)^{n+1}}.$$

So far, so real-variable. Where do complex numbers come in? The error in this approximation is controlled by the remaining poles of $A(z)$, all of which are complex. The next two most dominant poles are at $\ln 2 \pm 2 \pi i$ with the same residue, which means that the asymptotic behavior of the error is given by

$$\frac{a_n}{n!} - \frac{1}{2 (\ln 2)^{n+1}} \approx \frac{1}{2 (\ln 2 + 2 \pi i)^{n+1}} + \frac{1}{2 (\ln 2 - 2 \pi i)^{n+1}}.$$

Letting $\frac{1}{\ln 2 + 2 \pi i} = r e^{i \theta}$ where $r = \frac{1}{\sqrt{(\ln 2)^2 + 4 \pi^2}}$ and $\theta = -\arctan \frac{2 \pi}{\ln 2}$, it follows that

$$\frac{a_n}{n!} - \frac{1}{2(\ln 2)^{n+1}} \approx r^{n+1} \cos (n+1)\theta.$$

In other words, the error in the above approximation is quasi-periodic. (Of course there are infinitely many poles, each pair of which also contributes quasi-periodic terms, but as $n$ becomes large these terms become less and less important, most of the time.) This is a phenomenon you can easily see for yourself by actually computing the error for several consecutive values of $n$.

So think about this: even if you correctly guessed the asymptotic behavior of $a_n$ (for instance by making a table of the values $\frac{a_n}{n!}$ (or its inverse, if you are interested in the probability that there are no ties in the race) and noticing that the number of digits grows linearly), and even if you computed experimentally that the error in the approximation is quasi-periodic, how on earth could you possibly have deduced the value of either $r$ or $\theta$ without complex numbers?

share|improve this answer
add comment

The useful identity

$$ \frac{1}{2} + \cos x + \cos 2x + \cdots + \cos nx = \frac{\sin (n+x/2)}{2 \sin (x/2)}$$

which appears in the study of Fourier series is most easily proven by replacing every $\cos(kx)$ on the left-hand side with $$\cos(kx)=\frac{e^{ikx}+e^{-ikx}}{2}$$ and applying the formula for the sum of the geometric series.

share|improve this answer
add comment

A result that might be particularly suitable to students in a calculus sequence is complex partial fraction decomposition. Over the real numbers, you get denominators with both linear and quadratic factors, but over the complex numbers, algebraic closure means you only have to think about linear factors. For example, since

$$\frac{1}{1 + x^2} = \frac{1}{2} \left( \frac{1}{1 + ix} + \frac{1}{1 - ix} \right)$$

it follows that

$$\int \frac{1}{1 + x^2} dx = \frac{1}{2} \left( i \log(1 - ix) - i \log(1 + ix) \right).$$

(It turns out that this function is just the arctangent in disguise.) So complex numbers give you a simple algorithm which you can use, in principle, to integrate any rational function. For example, in this recent math.SE thread it is shown that

$$\frac{1}{1 - x^n} = \frac{1}{n} \left( \sum_{k=0}^{n-1} \frac{1}{1 - \zeta^k x} \right)$$

where $\zeta = e^{ \frac{2 \pi i}{n} }$ is a primitive $n^{th}$ root of unity. This implies that

$$\int \frac{1}{1 - x^n} dx = \frac{1}{n} \left( \sum_{k=0}^{n-1} -\zeta^{-k} \log (1 - \zeta^k x) \right).$$

Not an integral most students would suspect is expressible in closed form! The analogous computation of $\int \frac{1}{1 + x^n} dx$ would even allow you to express the sum $\sum_{k=0}^{\infty} \frac{(-1)^k}{kn+1}$ in closed form (which is just the definite integral from $0$ to $1$). These examples illustrate another application of the discrete Fourier transform, but the method I'm describing here is totally general.

share|improve this answer
This is a great example; I remember T mentioning somewhere here that algorithms that have to be restricted to real variables are often clunky compared to algorithms that allow complexes. –  J. M. Sep 20 '10 at 22:10
add comment

I know of several ways to prove the Fundamental Theorem of Algebra using only basic tools from complex analysis. Suppose $P(z)$ is a non-constant polynomial. $|P(z)|$ is large outside of a large disk, and inside that disk since $1/P(z)$ is analytic, $1/|P(z)|$ is bounded by the maximum it has on the boundary. Thus $1/P(z)$ is a bounded analytic function on the whole plane so by Liouville's Theorem it is constant, a contradiction. Thus $P(z)$ has a zero somewhere.

This really only uses the fact that polynomials are analytic, and analytic functions satisfy the maximum principle. Liouville's Theorem takes a little more work, but should be covered in any first complex analysis course.

share|improve this answer
add comment

alt text

Theorem: The line segments joining the centers of opposite squares are perpendicular and of equal length.


Let $2a,2b,2c,2d$ be complex numbers running along the edges of the quadrilateral.

Condition for quadrilateral to close up is

$a + b + c + d = 0$

Let origin be at vertex where $2a$ begins


$p = a + ia$ i.e. $a$ + ($a$ rotated though 90 degrees)
$ q = 2a + (1+i)b$
$r = 2a + 2b + (1+i)c$
$ s = 2a + 2b + 2c + (1+i)d$

$A = s-q$ and $B = r - p$

we want to show that A and B are perpendicular and equal i.e. $B = iA$

$A + iB = (a+b+c+d) + i(a+b+c+d) = 0 $ since $a + b + c + d = 0$

This image, theorem, proof and everything is taken from Visual Complex Analysis by Tristan Needham.[One of the Best Books. Highly Recommended.]

share|improve this answer
I would simply say: "Wow!" (But this machine tells me that I must write at least 15 characters.) –  a.r. Sep 24 '10 at 7:24
+1 Very nice indeed! I guess I'll have to buy Tristan Needham's book. –  Adrián Barquero Sep 24 '10 at 14:58
add comment

Yet another example close to my heart: one of the hundred-dollar hundred-digit problems asked for the value of

$$I=\lim_{\varepsilon\to 0} \int_{\varepsilon}^1 \frac1{t}\cos\left(\frac{\ln\;t}{t}\right) \mathrm{d}t$$

One solution was to transform it into an oscillatory integral with infinite limit, but the slickest solution to this problem was to use a contour in the complex plane that side-stepped the numerical difficulties with having an oscillatory integrand:

$$I=\Re\left(\int_0^1 t^{i/t-1} \mathrm{d}t\right)$$

and by using an appropriate contour, even the humble trapezoidal rule suffices to handle the integral.

share|improve this answer
P.S. The Hadamard quote Mariano gave in the comments is in fact mentioned in the chapter of the book about this problem set. –  J. M. Sep 19 '10 at 2:41
For a Mathematica demonstration, compare Timing[NIntegrate[ProductLog'[t] Cos[t], {t, 0, Infinity}, Method -> Oscillatory, WorkingPrecision -> 20]] and Timing[Re[NIntegrate[(t + I t(1 - t))^(I/(t + I t(1 - t)) - 1)(1 + I(1 - 2t)), {t, 0, 1}, WorkingPrecision -> 20]]] –  J. M. Sep 19 '10 at 3:21
add comment

The prime number theorem can be proved without complex analysis, but the elementary proof is generally considered much more difficult than the standard one (which deduces it from analytic properties of the zeta-function).

I don't know if Dirichlet's theorem on primes in arithmetic progressions can be proved without complex analysis (one special case can using cyclotomic polynomials), but the analytic proof is the only one I've seen. Edit: Adrian below says that you can avoid complex analysis, but it won't look as nice. KCd has given references to specific papers. In either case, note that the analytic proof chronologically preceded the elementary one.

share|improve this answer
I think that Dirichlet's Theorem can in fact be proved without using complex analysis. I quote here the comments at the beginning of chapter 16 of Ireland and Rosen's Number Theory book, where they prove Dirichlet's theorem: "For the most part we will use only basic calculus. However, in section 6 where we discuss the value of the L-functions at 1 we use complex function theory in an essential way. This can be avoided, but to do so involves sacrificing both depth and elegance." Although I do not have a reference for a proof that avoids complex analysis =S –  Adrián Barquero Sep 19 '10 at 2:02
@Adrian: Thanks! I've edited the post accordingly. –  Akhil Mathew Sep 19 '10 at 4:30
Ireland and Rosen is not the right citation, since what they do is not in the spirit of elementary proofs of the prime number theorem. After elementary proofs of the prime number theorem were given by Selberg and Erdos in 1949, a similar elementary proof of Dirichlet's theorem was provided by Harold Shapiro. See Annals of Math. 52 (1950), 217--230 and 231--243. Shapiro also gave an elementary proof of the prime ideal theorem (Comm. Pure and Appl. Math 2 (1949), 309--323). –  KCd Sep 19 '10 at 5:51
@KCd I wasn't saying that Ireland and Rosen gave such an "elementary" proof, just that they do mention the existence of a proof that does not use complex analysis, to which you have now provided some references. –  Adrián Barquero Sep 19 '10 at 5:58
add comment

I just remembered something that at the moment seemed pretty nice to me. Usually in an elementary number theory course one is taught that the integer solutions to the diophantine equation $x^2 + y^2 = z^2$ are given by the formulas $x = a^2 - b^2$, $y = 2ab$ and $z = a^2 + b^2$. By working in a naive way in the ring of Gaussian integers $\mathbb{Z}[i] = \{ a + bi \mid a, b \in \mathbb{Z} \}$ one can get these formulas without much effort.

We factor the equation as

$$ (x + iy)(x - iy) = z^2 $$

Then since the right hand side is a square, the two factors on the left must be squares of numbers in $\mathbb{Z}[i]$ so for instance

$$ x + iy = (a + bi)^2 $$

and squaring this gives

$$ x + iy = a^2 - b^2 + 2abi $$

Now equating real and imaginary parts shows that $x = a^2 - b^2$ and $y = 2ab$. From this one easily gets $z = a^2 + b^2$. Of course all of these manipulations need some more details but it would make for a nice example after the formulas have been derived in the usual way (without complex numbers).

share|improve this answer
add comment

There are tons of applications of complex numbers in places you would not expect. Number theory is one, for example. This example is from The Art and Craft of Problem Solving by Zeitz.

Proposition: If $m$ and $n$ are integers that can be written as the sum of two squares, then $mn$ can also be written as the sum of two squares.

Proof: Let $m=a^2+b^2$ and $n=c^2+d^2$ and define $z=(a+bi)(c+di)$. Then $|z|^2=|a+bi|^2 |c+di|^2=mn$. Since $\Re(z)=ac-bd$ and $\Im(z)=bc+ad$ are both integers and $|z|^2$ equals the sum of the squares of its real and imaginary components, then $|z|^2=mn$ is the sum of two squares.

share|improve this answer
add comment

If you feel like picking up a good book on this topic, "Dr. Euler's Fabulous Formula" by Nahin provides many beautiful applications of complex numbers to other parts of mathematics (he is an electrical engineer).

share|improve this answer
Thank you jericson. The book looks interesting, and I also found another book of related interest by the same author amazon.com/dp/0691146004/ref=rdr_ext_sb_ti_sims_1 –  Adrián Barquero Sep 19 '10 at 1:33
Yes I have not read that one but I know it is popular as well –  jericson Sep 19 '10 at 2:13
add comment

Since one of my interests is the geometry of plane curves, the examples I'll be giving reflect this.

In particular, a lot of manipulative advantages occur when using the Argand form of a plane curve $z=f(t)+ig(t)$ instead of the parametric form $(x\;\;y)=(f(t)\;\;g(t))$: translation is the addition of an appropriate complex quantity, rotation corresponds to a multiplication by a factor $\exp(i\theta)$, and compare the formula for the curvature of a parametric curve (formula 13 here) with the formula for the curvature for a curve in Argand form:


I'll stop here, because at this point I should refer you to Zwikker's "Advanced Plane Geometry", it's an oldie but goodie.

share|improve this answer
You're right, the formula looks way better in this form =P –  Adrián Barquero Sep 19 '10 at 2:10
add comment

The Cauchy integral formula's are pretty easy to prove from the Cauchy-Riemann equation, especially if your class already knows Green's theorem. I think these are my favorite "easily achieved results"; because these formula's are central to complex analysis, the proof's are rather easy, and the applications are extremely powerful.

If you are discussing complex numbers in a calculus class, it seems natural to discuss applications to integration theory in my opinion.

share|improve this answer
add comment

Any complex number can be written as $$z=x+iy = Re^{i \theta} \qquad x, y, R, \theta \in \mathbb R$$

and we find $$z_0z_1=(x_0+iy_0)(x_1+iy_1)=R_0R_1e^{i(\theta_0+\theta_1)}$$

i.e. the magnitude of a product of two complex numbers has the product of the magnitudes but its argument is the sum of the arguments. Noting $(1+2i)$ and $(1+3i)$ have arguments of $\arctan 2$ and $\arctan 3$ respectively, we have

$$\arctan 2+\arctan 3 = \arg ((1+3i)(1+2i)) =arg(-5-5i)= \frac{3 \pi}{4}$$

We may generalize this to

$$\arctan a +\arctan b = \arg ((1+ai)(1+bi)) = \arctan\left(\frac{a+b}{1-ab}\right)$$

share|improve this answer
add comment

We can use complex numbers to find polynomials that suffice trigonometric values, that may be used to obtain a closed form with radicals, if one exists. Let us below find $\sin \left(\frac{\pi}{5}\right) =s$, and $\cos \left(\frac{\pi}{5}\right) =c$,

By De Moivre:

$$(c+is)^5 = \cos \pi + i \sin \pi = -1$$

$$-1 =(c+is)^5 = c^5+5 i c^4 s-10 c^3 s^2-10 i c^2 s^3+5 c s^4+i s^5$$

Take the imaginary part and using the Pythagorean trigonometric identity:

$$0 = 5 c^4 s-10 c^2 s^3+s^5 = 5 (1-s^2)^2 s-10 (1-s^2) s^3+s^5 = s(5 -20 s^2+16 s^4)$$

$s \neq 0$ and $\sin\left(\frac \pi 4\right) =\frac{1}{\sqrt 2} >s > 0$ so

$$0=5 -20 s^2+16 s^4 \implies \\ \sin \left(\frac{\pi}{5}\right) = \frac{1}{2} \sqrt{\frac{1}{2} (5-\sqrt{5}}) \implies \\ \cos \left(\frac{\pi}{5}\right) = \sqrt{1-s^2}= \frac{1+\sqrt{5}}{4}$$

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.