Interesting results easily achieved using complex numbers 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.
 A: 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.
A: 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.
A: You might get some ideas from this MathOverflow thread:
https://mathoverflow.net/questions/30156/demystifying-complex-numbers/30185
A: 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.
A: 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).
A: 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.
A: 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.
A: 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).
A: 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.

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)}$$
A: 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.
A: 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.
A: 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) \ .
$$
So
$$
\cos(\alpha + \beta) = \cos\alpha \cos\beta -\sin\alpha\sin\beta
$$
and
$$
\sin(\alpha + \beta) = \sin\alpha\cos\beta + \cos\alpha \sin\beta \ .
$$
A: 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:
$$\kappa=\frac{\Im(\bar{z}^{\prime}z^{\prime\prime})}{|z^{\prime}|^3}$$
I'll stop here, because at this point I should refer you to Zwikker's "Advanced Plane Geometry", it's an oldie but goodie.
A: 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.
A: 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)$$
A: 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}$$
A: 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?  
A: The useful identity
$$ \frac{1}{2} + \cos x + \cos 2x + \cdots + \cos nx = \frac{\sin (nx+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. 
A: 
Theorem:
The line segments joining the centers of opposite squares are perpendicular and of equal length.
Proof:
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 
so
$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.]
A: The spectral theorem for symmetric matrices. A symmetric matrix $A$ is Hermitian when considered as a complex matrix, so by the spectral theorem for Hermitian matrices it has eigenvectors; alternatively, apply the fundamental theorem of algebra to the characteristic polynomial to show that $A$ has at least one (potentially complex) eigenvector.  Either way, $A$ has an eigenvector $v$ with eigenvalue $c$. Rewrite $v$ as $v$ = $x+iy$, where $x$ and $y$ are vectors with real components. Then 
$$cx+icy=cv=Av=A(x+iy)=Ax+iAy$$
Since $c$ is real by Hermitian-ness, this implies $Ax=cx$ and $Ay=cy$. Since $v$ is non-zero, at least one of $x$ and $y$ is non-zero, so we've shown that A, considered as a real matrix, has at least one eigenvector. Symmetric-ness shows that $A$ is invariant on $v^\perp$, so the analysis can be repeated on $v^\perp$, and so on until an orthonormal basis of eigenvectors is obtained.
