We consider the function $g$ defined on the interval $[0; 1]$ by $$g(x) = 2x - x^2$$
- Show that the function $g$ is strictly increasing on the interval $[0; 1]$ and specify the values of $g(0)$ and $g(1)$.
We consider the sequence $\left(u_n\right)$ defined by $\left\{\begin{array}{l} u_0 = \dfrac{1}{2} \\ u_{n+1} = g\left(u_n\right) \end{array}\right.$ for every natural number $n$.
- Calculate $u_1$ and $u_2$.
- Prove by induction that, for every natural number $n$, we have: $0 < u_n < u_{n+1} < 1$.
- Deduce that the sequence $(u_n)$ is convergent.
- Determine the limit $\ell$ of the sequence $(u_n)$.
We consider the sequence $(\nu_n)$ defined for every natural number $n$ by $\nu_n = \ln\left(1 - u_n\right)$.
- Prove that the sequence $\left(v_n\right)$ is a geometric sequence with common ratio 2 and specify its first term.
- Deduce an expression for $v_n$ as a function of $n$.
- Deduce an expression for $u_n$ as a function of $n$ and find again the limit determined in question 5.
- Copy and complete the Python script below so that it returns the rank $n$ from which the sequence exceeds 0.95. \begin{verbatim} def seuil() : n=0 u=0.5 while u < 0.95: n=... u=... return n \end{verbatim}