Artificial Intelligence 🤖
Complex numbers
Complex functions

Complex functions

For real variables, a function ff is a rule assigning a real number f(x)f(x) to an element xx of the domain of ff. A function of a complex variable (a complex function) assigns a complex number given by f(z)f(z) to a complex number zz.

Complex polynomials

A complex polynomial of degree nn is an expression of the form,

P(z)=c0+c1z+c2z2++cnznP(z)=c_{0}+c_{1} z+c_{2} z^{2}+\cdots+c_{n} z^{n}

here, ci(i=0,,nc_{i}\left(i=0, \cdots, n\right. and cn0)\left.c_{n} \neq 0\right) are complex constants and z=x+iyz=x+i y is a complex variable. The Fundamental Theorem of Algebra asserts that every nonconstant, singlevariable polynomial with complex coefficients, P(z)P(z) has at least one root. Note that this includes real polynomials since every real number is a complex number with imaginary part equal to 0 . In general, an nn degree polynomial will have nn roots (in some cases these are repeated roots so that the number of solutions is less than nn ). Moreover, any polynomial can be factorised as follows

P(z)=cn(za1)(za2)(zan)P(z)=c_{n}\left(z-a_{1}\right)\left(z-a_{2}\right) \cdots\left(z-a_{n}\right)

where a1,a2,,ana_{1}, a_{2}, \cdots, a_{n} are the (complex) roots. Even if the cic_{i} coefficients in Eq. (7.13) are real, the roots can still be complex. However, in this case, the roots occur in complex pairs, i.e. if a1a_{1} is complex, a1\overline{a_{1}} will also be a root. A simple example is

P(z)=z2+1=(zi)(z+i),P(z)=z^{2}+1=(z-i)(z+i),

where the roots z=iz=i and zˉ=i\bar{z}=-i are complex conjugates. It follows that if P(z)P(z) is a polynomial with real coefficients of degree nn and nn is odd, that there will be at least one real root.

Proof: the roots of complex polynomials with real coefficients occur in complex conjugate pairs

Suppose that aa is a root of P(z)P(z) as defined in Eq. (7.13) with real coefficients cic_{i}. Then,

P(a)=c0+c1a+c2a2++cnan=0.P(a)=c_{0}+c_{1} a+c_{2} a^{2}+\cdots+c_{n} a^{n}=0 .

Taking the complex conjugate of the above equation yields

P(a)=c0+c1aˉ+c2aˉ2++cnaˉn=0.\overline{P(a)}=\overline{c_{0}}+\overline{c_{1}} \bar{a}+\overline{c_{2}} \bar{a}^{2}+\cdots+\overline{c_{n}} \bar{a}^{n}=0 .

Since the coefficients cic_{i} are assumed to be real then

c0=c0,c1=c1, etc. \overline{c_{0}}=c_{0}, \quad \overline{c_{1}}=c_{1}, \quad \text { etc. }

Therefore, Eq. (7.16) can be written as

P(a)=c0+c1aˉ+c2aˉ2++cnaˉn=0;\overline{P(a)}=c_{0}+c_{1} \bar{a}+c_{2} \bar{a}^{2}+\cdots+c_{n} \bar{a}^{n}=0 ;

comparing Eqs. (7.15) and (7.17), we see that aˉ\bar{a} is also a root of PP.

For the case of a polynomial with real coefficients therefore, any root is real or one of a complex conjugate pair of roots. And so if a1a_{1} is a complex root, then another root, say a2a_{2} is equal to a1\overline{a_{1}}. Then

(xa1)(xa2)=(xa1)(xa1)\left(x-a_{1}\right)\left(x-a_{2}\right)=\left(x-a_{1}\right)\left(x-\overline{a_{1}}\right)

gives a real quadratic. For example, the quartic x4+x2+1x^{4}+x^{2}+1 is factorised as follows (see Example 7.3 for the factorisation),

x4+x2+1=(xeπi/3)(xeπi/3)(xe2πi/3)(xe2πi/3).x^{4}+x^{2}+1=\left(x-e^{\pi i / 3}\right)\left(x-e^{-\pi i / 3}\right)\left(x-e^{2 \pi i / 3}\right)\left(x-e^{-2 \pi i / 3}\right) .

The first two factors of Eq. (7.18) are complex conjugates of each other so their product is a real quadratic,

(xeπi/3)(xeπi/3)=x2x(eπi/3+eπi/3)+1=x22cos(π/3)1/2x+1=x2x+1\begin{aligned} \left(x-e^{\pi i / 3}\right)\left(x-e^{-\pi i / 3}\right) & =x^{2}-x\left(e^{\pi i / 3}+e^{-\pi i / 3}\right)+1 \\ & =x^{2}-2 \overbrace{\cos (\pi / 3)}^{1 / 2} x+1 \\ & =x^{2}-x+1 \end{aligned}

Similarly, (xe2πi/3)(xe2πi/3)=x2+x+1\left(x-e^{2 \pi i / 3}\right)\left(x-e^{-2 \pi i / 3}\right)=x^{2}+x+1, therefore

x4+x2+1=(x2x+1)(x2+x+1).x^{4}+x^{2}+1=\left(x^{2}-x+1\right)\left(x^{2}+x+1\right) .

In general, any real polynomial can be factorised into a product of real linear and real quadratic terms. The linear factors are associated with real roots and the quadratic factors with complex conjugate pairs of roots.

Example 7.2 Find the cube roots of 1.

Solution We are looking for roots zz with the property

z3=1z^{3}=1

Note that there are more than one ways to go about solving for the roots. Here, we choose to use DeMoivre's theorem [Eq. (7.10)]. We first express the RHS of (7.19) in polar form, reiθr e^{i \theta} where r=1=1r=|1|=1 and arg(1)=0+2kπ\arg (1)=0+2 k \pi where k=0,1,2,k=0,1,2, \cdots; this yields

z3=1[cos(2kπ)+isin(2kπ)]z^{3}=1[\cos (2 k \pi)+i \sin (2 k \pi)]

Taking the cube roots of both sides

z=cos(2kπ/3)+isin(2kπ/3)z=\cos (2 k \pi / 3)+i \sin (2 k \pi / 3)

where we have used DeMoivre's theorem. In Eq. (7.21), kk can take any integer value (including 0). Here, we expect at most 3 roots and so it is customary to choose 3 consecutive values of kk, e.g. 0,1 , and 2 . Any other value of kk yields a root that repeats one of the ones already determined. And so, for k=0k=0,

z1=1z_{1}=1

for k=1k=1,

z2=cos(2π3)+isin(2π3)=12+i32z_{2}=\cos \left(\frac{2 \pi}{3}\right)+i \sin \left(\frac{2 \pi}{3}\right)=-\frac{1}{2}+i \frac{\sqrt{3}}{2}

and for k=2k=2,

z2=cos(4π3)+isin(4π3)=12i32z_{2}=\cos \left(\frac{4 \pi}{3}\right)+i \sin \left(\frac{4 \pi}{3}\right)=-\frac{1}{2}-i \frac{\sqrt{3}}{2}

Example 7.3 Factorise the complex polynomial P(z)=z4+z2+1P(z)=z^{4}+z^{2}+1.

Solution Quartic polynomials can be difficult to solve, however, in this case P(z)P(z) can be recast as quadratic equation for z2z^{2},

(z2)2+z2+1=0\left(z^{2}\right)^{2}+z^{2}+1=0

This can be solved via the standard formula for the roots of a quadratic,

z2=1±142=1±i32z^{2}=\frac{-1 \pm \sqrt{1-4}}{2}=\frac{-1 \pm i \sqrt{3}}{2}

It is convenient to rewrite this in terms of complex exponentials,

z2=e2πi/3, or z2=e2πi/3z^{2}=e^{2 \pi i / 3}, \text { or } \quad z^{2}=e^{-2 \pi i / 3}

Next, we want to solve

z2=e2πi/3z^{2}=e^{2 \pi i / 3}

an obvious solution is z=eπi/3z=e^{\pi i / 3}. Another solution is z=e2πi/3z=e^{-2 \pi i / 3}. To see this,

z=e2πi/3z2=e4πi/3=e4πi/3e2πi1=e2πi/3.z=e^{-2 \pi i / 3} \Longrightarrow z^{2}=e^{-4 \pi i / 3}=e^{-4 \pi i / 3} \underbrace{e^{2 \pi i}}_{1}=e^{2 \pi i / 3} .

Similarly, z=eπi/3z=e^{-\pi i / 3} and z=e2πi/3z=e^{2 \pi i / 3} are solutions to z2=e2πi/3z^{2}=e^{-2 \pi i / 3}. Accordingly, the four roots of P(z)P(z) are

eπi/3,eπi/3,e2πi/3,e2πi/3e^{\pi i / 3}, e^{-\pi i / 3}, e^{2 \pi i / 3}, e^{-2 \pi i / 3}

P(z)P(z) has the factorised form

P(z)=(zeπi/3)(zeπi/3)(ze2πi/3)(ze2πi/3)P(z)=\left(z-e^{\pi i / 3}\right)\left(z-e^{-\pi i / 3}\right)\left(z-e^{2 \pi i / 3}\right)\left(z-e^{-2 \pi i / 3}\right)

or

P(z)=(z1+i32)(z1i32)(z1+i32)(z1i32),P(z)=\left(z-\frac{1+i \sqrt{3}}{2}\right)\left(z-\frac{1-i \sqrt{3}}{2}\right)\left(z-\frac{-1+i \sqrt{3}}{2}\right)\left(z-\frac{-1-i \sqrt{3}}{2}\right),

where the complex exponentials have been converted into Cartesian form (the roots are shown in the Argand diagram in Fig. 7.1).

Complex power series

As with real numbers, powers of complex numbers are defined through multiplication,

x2=zz,z3=z2z, etc. x^{2}=z \cdot z, \quad z^{3}=z^{2} \cdot z, \quad \text { etc. }

For example, if z=x+iyz=x+i y,

z2=(x+iy)(x+iy)=x2+2ixyy2.z^{2}=(x+i y)(x+i y)=x^{2}+2 i x y-y^{2} .

Negative powers can be defined by the reciprocal,

z2=1z1z,z3=1z1z1z, etc. z^{-2}=\frac{1}{z} \cdot \frac{1}{z}, \quad z^{-3}=\frac{1}{z} \cdot \frac{1}{z} \cdot \frac{1}{z}, \quad \text { etc. }

Figure 7.1: The roots from Example 7.3 shown on the Argand diagram.

Complex power series can be defined in the same way as for real numbers

n=0cnzn\sum_{n=0}^{\infty} c_{n} z^{n}

where c0,c1,,cnc_{0}, c_{1}, \cdots, c_{n} is an infinite list of complex numbers. The notion of absolute convergence and the ratio test carry through - here absolute values are replaced with the complex modulus. Such a series converges absolutely for z<R|z|<R and diverges for z>R|z|>R where RR is the radius of convergence given by a positive constant. Recall that if a power series is expanded around the point aa and the radius of convergence is RR, then the set of all points zz such that za=R|z-a|=R is a circle called the boundary of the disk of convergence (refer to Subsec. 6.2.3). We look at some examples next.

Example 1: Consider a complex series example which corresponds to the real example given in Eq. (6.49) in Chapter 6. The power series for the function f(z)=1/(1z)f(z)=1 /(1-z), expanded around z=0z=0, is simply

n=0zn\sum_{n=0}^{\infty} z^{n}

and has radius of convergence 1 (use the ratio test). The series diverges at every point on the boundary z=e2πitz=e^{2 \pi i t} with t[0,1]t \in[0,1] as limnzn=limne2πint\lim _{n} z^{n}=\lim _{n} e^{2 \pi i n t} is never zero.

Example 2: Recall the power series for f(x)=ln(1x)f(x)=-\ln (1-x) given by Eq. (6.50) in Chapter 6. The power series for g(z)=ln(1z)g(z)=-\ln (1-z), expanded around z=0z=0 is

n=11nzn\sum_{n=1}^{\infty} \frac{1}{n} z^{n}

and has radius of convergence 1 (use the ratio test) and diverges for z=1z=1 (as can be seen by inspection) but converges for all other points on the boundary. This is non-trivial to see. For any zz in the unit circle, z=e2πitz=e^{2 \pi i t} with t[0,1]t \in[0,1]. Let us apply the Dirichlet test (refer to Subsec. 6.2.2) which can be extended to complex numbers in the following form:

Theorem (Dirichlet test)

If {bn}\left\{b_{n}\right\} is a sequence of real numbers satisfying bn0b_{n} \downarrow 0 as nn \rightarrow \infty and {an}\left\{a_{n}\right\} a sequence of complex numbers that has bounded partial sums, then the series anbn\sum a_{n} b_{n} converges.

Here bn=1/nb_{n}=1 / n and an=zna_{n}=z^{n}. Clearly the first condition is satisfied. For the second one we need to have

k=1nakM\left|\sum_{k=1}^{n} a_{k}\right| \leq M

for all nn. But,

k=1nak=e2πite2πi(n+1)t1e2πit21e2πit\left|\sum_{k=1}^{n} a_{k}\right|=\left|\frac{e^{2 \pi i t}-e^{2 \pi i(n+1) t}}{1-e^{2 \pi i t}}\right| \leq \frac{2}{\left|1-e^{2 \pi i t}\right|}

which is satisfied for every z1z \neq 1 in the circle!

In conclusion, the series converges for every zz with z1|z| \leq 1 other than z=1z=1, and it diverges for z>1|z|>1.

Example 3: The power series

n=11n2zn\sum_{n=1}^{\infty} \frac{1}{n^{2}} z^{n}

has radius of convergence 1 (use ratio test) and converges everywhere on the boundary absolutely.

Complex exponential

Recall that the Maclaurin series for the exponential [see Eq. (6.20)] is valid for all real xx, i.e. R=R=\infty. Define the exponential of a complex number zz via the complex series,

ez=1+z+z22!+z33!+e^{z}=1+z+\frac{z^{2}}{2 !}+\frac{z^{3}}{3 !}+\cdots

It follows that f(z)=ezf(z)=e^{z} defines a complex function. This converges for any complex zz, i.e. R=R=\infty. Writing z=x+iyz=x+i y gives

f(z)=ex+iy=ex(cosy+isiny),f(z)=e^{x+i y}=e^{x}(\cos y+i \sin y),

using Euler's formula. Note also that the exponential obeys the addition property

ez+w=ezewe^{z+w}=e^{z} e^{w}

as for real numbers. And as for real numbers, we will use exp(z)\exp (z) and eze^{z} interchangeably. The exponential is a periodic function with period 2πi2 \pi i; from the periodicity of trigonometric functions, e2πi=1e^{2 \pi i}=1 and using Eq. (7.26), we find

ez+2πi=eze^{z+2 \pi i}=e^{z}

It follows that the complex exponential, in sharp contrast with the real exponential, is not 1 - 1. It also follows from the definition of the exponential function

ez1=ez2, if and only if z1=z2+2πki for some integer k.e^{z_{1}}=e^{z_{2}}, \quad \text { if and only if } \quad z_{1}=z_{2}+2 \pi k i \text { for some integer } k .

The periodicity of the exponential function results in the complex logarithm (see below) being multivalued.

Complex sine and cosine

We have already seen in Eqs. (7.11) and (7.12) how the cosine and sine functions can be expressed in terms of exponentials. In Eqs. (7.11) and (7.12), θ\theta is taken to be real. The definitions can be extended to any complex number zz :

cosz=eiz+eiz2,sinz=eizeiz2i\cos z=\frac{e^{i z}+e^{-i z}}{2}, \quad \sin z=\frac{e^{i z}-e^{-i z}}{2 i}

On the multivaluedness of the complex logarithm

We have seen that for real numbers, the natural logarithm is the inverse function of the exponential so that exp(lnx)=x\exp (\ln x)=x. In contrast with the real logarithm function which is only defined for positive real numbers, the complex logarithm is defined for all nonzero complex numbers, but at a price: the function is not single-valued. This has to do with the periodicity (7.27) or, equivalently, with the multivaluedness of the argument,arg(z)\operatorname{argument}, \arg (z) (recall that unlike Arg(z)\operatorname{Arg}(z) which is single-valued, arg(z)\arg (z) is not because for a given complex number zz, the number arg(z)\arg (z) represents an infinite number of possible values).

By analogy with the real natural logarithm, we define the complex logarithm as an inverse to the complex exponential function, exp(lnz)=z\exp (\ln z)=z. In other words, we say that a logarithm of a nonzero complex number zz, is any complex number ww such that ew=ze^{w}=z. We define the function lnz\ln z by

w=lnz if ew=z.w=\ln z \text { if } e^{w}=z .

From the periodicity (7.27) of the exponential function it follows that if w=lnzw=\ln z so is

w+2πikw+2 \pi i k

for any integer kk, i.e. if w=lnzw=\ln z we also have w+2πik=lnzw+2 \pi i k=\ln z. Therefore we see that lnz\ln z is a multivalued function 15{ }^{15}.

Consider now the polar form z=reiθz=r e^{i \theta}. This can be rewritten as z=exp[ln(reiθ)]z=\exp \left[\ln \left(r e^{i \theta}\right)\right] by direct substitution in Eq. (7.29) which gives,

z=exp(lnr+iθ)z=\exp (\ln r+i \theta)

Taking logarithms on both sides

lnz=lnr+iθ\ln z=\ln r+i \theta

15{ }^{15} Be careful here as there could be a misconception: we keep on adding 2π2 \pi to ww and we get the same lnz\ln z so if we were to view lnz\ln z as a function of ww it appears to be single-valued, much like y=sinxy=\sin x is single-valued: we can add 2π2 \pi to xx and we come back to the same yy. The problem with this reasoning is viewing lnz\ln z as a function of ww. We have to look at f(z)=lnzf(z)=\ln z as a function of zz. This function maps zz to lnz\ln z, much like f(x)=lnxmapsxf(x)=\ln x \operatorname{maps} x to lnx\ln x. Let us try again: z=ewz=e^{w} is single-valued and behaves like y=sinxy=\sin x, i.e. adding 2π,4π,2 \pi, 4 \pi, \ldots to ww gives the same zz. But precisely for this reason, the inverse function w=lnzw=\ln z is not single-valued. Now for the same zz we have infinite many ww 's! So let us now look at lnz=lnr+iθ\ln z=\ln r+i \theta. If we view lnz\ln z as a function of θ\theta it would appear that lnz\ln z is single-valued. But in fact we have to look at lnz\ln z as a function of zz. Adding 2πk2 \pi k to θ\theta brings us back to the same zz in the complex plane (after all z=reiθz=r e^{i \theta} is not affected by adding 2πk2 \pi k to θ\theta ), but it changes the value of lnz\ln z : for the same zz we have infinitely many possible values of lnz\ln z ! The function is multivalued. where rr and θ\theta are real. As θ\theta is ambiguous (adding 2π2 \pi to θ\theta does not change z=reiθz=r e^{i \theta} ), so is lnz\ln z. Using the modulus and argument of zz, the complex logarithm can also be written in the form

lnz=lnz+iarg(z)\ln z=\ln |z|+i \arg (z)

where the ambiguity in the imaginary part is manifest. Clearly if θ=argz\theta=\arg z then so is θ+2πk\theta+2 \pi k for any integer kk. From (7.31), we now see that lnz\ln z is multivalued because its imaginary part is multivalued 16{ }^{16}. As with argz\arg z, the ambiguity may be removed by restricting the range of θ\theta. One can also define the principal value of the logarithm (denoted by Ln) by

Lnz=lnz+iArgz\operatorname{Ln} z=\ln |z|+i \operatorname{Arg} z

with π<Arg(z)π-\pi<\operatorname{Arg}(z) \leq \pi as we saw in Subsec. 7.1.1. Note that Ln 0 is left undefined since there is no complex number zz satisfying ez=0e^{z}=0. Further, the function Lnz\operatorname{Ln} z is discontinuous on the negative real axis; such discontinuities are called branch cuts. A branch cut is a curve in the complex plane across which a multivalued function is discontinuous. We explain the notion of branch cuts next by considering the complex logarithm.

Going back to Eq. (7.30), we note that the definition is fine for every point except 0 since the ln function has a singularity at that point. This is not the main concern here though. Consider going in a loop around the origin as in the unit circle below.

We see that,

ln(1)=lneπi=πi,ln(i)=lneπi/2=πi/2,ln(1)=0.\ln (-1)=\ln e^{-\pi i}=-\pi i, \quad \ln (-i)=\ln e^{-\pi i / 2}=-\pi i / 2, \quad \ln (1)=0 .

Now, we start coming back around the circle toward -1 . If we get very close to -1 , the complex logarithm gets very close to

lneπi=πiπi\ln e^{\pi i}=\pi i \neq-\pi i

and so the function, as defined, is not continuous. Indeed, any time we go in a loop around the origin, anticlockwise, we change the value by 2πi2 \pi i (going in a loop around the origin clockwise, we change the value by 2πi-2 \pi i ). To deal with this, we cut the plane along a line starting at the origin (this can be the negative real axis as shown with the red line in the figure below). The origin is known as the branch point.

16{ }^{16} Recall the point we made earlier: the multivaluedness of lnz\ln z has to do with the periodicity the exponential or, equivalently, with the multivaluedness of the argument.

We can then define the complex logarithm everywhere else apart from the points on that line; this is known as a branch cut. With branch cuts, we can now define the complex logarithm on any suitably cut plane. The definition is unique up to a factor of 2πik(k2 \pi i k(k \in Z)\mathbb{Z}). For two functions f(z)f(z) and g(z)g(z) we have

ef(z)=eg(z)=z,e^{f(z)}=e^{g(z)}=z,

i.e. they are inverses of the exponential function where f(z)=g(z)+2πikf(z)=g(z)+2 \pi i k. For different integer kk, we obtain various functions ff, known as the branches of the complex logarithm. It follows that we can make the logarithm function single-valued in various regions of the complex plane by choosing a different branch of the argument function. For instance, we may choose 0Arg(z)<2π0 \leq \operatorname{Arg}(z)<2 \pi as the principal value of the argument of zz instead of π<Arg(z)π-\pi<\operatorname{Arg}(z) \leq \pi chosen in Subsec. 7.1.1. Again, the principal argument is single-valued but it is now discontinuous along the positive real axis. With this definition, the branch cut for the complex logarithm is along the real positive axis and, again, the origin is a branch point.

The multivaluedness discussed above raises of course some questions. In particular, whether or not earlier examples of complex functions we have seen involved multivaluedness and hence there is a need for branch cuts too. The answer is: they did not. As representative, consider f(z)=z2=r2ei2θf(z)=z^{2}=r^{2} e^{i 2 \theta}. In the absence of a cut it is true that θ\theta is multivalued. But the crucial point is that this does not lead to multivaluedness of the function, since

ei2(θ+2πn)=ei2θei4πn=ei2θe^{i 2(\theta+2 \pi n)}=e^{i 2 \theta} e^{i 4 \pi n}=e^{i 2 \theta}

for all nn 's as seen earlier in this section. The same is true for sinz,ez,cosz/z\sin z, e^{z}, \cos z / z, and so on. The only cases that we encounter where the function is multivalued, and hence a branch cut is needed, are ln(za)\ln (z-a), non-integer powers of (za)(z-a) (see below), and inverse complex trigonometric functions.

Powers

If z=reiθz=r e^{i \theta} we have lnz=lnr+iθ\ln z=\ln r+i \theta which is defined up to integer values of 2πi2 \pi i. Therefore,

zn=rneinθ=exp[n(lnr+iθ)]=exp(nlnz),z^{n}=r^{n} e^{i n \theta}=\exp [n(\ln r+i \theta)]=\exp (n \ln z),

where we have used Eq. (7.30). For integer nn, the ambiguity in lnz\ln z drops out since

exp[n(lnz+2πi)]=exp(nlnz)exp(2nπi)1=zn.\exp [n(\ln z+2 \pi i)]=\exp (n \ln z) \underbrace{\exp (2 n \pi i)}_{1}=z^{n} .

Now, suppose n=pn=p where pp is not an integer; then

zp=exp(plnz)z^{p}=\exp (p \ln z)

but like lnz\ln z itself, this is ambiguous. The ambiguity in zpz^{p} can be removed by fixing the ambiguity in lnz\ln z. For example, choose

zp=exp(pLnz)z^{p}=\exp (p \operatorname{Ln} z)

This, like Lnz\operatorname{Ln} z is discontinuous on the negative real axis.