Exercise 4 — 5 points Theme: sequences, logarithm function, algorithms For each of the following statements, indicate whether it is true or false. Each answer must be justified. An unjustified answer earns no points:
Statement: The sequence $u$ defined for every natural integer $n$ by $u_{n} = \frac{(-1)^{n}}{n+1}$ is bounded.
Statement: Every bounded sequence is convergent.
Statement: Every increasing sequence tends to $+\infty$.
Let the function $f$ defined on $\mathbb{R}$ by $f(x) = \ln(x^{2} + 2x + 2)$. Statement: The function $f$ is convex on the interval $[-3; 1]$.
We consider the function mystery defined below which takes a list L of numbers as a parameter. We recall that len(L) returns the length, that is, the number of elements in the list $L$. \begin{verbatim} def mystery(L) : M = L[0] # We initialize M with the first element of the list L for i in range(len(L)) : if L[i] > M : M = L[i] return M \end{verbatim} Statement: The execution of mystery$([2, 3, 7, 0, 6, 3, 2, 0, 5])$ returns 7.
\textbf{Exercise 4 — 5 points}\\
Theme: sequences, logarithm function, algorithms\\
For each of the following statements, indicate whether it is true or false. Each answer must be justified. An unjustified answer earns no points:
\begin{enumerate}
\item Statement: The sequence $u$ defined for every natural integer $n$ by $u_{n} = \frac{(-1)^{n}}{n+1}$ is bounded.
\item Statement: Every bounded sequence is convergent.
\item Statement: Every increasing sequence tends to $+\infty$.
\item Let the function $f$ defined on $\mathbb{R}$ by $f(x) = \ln(x^{2} + 2x + 2)$.\\
Statement: The function $f$ is convex on the interval $[-3; 1]$.
\item We consider the function mystery defined below which takes a list L of numbers as a parameter.\\
We recall that len(L) returns the length, that is, the number of elements in the list $L$.
\begin{verbatim}
def mystery(L) :
M = L[0]
# We initialize M with the first element of the list L
for i in range(len(L)) :
if L[i] > M :
M = L[i]
return M
\end{verbatim}
Statement: The execution of mystery$([2, 3, 7, 0, 6, 3, 2, 0, 5])$ returns 7.
\end{enumerate}