Consider the function $f$ defined on the interval $[ 0 ; 1 ]$ by $$f ( x ) = 2 x \mathrm { e } ^ { - x } .$$ It is admitted that the function $f$ is differentiable on the interval $[ 0 ; 1 ]$.
[a.] Solve on the interval $[ 0 ; 1 ]$ the equation $f ( x ) = x$.
[b.] Prove that, for all $x$ belonging to the interval $[ 0 ; 1 ]$, $$f ^ { \prime } ( x ) = 2 ( 1 - x ) \mathrm { e } ^ { - x } .$$
[c.] Give the table of variations of the function $f$ on the interval $[ 0 ; 1 ]$.
Consider the sequence $(u_n)$ defined by $u_0 = 0,1$ and for all natural integer $n$, $$u_{n+1} = f(u_n).$$
[a.] Prove by induction that, for all natural integer $n$, $$0 \leqslant u_n < u_{n+1} \leqslant 1.$$
[b.] Deduce that the sequence $(u_n)$ is convergent.
Prove that the limit of the sequence $(u_n)$ is $\ln(2)$.
[a.] Justify that for all natural integer $n$, $\ln(2) - u_n$ is positive.
[b.] It is desired to write a Python script that returns an approximate value of $\ln(2)$ by default to within $10^{-4}$, as well as the number of steps to achieve this. Copy and complete the script below so that it answers the problem posed. \begin{verbatim} def seuil() : n = 0 u=0.1 while ln (2) - u ...0.0001 : n=n+1 u=... return (u,n) \end{verbatim}
[c.] Give the value of the variable $n$ returned by the function seuil().
Consider the function $f$ defined on the interval $[ 0 ; 1 ]$ by
$$f ( x ) = 2 x \mathrm { e } ^ { - x } .$$
It is admitted that the function $f$ is differentiable on the interval $[ 0 ; 1 ]$.
\begin{enumerate}
\item \begin{enumerate}
\item[a.] Solve on the interval $[ 0 ; 1 ]$ the equation $f ( x ) = x$.
\item[b.] Prove that, for all $x$ belonging to the interval $[ 0 ; 1 ]$,
$$f ^ { \prime } ( x ) = 2 ( 1 - x ) \mathrm { e } ^ { - x } .$$
\item[c.] Give the table of variations of the function $f$ on the interval $[ 0 ; 1 ]$.
\end{enumerate}
Consider the sequence $(u_n)$ defined by $u_0 = 0,1$ and for all natural integer $n$,
$$u_{n+1} = f(u_n).$$
\item \begin{enumerate}
\item[a.] Prove by induction that, for all natural integer $n$,
$$0 \leqslant u_n < u_{n+1} \leqslant 1.$$
\item[b.] Deduce that the sequence $(u_n)$ is convergent.
\end{enumerate}
\item Prove that the limit of the sequence $(u_n)$ is $\ln(2)$.
\item \begin{enumerate}
\item[a.] Justify that for all natural integer $n$, $\ln(2) - u_n$ is positive.
\item[b.] It is desired to write a Python script that returns an approximate value of $\ln(2)$ by default to within $10^{-4}$, as well as the number of steps to achieve this. Copy and complete the script below so that it answers the problem posed.
\begin{verbatim}
def seuil() :
n = 0
u=0.1
while ln (2) - u ...0.0001 :
n=n+1
u=...
return (u,n)
\end{verbatim}
\item[c.] Give the value of the variable $n$ returned by the function seuil().
\end{enumerate}
\end{enumerate}