---
jupytext:
  formats: md:myst
  text_representation:
    extension: .md
    format_name: myst
    format_version: '0.8'
    jupytext_version: 1.4.1+dev
kernelspec:
  display_name: Python 3
  language: python
  name: python3
---

+++

(section:uge4L-extra)=
# Extra (optional) exercises -- Short Day

+++

These exercises are optional extra material for students who have finished the exercises of the day and have the time and interest for more.

+++

## Extra exercise 1: The complex logarithm

+++

In this exercise we will study how to define the logarithm of a non-zero complex number. More precisely, the function $\mathrm{Log}: \mathbb{C}\setminus \{0\} \to \mathbb{C}$ is defined by the expression $\mathrm{Log}(z)=\ln(|z|)+i \mathrm{Arg}(z)$, where $\mathrm{Arg}$ denotes the principal argument and $\ln$ the natural logarithm.

+++

### Question a

+++

Check that $\mathrm{Log}(z)=\ln(z)$ for $z \in \mathbb{R}_{>0}$. Also determine $\mathrm{Log}(z)$ for $z \in \mathbb{R}_{<0}$.

```{admonition} Answer
:class: dropdown
If $z\in \mathbb{R}_{>0}$, then $\mathrm{Log}(z)=\ln(z)+i0=\ln(z)$. If $z\in \mathbb{R}_{<0}$, then $\mathrm{Log}(z)=\ln(-z)+i \pi$. 
```

+++

### Question b

+++

Show that $\mathrm e^{\mathrm{Log}(z)}=z$ for all $z \in \mathbb{C}\setminus \{0\}$. Conclude that $w=\mathrm{Log}(z)$ is a solution to the equation $\mathrm e^w=z$ for all $z \in \mathbb{C}\setminus \{0\}$.

+++

### Question c

+++

The natural logarithm $\ln$ is the inverse of the (real) exponential function. Find $z \in \mathbb{C}$ such that $\mathrm{Log}(\mathrm e^z) \neq z$. Conclude that $\mathrm{Log}$ is not the inverse function of the complex exponential function.

```{hint}
:class: dropdown
The definition of $\mathrm{Log}(z)$ uses the principal argument of $z$. However, a complex number has infinitely many arguments.
```

+++

### Question d

+++

The natural logarithm $\ln$ satisfies $\ln(x_1x_2)=\ln(x_1)+\ln(x_2)$ for all positive real numbers $x_1$ and $x_2$. Show that it is *not* true that $\mathrm{Log}(z_1z_2)=\mathrm{Log}(z_1)+\mathrm{Log}(z_2)$ for all non-zero complex numbers $z_1$ and $z_2$.

```{hint}
:class: dropdown
In order to show that the formula $\mathrm{Log}(z_1z_2)=\mathrm{Log}(z_1)+\mathrm{Log}(z_2)$ is not true for all non-zero complex numbers, a single counterexample is enough.
```

```{admonition} Answer
:class: dropdown
The formula does not hold in general since $\mathrm{Log}((-1)^2) \neq \mathrm{Log}(-1)+\mathrm{Log}(-1)$.
```
