---
title: The exponential, the logarithm and branch cuts
heading: A function with infinitely many values, and how to pick one
eyebrow: A12 · Lesson 6 · The exponential, the logarithm and branch cuts
xp: 40
---

::: hook
The complex exponential repeats: $e^{z + 2\pi j} = e^z$, because adding $2\pi j$ only turns the result once around the circle. So its inverse, the logarithm, can't be a single-valued function: $\log z$ has infinitely many values, one for each turn, differing by $2\pi j$. To work with it we choose one, the **principal value**, and that choice forces a **branch cut**, a line in the plane where the chosen value jumps. Square roots, powers like $z^{1/3}$ and the arc functions behave the same way, and the field of a line charge, $\ln z$, is where engineers first meet it.
:::

::: play
- The dot z travels counterclockwise around a circle of radius r as θ grows. Two dots show its logarithm: the principal value Log z (with angle between −π and π) and the logarithm that follows the path continuously.
- Below θ = 180° they coincide. Push θ past 180°: z crosses the negative real axis, the principal value jumps from $\ln r + j\pi$ to $\ln r - j\pi$, while the continuous one climbs on.
- After a full turn the continuous logarithm has gained $2\pi j$: going around the origin changes the logarithm, which is why its values can't all be one function.
:::
:::

```sim plot
view: complex
range: 6
slider: r = 0.5..3 step 0.1 = 2
slider: t = 0..700 step 5 = 120 °
curve: r*exp(j*u*pi/180) | over: u = 0..t | dashed
dot: r*exp(j*t*pi/180) | label: z
dot: ln(r) + j*arg(r*exp(j*t*pi/180)) | label: Log z
dot: ln(r) + j*t*pi/180 | label: continuous log
readout: Arg z, ° = arg(r*exp(j*t*pi/180))*180/pi
readout: imaginary part of Log z = arg(r*exp(j*t*pi/180))
readout: imaginary part of the continuous log = t*pi/180
```

::: predict
## What's $j^j$ (taking the principal value)?

- [ ] $j$
- [ ] $-1$
- [x] A real number, about 0.208
- [ ] Undefined

::: reveal
$j^j = e^{j\,\text{Log}\,j} = e^{j(j\pi/2)} = e^{-\pi/2} \approx 0.2079$, a real number. The other branches give $e^{-\pi/2 - 2\pi k}$: infinitely many values, all real.
:::
:::

::: nameit
## The exponential

$$e^z = e^{x + jy} = e^x(\cos y + j\sin y)$$

It's analytic everywhere, its own derivative, never zero, and periodic with period $2\pi j$. The trigonometric and hyperbolic functions follow from it:

$$\cos z = \frac{e^{jz} + e^{-jz}}{2}, \quad \sin z = \frac{e^{jz} - e^{-jz}}{2j}, \quad \cos(jy) = \cosh y$$

so, unlike their real versions, $\sin z$ and $\cos z$ are unbounded.

## The logarithm

For $z = re^{j\theta} \ne 0$:

$$\log z = \ln r + j(\theta + 2\pi k), \qquad k = 0, \pm1, \pm2, \ldots$$

The **principal value** $\text{Log}\,z = \ln r + j\,\text{Arg}\,z$, with $-\pi < \text{Arg}\,z \le \pi$, is analytic everywhere except along the **branch cut**, the negative real axis (and 0, the **branch point**), where Arg jumps by 2π. Away from the cut, $\frac{d}{dz}\text{Log}\,z = 1/z$.

## Powers

$z^a = e^{a\log z}$, with as many values as $\log z$ gives distinct results: $z^{1/n}$ has n values (lesson 7), an irrational power infinitely many. The principal value uses Log.

## Why the cut is a choice

The cut only has to stop paths from circling the branch point. The negative real axis is the convention; a problem might put it along the positive imaginary axis instead, to keep it away from where the function is needed.
:::

::: example
## Find all values of $\log(-1)$, and the principal one.

::: solution
1. **Polar form.**
   $$-1 = 1\cdot e^{j\pi}$$
2. **All the logarithms.**
   $$\begin{aligned} \log(-1) &= \ln 1 + j(\pi + 2\pi k) \\ &= j(2k + 1)\pi \end{aligned}$$
   that is, $\pm j\pi, \pm 3j\pi, \ldots$
3. **The principal value.**
   $$\text{Log}(-1) = j\pi$$
   on the edge of the cut, taken from above.

**Answer:** $\log(-1) = j(2k + 1)\pi$ for every integer k, and the principal value is $\text{Log}(-1) = j\pi$.
:::
:::

::: example
## How large is $\cos(3j)$?

::: solution
1. **Turn it into cosh.**
   $$\begin{aligned} \cos(3j) &= \cosh 3 \\ &= \frac{e^3 + e^{-3}}{2} \\ &= 10.07 \end{aligned}$$
2. **Compare with real angles.** Cosine of a real number never exceeds 1; along the imaginary axis it grows exponentially.

**Answer:** $\cos(3j) = \cosh 3 = 10.07$.
:::
:::

::: example
## Find every z with $\sin z = 2$.

::: solution
1. **Split into real and imaginary parts.** No real angle works, so look off the real axis:
   $$\begin{aligned} \sin(x + jy) &= \sin x\cosh y \\ &\quad + j\cos x\sinh y \end{aligned}$$
2. **Make the imaginary part vanish.** Either $\sinh y = 0$ (then y = 0 and $\lvert\sin z\rvert \le 1$, which fails) or $\cos x = 0$.
3. **Make the real part 2.** On $x = \frac{\pi}{2} + 2\pi k$, $\sin x = 1$ and the real part is $\cosh y = 2$, so
   $$\begin{aligned} y &= \pm\cosh^{-1}2 \\ &= \pm\ln(2 + \sqrt3) \\ &= \pm1.317 \end{aligned}$$
4. **The other half.** On $x = -\frac{\pi}{2} + 2\pi k$ the real part is $-\cosh y$, which can't be 2.
5. **Why there are solutions.** In the complex plane, sine is unbounded, which is why the equation has solutions at all.

**Answer:** $z = \frac{\pi}{2} + 2\pi k \pm 1.317j$, for every integer k.
:::
:::

::: check
given: x = 0.5 | 1 | 2; y = 0.5 | 1 | 3
answer: exp(x)*cos(y)
tolerance: 0.5%

## What's the real part of $e^z$ for $z = \given{x} + \given{y}j$?

::: right
Right. $e^x\cos y$ = {answer}.
:::

::: misses
- [exp(x)] That's $\lvert e^z\rvert$; the real part also has $\cos y$.
- [any] Not yet. $e^x(\cos y + j\sin y)$.
:::
:::

::: check
given: a = 1 | -2 | -3; b = 1 | 2 | -1
answer: ln(abs(a + j*b))
tolerance: 0.5%

## What's the real part of $\text{Log}\,z$ for $z = \given{a} + \given{b}j$?

::: right
Right. $\ln\lvert z\rvert$ = {answer}.
:::

::: misses
- [log(abs(a + j*b))] Use the natural logarithm.
- [any] Not yet. $\ln\lvert z\rvert$.
:::
:::

::: check
given: a = -1 | -2 | -3; b = 1 | 2 | -1
answer: arg(a + j*b)
tolerance: 0.5%

## What's the imaginary part of the principal value $\text{Log}\,z$ for $z = \given{a} + \given{b}j$, in radians?

::: right
Right. $\text{Arg}\,z$ = {answer}.
:::

::: misses
- [atan(b/a)] That loses the quadrant when the real part is negative; Arg lies in (−π, π].
- [any] Not yet. Arg z, between −π and π.
:::
:::

::: check
given: a = 1 | -1 | 2; b = 1 | 1 | -2; k = 1 | 2 | -1
answer: arg(a + j*b) + 2*pi*k
tolerance: 0.5%

## What's the imaginary part of the branch of $\log z$ with $k = \given{k}$, for $z = \given{a} + \given{b}j$?

::: right
Right. $\text{Arg}\,z + 2\pi k$ = {answer}.
:::

::: misses
- [arg(a + j*b)] That's the principal value, k = 0.
- [any] Not yet. Each branch adds $2\pi k$.
:::
:::

::: check
given: y = 1 | 2 | 3
answer: cosh(y)
tolerance: 0.5%

## What's $\cos(\given{y}j)$?

::: right
Right. $\cosh \given{y}$ = {answer}.
:::

::: misses
- [cos(y)] That's the real cosine; on the imaginary axis it becomes the hyperbolic cosine.
- [any] Not yet. $\cos(jy) = \cosh y$.
:::
:::

::: check
given: k = 0 | 1 | -1
answer: exp(-pi/2 - 2*pi*k)
tolerance: 0.5%

## $j^j = e^{j\log j}$, with $\log j = j(\pi/2 + 2\pi k)$. What's its value on the branch $k = \given{k}$?

::: right
Right. $e^{-\pi/2 - 2\pi k}$ = {answer}.
:::

::: misses
- [any] Not yet. Multiply $j \cdot j(\pi/2 + 2\pi k)$ and exponentiate.
:::
:::

::: check
kind: choice

## Where is the principal logarithm Log z not analytic?

- [ ] Nowhere: it's analytic everywhere
- [ ] On the unit circle
- [x] On the negative real axis and at 0
- [ ] On the imaginary axis

::: misses
- [1] It jumps by $2\pi j$ across its cut.
- [2] $\lvert z\rvert = 1$ just makes the real part 0.
- [4] The principal value's cut is the negative real axis, by convention.
:::
:::

::: check
kind: parts
given: x = 0.5 | 1; y = 1 | 2

## $\sin(x + jy) = \sin x\cosh y + j\cos x\sinh y$.

::: part
answer: sin(x)*cosh(y)
tolerance: 0.5%

### What is the real part of $\sin(\given{x} + \given{y}j)$?

::: misses
- [sin(x)*cos(y)] The imaginary part of the argument turns cos into cosh.
- [any] $\sin x\cosh y$.
:::
:::

::: part
answer: cos(x)*sinh(y)
tolerance: 0.5%

### What is its imaginary part?

::: misses
- [cos(x)*sin(y)] The imaginary argument turns sin into sinh.
- [any] $\cos x\sinh y$.
:::
:::
:::

::: check
kind: derivation
vars: x = -2..2, y = -2..2

## Let $z = x + jy$.

::: step
answer: exp(-y)

### What is $\lvert e^{jz}\rvert$?
:::

::: step
answer: sqrt(cos(x)^2 + sinh(y)^2)

### What is $\lvert\cos z\rvert$? (Use $\cos z = \cos x\cosh y - j\sin x\sinh y$ and $\cosh^2 = 1 + \sinh^2$.)
:::

::: right
Right. $\lvert\cos z\rvert^2 = \cos^2x + \sinh^2y$, which grows without limit as you move away from the real axis.
:::
:::

::: explain
## Why must a logarithm of a complex variable have a branch cut?

::: model
Following z once around a circle about the origin brings z back to where it started but adds 2π to its angle, so a logarithm that changes continuously along the path ends up $2\pi j$ larger than it began. A single-valued function can't do that. To get one, we forbid paths from circling the origin by removing a line from the origin to infinity, the cut; on the rest of the plane every closed path avoids circling the origin, the angle can be chosen continuously, and the logarithm is analytic. Across the cut the chosen value jumps by $2\pi j$. Where the cut goes is a choice; that it's needed isn't.
:::
:::

::: practice

::: check
given: x = 1 | 1.5; y = 2 | 0.25
answer: exp(x)*sin(y)
tolerance: 0.5%

## Imaginary part of $e^{\given{x} + \given{y}j}$?

::: misses
- [any] $e^x\sin y$.
:::
:::

::: check
given: a = -1 | 3; b = -1 | 4
answer: ln(abs(a + j*b))
tolerance: 0.5%

## Re Log of $\given{a} + \given{b}j$?

::: misses
- [any] $\ln\lvert z\rvert$.
:::
:::

::: check
given: y = 0.5 | 1 | 1.5 | 2 | 3 | 4
answer: cosh(y)
tolerance: 0.5%

## $\cos(\given{y}j)$?

::: misses
- [any] $\cosh y$.
:::
:::
:::
