Exercise 2 (7 points) -- Sequences, functionsLet $k$ be a real number. Consider the sequence $\left(u_n\right)$ defined by its first term $u_0$ and for every natural number $n$, $$u_{n+1} = k u_n \left(1 - u_n\right)$$
The two parts of this exercise are independent. We study two cases depending on the values of $k$.
Part 1In this part, $k = 1.9$ and $u_0 = 0.1$. Therefore, for every natural number $n$, $u_{n+1} = 1.9 u_n \left(1 - u_n\right)$.
- Consider the function $f$ defined on $[0; 1]$ by $f(x) = 1.9x(1 - x)$. a. Study the variations of $f$ on the interval $[0; 1]$. b. Deduce that if $x \in [0; 1]$ then $f(x) \in [0; 1]$.
- Below are represented the first terms of the sequence $\left(u_n\right)$ constructed from the curve $\mathscr{C}_f$ of the function $f$ and the line $D$ with equation $y = x$. Conjecture the direction of variation of the sequence $(u_n)$ and its possible limit.
- a. Using the results from question 1, prove by induction that for every natural number $n$: $$0 \leqslant u_n \leqslant u_{n+1} \leqslant \frac{1}{2}$$ b. Deduce that the sequence $(u_n)$ converges. c. Determine its limit.
Part 2In this part, $k = \frac{1}{2}$ and $u_0 = \frac{1}{4}$. Therefore, for every natural number $n$, $u_{n+1} = \frac{1}{2} u_n \left(1 - u_n\right)$ and $u_0 = \frac{1}{4}$. We admit that for every natural number $n$: $0 \leqslant u_n \leqslant \left(\frac{1}{2}\right)^n$.
- Prove that the sequence $(u_n)$ converges and determine its limit.
- Consider the Python function \texttt{algo(p)} where \texttt{p} denotes a non-zero natural number: \begin{verbatim} def algo(p) : u = 1/4 n = 0 while u > 10**(-p): u = 1/2*u*(1 - u) n = n+1 return(n) \end{verbatim} Explain why, for every non-zero natural number $p$, the while loop does not run indefinitely, which allows the command \texttt{algo(p)} to return a value.