Alain owns a swimming pool that contains $50\mathrm{~m}^3$ of water. Recall that $1\mathrm{~m}^3 = 1000\mathrm{~L}$. To disinfect the water, he must add chlorine. The chlorine level in the water, expressed in $\mathrm{mg}\cdot\mathrm{L}^{-1}$, is defined as the mass of chlorine per unit volume of water. Pool specialists recommend a chlorine level between 1 and $3\mathrm{~mg}\cdot\mathrm{L}^{-1}$. Under the action of the ambient environment, particularly ultraviolet rays, chlorine decomposes and gradually disappears. On Wednesday, June 19, he measures a chlorine level of $0.70\mathrm{~mg}\cdot\mathrm{L}^{-1}$.
Part A: study of a discrete model.To maintain the chlorine level in his pool, Alain decides, starting from Thursday, June 20, to add 15 g of chlorine each day. It is admitted that this chlorine mixes uniformly in the pool water.
- Justify that this addition of chlorine increases the level by $0.3\mathrm{~mg}\cdot\mathrm{L}^{-1}$.
- For any natural number $n$, we denote by $v_n$ the chlorine level, in $\mathrm{mg}\cdot\mathrm{L}^{-1}$, obtained with this new protocol $n$ days after Wednesday, June 19. Thus $v_0 = 0.7$. It is admitted that for any natural number $n$, $$v_{n+1} = 0.92 v_n + 0.3.$$ a. Show by induction that for any natural number $n$, $\quad v_n \leqslant v_{n+1} \leqslant 4$. b. Show that the sequence $(v_n)$ is convergent and calculate its limit.
- In the long term, will the chlorine level comply with the pool specialists' recommendation? Justify your answer.
- Reproduce and complete the algorithm below written in Python language so that the function \texttt{alerte\_chlore} returns, when it exists, the smallest integer $n$ such that $v_n > s$. \begin{verbatim} def alerte_chlore(s) : n = 0 u=0.7 while...: n = ... u=... return n \end{verbatim}
- What value is obtained by entering the instruction \texttt{alerte\_chlore(3)}? Interpret this result in the context of the exercise.
Part B: study of a continuous model.Alain decides to call on a specialized engineering firm. This firm uses a continuous model to describe the chlorine level in the pool. In this model, for a duration $x$ (in days elapsed from Wednesday, June 19), $f(x)$ represents the chlorine level, in $\mathrm{mg}\cdot\mathrm{L}^{-1}$, in the pool. It is admitted that the function $f$ is a solution of the differential equation $(E): y' = -0.08y + \frac{q}{50}$, where $q$ is the quantity of chlorine, in grams, added to the pool each day.
- Justify that the function $f$ is of the form $f(x) = C\mathrm{e}^{-0.08x} + \frac{q}{4}$ where $C$ is a real constant.
- a. Express as a function of $q$ the limit of $f$ at $+\infty$. b. Recall that the chlorine level observed on Wednesday, June 19 is equal to $0.7\mathrm{~mg}\cdot\mathrm{L}^{-1}$. It is desired that the chlorine level stabilizes in the long term around $2\mathrm{~mg}\cdot\mathrm{L}^{-1}$. Determine the values of $C$ and $q$ so that these two conditions are satisfied.