---
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:uge4S-extra)=
# Extra (optional) exercises -- Long 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: Integer powers of complex numbers

+++

This exercise continues Exercise 9 from the day's main exercises.

Let $n$ be a natural number. Show the following:

$$(-1+\sqrt{3}i)^{3n}=2^{3n},$$ 

$$(-1+\sqrt{3}i)^{3n+1}=2^{3n}(-1+\sqrt{3}i)$$ 

and

$$(-1+\sqrt{3}i)^{3n+2}=2^{3n+1}(-1-\sqrt{3}i).$$ 

```{hint}
:class: dropdown
First, show that $(-1+\sqrt{3}i)^{3}=2^3$. What can we then say about $(-1+\sqrt{3}i)^{3n}$? 
```

+++

## Extra exercise 2: Complex numbers and Pythagorean triples 

+++

A Pythagorean triple $(a,b,c)$ consists of three natural numbers that satisfy $a>b$ and $a^2+b^2=c^2$. An example is $(4,3,5)$.

+++

### Question a

+++

Show that if a triple $(a,b,c)$ of natural numbers is a Pythagorean triple, then the complex number $z=\frac{a}{c}+\frac{b}{c}i$ satisfies $|z|=1$ and $\mathrm{Re}(z)>\mathrm{Im}(z)$.

+++

### Question b

+++

Now assume that a complex number $z$ satisfies $|z|=1$ and $\mathrm{Re}(z)>\mathrm{Im}(z)$ and that $z$ can be written in the form $z=\frac{a}{c}+\frac{b}{c}i$, where $a$, $b$ and $c$ are natural numbers. Show that $(a,b,c)$ is a Pythagorean triple.

+++

### Question c

+++

Use the above results and complex numbers to construct other Pythagorean triples based on the triple $(4,3,5)$.

```{hint}
:class: dropdown
If the number $z=\frac{a}{c}+\frac{b}{c}i$ gives rise to the Pythagorean triple $(a,b,c)$, then what about the number $z^2$ (or maybe $i \cdot \overline{z}^2$)?
```

