MATH-334 · Lesson 5 of 12 · 24 min

Elementary functions: exponential, logarithm, powers and branches

Polynomials and rational functions are analytic but limited. To do serious work we need the complex exponential, the trigonometric and hyperbolic functions, the logarithm and complex powers. Extending these from the real line is not a matter of taste: as lesson 9 will show, an analytic function is determined by its values on any segment, so there is at most one analytic extension of \(e^x\) to the plane. The surprises come from the inverse functions. Because the complex exponential is periodic, its inverse, the logarithm, is many-valued, and making it single-valued forces us to cut the plane along a branch cut. Understanding branches is essential for everything from contour integrals with \(\sqrt{z}\) in lesson 11 to the conformal maps of lesson 12.

The exponential

For \(z = x + iy\) define

\[e^z = e^x(\cos y + i\sin y).\]

Lesson 4 showed this is entire and equal to its own derivative. Its properties follow from those of the real exponential and of sine and cosine:

\(e^{z + w} = e^z e^w\) for all \(z, w\), by the addition formulas for sine and cosine. \(|e^z| = e^x\) and \(\arg e^z = y\), so \(e^z\) is never 0. On the real axis it is the familiar \(e^x\), and on the imaginary axis it gives Euler's formula \(e^{iy} = \cos y + i\sin y\). Most strikingly, \(e^{z + 2\pi i} = e^z\): the exponential is periodic with period \(2\pi i\). Indeed \(e^z = 1\) exactly when \(z = 2\pi i k\) for an integer \(k\).

Euler published \(e^{ix} = \cos x + i\sin x\) in his Introductio in analysin infinitorum of 1748, and the special case \(e^{i\pi} + 1 = 0\) links the five most important constants of mathematics. Roger Cotes had found an equivalent logarithmic form around 1714.

The exponential as a mapping

Write \(w = e^z\). A horizontal line \(y = c\) maps to the ray from the origin at angle \(c\), traced outward as \(x\) increases. A vertical segment \(x = a\), \(0 \le y < 2\pi\), maps to the circle \(|w| = e^a\). So the horizontal strip \(0 \le y < 2\pi\) is mapped one-to-one onto the punctured plane \(w \ne 0\), its left end being squeezed toward the origin and its right end flung toward infinity. Each strip \(2\pi k \le y < 2\pi(k + 1)\) is mapped onto the same punctured plane. Grid lines in the strip become rays and circles, which still meet at right angles, as they must, since \(e^z\) is analytic with non-zero derivative.

Left: a horizontal strip of height 2 pi in the z-plane with a grid of horizontal and vertical lines. Right: its image under the exponential, the w-plane with rays from the origin and concentric circles.
The exponential maps a horizontal strip of height 2π onto the punctured plane

Trigonometric and hyperbolic functions

From Euler's formula, \(\cos y = \frac{e^{iy} + e^{-iy}}{2}\) and \(\sin y = \frac{e^{iy} - e^{-iy}}{2i}\) for real \(y\). We take these as definitions for complex \(z\):

\[\cos z = \frac{e^{iz} + e^{-iz}}{2}, \qquad \sin z = \frac{e^{iz} - e^{-iz}}{2i}, \qquad \cosh z = \frac{e^{z} + e^{-z}}{2}, \qquad \sinh z = \frac{e^{z} - e^{-z}}{2}.\]

All four are entire, and the usual derivative formulas and identities hold: \((\sin z)' = \cos z\), \(\sin^2 z + \cos^2 z = 1\), and the addition formulas. They are tied together by \(\cos(iz) = \cosh z\) and \(\sin(iz) = i\sinh z\). Expanding,

\[\sin(x + iy) = \sin x\cosh y + i\cos x\sinh y, \qquad |\sin(x + iy)|^2 = \sin^2 x + \sinh^2 y.\]

So in the complex plane \(\sin z\) is unbounded: \(|\sin(iy)| = |\sinh y|\) grows exponentially. The zeros of \(\sin z\) are still exactly \(z = k\pi\), because \(\sin^2 x + \sinh^2 y = 0\) forces \(y = 0\) and \(\sin x = 0\). Being bounded on the real line but unbounded in the plane is no accident: Liouville's theorem in lesson 8 says a bounded entire function is constant.

The logarithm

We want to solve \(e^w = z\) for \(w\). Write \(z = re^{i\theta} \ne 0\) and \(w = u + iv\). Then \(e^u e^{iv} = re^{i\theta}\) means \(e^u = r\) and \(v = \theta + 2\pi k\). So the solutions are

\[\log z = \ln|z| + i\arg z = \ln r + i(\theta + 2\pi k), \quad k \in \mathbb{Z}.\]

There are infinitely many, differing by integer multiples of \(2\pi i\), exactly reflecting the periodicity of \(e^w\). For example \(\log(-1) = i\pi(2k + 1)\) and \(\log i = i(\frac{\pi}{2} + 2\pi k)\). The number 0 has no logarithm at all.

The principal logarithm uses the principal argument \(\operatorname{Arg} z \in (-\pi, \pi]\):

\[\operatorname{Log} z = \ln|z| + i\operatorname{Arg} z.\]

So \(\operatorname{Log}(-1) = i\pi\), \(\operatorname{Log} i = \frac{i\pi}{2}\) and \(\operatorname{Log}(1 + i) = \frac{1}{2}\ln 2 + \frac{i\pi}{4}\). Always \(e^{\operatorname{Log} z} = z\), but \(\operatorname{Log}(e^w) = w\) only when \(-\pi < \operatorname{Im} w \le \pi\); for instance \(\operatorname{Log}(e^{2\pi i}) = 0\).

Branch cuts and analyticity of the logarithm

The principal argument jumps by \(2\pi\) across the negative real axis: just above it \(\operatorname{Arg} z\) is close to \(\pi\), just below close to \(-\pi\). So \(\operatorname{Log} z\) is discontinuous on the negative real axis, and the jump cannot be removed. As \(z\) travels once anticlockwise round the unit circle, \(\ln|z|\) returns to its starting value but any continuous choice of \(\arg z\) increases by \(2\pi\). No continuous logarithm exists on any region that encircles the origin.

The remedy is to cut the plane. On the slit plane \(\mathbb{C} \setminus (-\infty, 0]\) the principal logarithm is continuous, and in fact analytic. To see this, use the polar Cauchy–Riemann equations from lesson 4 with \(u = \ln r\), \(v = \theta\): \(u_r = \frac{1}{r} = \frac{1}{r}v_\theta\) and \(v_r = 0 = -\frac{1}{r}u_\theta\). The partials are continuous, so \(\operatorname{Log}\) is analytic there, with

\[\frac{d}{dz}\operatorname{Log} z = e^{-i\theta}\Big(\frac{1}{r} + 0i\Big) = \frac{1}{re^{i\theta}} = \frac{1}{z}.\]

A branch of \(\log z\) is any analytic function \(L\) on a domain with \(e^{L(z)} = z\). Choosing a different ray to cut along gives different branches. Cutting along the positive imaginary axis, for example, with argument taken in \((\frac{\pi}{2}, \frac{5\pi}{2}]\), gives a branch analytic on a different slit plane. The point 0, round which every branch fails, is called a branch point; so, in the sense of the Riemann sphere, is \(\infty\). The cut is a choice of convenience. The branch point is not.

The complex plane with the negative real axis drawn as a heavy cut. Points just above and just below the cut are marked with arguments close to pi and minus pi. A circle around the origin shows the argument increasing by 2 pi on one circuit.
The principal branch of the logarithm and its cut along the negative real axis

Complex powers

For \(z \ne 0\) and any complex \(c\), define

\[z^c = e^{c\log z}.\]

Because \(\log z\) is many-valued, so in general is \(z^c\); the different values differ by factors \(e^{2\pi i kc}\). Three cases arise. If \(c\) is an integer, \(e^{2\pi ikc} = 1\) and \(z^c\) is single-valued, agreeing with ordinary powers. If \(c = \frac{p}{q}\) in lowest terms, there are exactly \(q\) distinct values, the \(q\)th roots of \(z^p\) of lesson 1. Otherwise there are infinitely many. The principal value uses \(\operatorname{Log}\): \(z^c = e^{c\operatorname{Log} z}\), which is analytic on the slit plane with derivative \(cz^{c - 1}\).

A famous example is \(i^i\). Since \(\log i = i(\frac{\pi}{2} + 2\pi k)\), \(i^i = e^{i \cdot i(\frac{\pi}{2} + 2\pi k)} = e^{-\frac{\pi}{2} - 2\pi k}\): every value is a positive real number, and the principal value is \(e^{-\pi/2} \approx 0.2079\). Euler computed this in a letter of 1746.

Familiar rules fail for complex powers and logarithms. \(\operatorname{Log}(zw) = \operatorname{Log} z + \operatorname{Log} w\) holds only up to a multiple of \(2\pi i\): with \(z = w = -1\), the left side is \(\operatorname{Log} 1 = 0\) and the right is \(2\pi i\). Similarly \((zw)^c\) need not equal \(z^cw^c\) for principal values. The classical fallacy \(1 = \sqrt{1} = \sqrt{(-1)(-1)} = \sqrt{-1}\sqrt{-1} = i^2 = -1\) rests on exactly this mistake.

Worked problem

Solving a transcendental equation

Find all solutions of \(\cos z = 2\).

Show solution
  1. Put \(w = e^{iz}\). Then \(\frac{w + w^{-1}}{2} = 2\), so \(w^2 - 4w + 1 = 0\) and \(w = 2 \pm \sqrt{3}\).
  2. Both values are positive reals, so \(iz = \ln(2 \pm \sqrt{3}) + 2\pi ik\).
  3. Since \((2 + \sqrt{3})(2 - \sqrt{3}) = 1\), \(\ln(2 - \sqrt{3}) = -\ln(2 + \sqrt{3})\).
  4. So \(z = 2\pi k \mp i\ln(2 + \sqrt{3})\) for integers \(k\).

Answer: \(z = 2\pi k \pm i\ln(2 + \sqrt{3})\), approximately \(2\pi k \pm 1.317i\). The cosine, bounded by 1 on the real line, takes every complex value in the plane.

The square root and its two branches

The simplest many-valued power is \(z^{1/2}\). Writing \(z = re^{i\theta}\), its two values are \(\pm\sqrt{r}\,e^{i\theta/2}\). The principal branch \(\sqrt{z} = e^{\frac{1}{2}\operatorname{Log} z}\) uses \(\theta = \operatorname{Arg} z\), so it maps the slit plane onto the open right half-plane \(\operatorname{Re} w > 0\); the other branch is its negative and maps onto the left half-plane. Follow a value continuously once round the unit circle starting at 1: the argument of \(z\) grows from 0 to \(2\pi\), so the argument of the root grows from 0 to \(\pi\), and we arrive at \(-1\), the other branch. Going round twice brings us back. Riemann's idea was to glue two copies of the slit plane, called sheets, crosswise along the cut, so that crossing the cut takes you from one sheet to the other. On the resulting surface, the Riemann surface of \(\sqrt{z}\), the square root is a single-valued analytic function. The logarithm needs infinitely many sheets, stacked like a spiral staircase.

Branch points need not be at the origin. The function \((z^2 - 1)^{1/2}\) has branch points at \(\pm 1\). A small circle round either point changes the argument of \(z^2 - 1\) by \(2\pi\) and flips the sign of the root; a large circle round both changes it by \(4\pi\) and returns the root to its starting value. So a single cut along the segment \([-1, 1]\) suffices to define a branch outside it, and this branch behaves like \(z\) for large \(|z|\).

Worked problem

Choosing a branch to suit a region

Define a branch of \(\log z\) that is analytic on the plane cut along the negative imaginary axis and takes the value \(i\pi\) at \(z = -1\).

Show solution
  1. The cut is the ray at angle \(-\frac{\pi}{2}\), so the argument must range over an interval of length \(2\pi\) with endpoints congruent to \(-\frac{\pi}{2}\).
  2. Take \(\arg z \in (-\frac{\pi}{2}, \frac{3\pi}{2})\). Then \(\arg(-1) = \pi\), as required.
  3. Set \(L(z) = \ln|z| + i\arg z\) with this range. By the polar Cauchy–Riemann check, \(L\) is analytic off the cut with \(L'(z) = \frac{1}{z}\).

Answer: \(L(z) = \ln|z| + i\theta\) with \(-\frac{\pi}{2} < \theta < \frac{3\pi}{2}\). It agrees with \(\operatorname{Log}\) everywhere except in the open third quadrant, where it exceeds \(\operatorname{Log}\) by \(2\pi i\).

Inverse trigonometric functions

The same technique gives formulas for inverse trigonometric functions in terms of logarithms and square roots. Solving \(\sin w = z\) leads to \(e^{2iw} - 2ize^{iw} - 1 = 0\), so \(e^{iw} = iz + (1 - z^2)^{1/2}\) and

\[\arcsin z = -i\log\big(iz + (1 - z^2)^{1/2}\big).\]

Similarly \(\arctan z = \frac{i}{2}\log\frac{i + z}{i - z}\). These are many-valued, and every choice of branches for the square root and logarithm gives a branch of the inverse function. The principal branches implemented in libraries such as Python's cmath have their cuts on the real axis outside \([-1, 1]\) for \(\arcsin\) and on the imaginary axis outside \([-i, i]\) for \(\arctan\).

Principal Log, branch cuts and powers with cmath
import cmath, math

z = -1 + 0j
print("Log(-1) =", cmath.log(z))                     # principal value i*pi
print("values of log(-1):", [cmath.log(z) + 2j*math.pi*k for k in range(-1, 2)])

# The branch cut: approach -2 from just above and just below the negative real axis.
for eps in [1e-3, 1e-9]:
    above, below = cmath.log(complex(-2, eps)), cmath.log(complex(-2, -eps))
    print(f"eps={eps:.0e}: Log above {above:.6f}, below {below:.6f}, jump {above-below:.6f}")

# Powers: the principal value of i^i is real.
print("i**i =", 1j**1j, " exp(-pi/2) =", math.exp(-math.pi/2))

# Cube roots of -8 as the three values of (-8)^(1/3).
w = cmath.log(-8)
print("cube roots of -8:", [cmath.exp((w + 2j*math.pi*k)/3) for k in range(3)])

# Log(zw) and Log z + Log w differ by 2*pi*i when the arguments wrap round.
a = b = -1 + 0j
print("Log(ab) - Log a - Log b =", cmath.log(a*b) - cmath.log(a) - cmath.log(b))

# Solutions of cos z = 2.
for k in range(2):
    for s in (1, -1):
        sol = 2*math.pi*k + s*1j*math.log(2 + math.sqrt(3))
        print(f"cos({sol:.4f}) = {cmath.cos(sol):.6f}")
Output
Log(-1) = 3.141592653589793j
values of log(-1): [-3.141592653589793j, 3.141592653589793j, 9.42477796076938j]
eps=1e-03: Log above 0.693147+3.141093j, below 0.693147-3.141093j, jump 0.000000+6.282185j
eps=1e-09: Log above 0.693147+3.141593j, below 0.693147-3.141593j, jump 0.000000+6.283185j
i**i = (0.20787957635076193+0j)  exp(-pi/2) = 0.20787957635076193
cube roots of -8: [(1.0000000000000002+1.7320508075688772j), (-2+2.4492935982947064e-16j), (1.0000000000000002-1.7320508075688772j)]
Log(ab) - Log a - Log b = -6.283185307179586j
cos(0.0000+1.3170j) = 2.000000-0.000000j
cos(0.0000-1.3170j) = 2.000000+0.000000j
cos(6.2832+1.3170j) = 2.000000+0.000000j
cos(6.2832-1.3170j) = 2.000000-0.000000j

Common mistakes

Common mistakes

  • MistakeWriting \(\log(zw) = \log z + \log w\) for principal values without qualification.

    InsteadIt holds as an equality of sets of values, or for principal values only up to an integer multiple of \(2\pi i\).

  • MistakeThinking \(|\sin z| \le 1\) for complex \(z\).

    Instead\(|\sin(iy)| = |\sinh y|\) is unbounded.

  • MistakeAssuming \(e^z = e^w\) implies \(z = w\).

    InsteadIt implies \(z - w = 2\pi ik\) for some integer \(k\).

  • MistakeTreating the branch cut as an intrinsic feature of the logarithm.

    InsteadOnly the branch points 0 and \(\infty\) are intrinsic; the cut can be any curve joining them.

  • MistakeComputing \(\sqrt{ab}\) as \(\sqrt{a}\sqrt{b}\) for negative \(a, b\).

    InsteadPrincipal square roots do not satisfy this rule when the arguments add past \(\pi\).

Summary and key terms

  • \(e^z = e^x(\cos y + i\sin y)\) is entire, never zero, its own derivative, and periodic with period \(2\pi i\).
  • Sine and cosine are defined by Euler's formulas, are entire and unbounded, and have only real zeros.
  • \(\log z = \ln|z| + i\arg z\) has infinitely many values differing by \(2\pi i k\); the principal branch \(\operatorname{Log}\) is analytic on the plane cut along \((-\infty, 0]\) with derivative \(\frac{1}{z}\).
  • Powers are defined by \(z^c = e^{c\log z}\); they are single-valued for integer \(c\), \(q\)-valued for \(c = \frac{p}{q}\), and infinitely many-valued otherwise.
  • Algebraic rules for logs and powers hold only up to the choice of branch.
Principal logarithm
\(\operatorname{Log} z = \ln|z| + i\operatorname{Arg} z\) with \(\operatorname{Arg} z \in (-\pi, \pi]\).
Branch
An analytic function on a domain choosing one value of a many-valued function at each point.
Branch cut
A curve removed from the plane so that a branch can be defined on the rest.
Branch point
A point round which no single-valued continuous branch can be defined, such as 0 for the logarithm.
Principal power
\(z^c = e^{c\operatorname{Log} z}\).

Practice problems

Work each problem on paper first, then reveal the answer to check.

  1. Find all values of \(\log(1 - i)\).

    Show answer

    \(\frac{1}{2}\ln 2 + i(-\frac{\pi}{4} + 2\pi k)\).

  2. Compute the principal value of \((1 + i)^i\).

    Show answer

    \(e^{i\operatorname{Log}(1 + i)} = e^{i(\frac{1}{2}\ln 2 + \frac{i\pi}{4})} = e^{-\pi/4}e^{\frac{i}{2}\ln 2}\approx 0.4288 + 0.1549i\).

  3. Solve \(e^z = -2\).

    Show answer

    \(z = \ln 2 + i(2k + 1)\pi\).

  4. Show that \(|\cos z|^2 = \cos^2 x + \sinh^2 y\).

    Show answer

    \(\cos(x + iy) = \cos x\cosh y - i\sin x\sinh y\); use \(\cosh^2 y = 1 + \sinh^2 y\).

  5. Where is the principal branch of \(\sqrt{z}\) analytic, and what is its derivative?

    Show answer

    On \(\mathbb{C} \setminus (-\infty, 0]\), with derivative \(\frac{1}{2\sqrt{z}}\).

Lesson quiz · 5 questions

Score 60% or more to complete this lesson.

Take the quiz