---
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:uge2S)=
# Extra (Optional) Exercises -- Long Day

+++

These exercises are optional extra material for students who are done with the exercises of the day but have the time for and the interest in more.

+++

## Extra Exercise 1: A Bijection

+++

A function $f :\Bbb N\rightarrow \Bbb Z$ is defined by

$ x \mapsto    \left\{
\begin{array}{ll}
      \frac{x}{2} & \text{when }x \text{ is even,} \\
      -\frac{x-1}{2} & \text{when }x \text{ is odd.} \\
\end{array} 
\right.  
$

Is $f$ a bijection?

```{hint}
:class: dropdown
To get an idea of the behaviour of the function, try calculating $f(1)$, $f(2)$, $f(3)$, $f(4)$ and $f(5)$.
```

```{admonition} Answer
:class: dropdown
Yes.
```

+++

## Extra Exercise 2: Hyperbolic Functions

+++

In this exercise we will introduce two new functions that are formed from already known functions.
The two functions are called _hyperbolic sinus_ and _hyperbolic cosinus_ and they are defined by:

$$\mathrm{sinh}(x)=\frac{\mathrm e^x-\mathrm e^{-x}}{2}\quad \text{and}\quad \mathrm{cosh}(x)=\frac{\mathrm e^x+\mathrm e^{-x}}{2}.$$

For both functions we choose their domains and co-domains to be $\mathbb R$. 

+++

### Question a

+++

Justify that $\mathrm{sinh}(x)$ is injective and that $\mathrm{cosh}(x)$ is not injective.


```{hint}
:class: dropdown
Are the functions monotone?
```

+++

### Question b

+++

Determine a functional expression for $\mathrm{sinh}^{-1}$ by isolating $x$ in the equation $y=\mathrm{sinh}(x)$. 

```{hint}
:class: dropdown
Multiply your equation through with $\mathrm e^x$ and solve the quadratic equation that appears.
```

```{hint}
:class: dropdown
Why can we ignore one of the solutions?
```





