---
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:uge2L-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: Hyperbolic tangent

+++

In Extra Exercise 2 from this week's Long Day, the hyperbolic functions were introduced with the following expressions and both with domain and codomain $\mathbb R$: 

$$\mathrm{sinh}(x)=\frac{\mathrm e^x-\mathrm e^{-x}}{2}\quad\text{and}\mathrm{cosh}(x)=\frac{\mathrm e^x+\mathrm e^{-x}}{2}.$$

+++

### Question a

+++

The symbols $\mathrm{cosh}$ and $\mathrm{sinh}$ were chosen because of the resemblance between these hyperbolic functions and the better-known trigonometric functions $\cos$ and $\sin$. A famous identity, sometimes known as the "dummy rule", from the usual trigonometric functions is $\cos^2(x)+\sin^2(x)=1$. Show that the corresponding, albeit different, identity for the hyperbolic functions is $\mathrm{cosh}^2(x)-\mathrm{sinh}^2(x)=1$. 

Note that while the point $(\cos(x),\sin(x))$ lies on the unit circle, the point $(\mathrm{cosh}(x),\mathrm{sinh}(x))$ lies on a *hyperbola*, hence the name. 

+++

### Question b

+++

Inspired by the formula $\tan(x)=\sin(x)/\cos(x)$, we define $\mathrm{tanh}(x)=\mathrm{sinh}(x)/\mathrm{cosh}(x)$ for all $x \in \mathbb{R}$. The function $\mathrm{tanh}: \mathbb{R} \to \mathbb{R}$ defined by $x \mapsto \mathrm{tanh}(x)$ is called the hyperbolic tangent. What is the image set of this function?

+++

### Question c

+++

Show that $\mathrm{tanh}(x)=(\mathrm e^{2x}-1)/(\mathrm e^{2x}+1)$, and use this to find an expression for the inverse hyperbolic tangent function.


```{hint}
:class: dropdown
The function $\mathrm{tanh}: \mathbb{R} \to \mathbb{R}$ is not surjective and thus has no inverse function. However, if we restrict the codomain to the image set $B$ found in Question b, we obtain a function $\mathrm{tanh}: \mathbb{R} \to B$ that does have an inverse. It is this inverse you are looking for.
```