The purpose of the problem is the study of the integrals $I$ and $J$ defined by:
$$I = \int_{0}^{1} \frac{1}{1 + x} \mathrm{~d}x \quad \text{and} \quad J = \int_{0}^{1} \frac{1}{1 + x^{2}} \mathrm{~d}x$$
Part A: exact value of the integral $I$
  1. Give a geometric interpretation of the integral $I$.
  2. Calculate the exact value of $I$.

Part B: estimation of the value of $J$
Let $g$ be the function defined on the interval $[0; 1]$ by $g(x) = \frac{1}{1 + x^{2}}$. We denote $\mathscr{C}_{g}$ its representative curve in an orthonormal frame of the plane. We therefore have: $J = \int_{0}^{1} g(x) \mathrm{d}x$. The purpose of this part is to evaluate the integral $J$ using the probabilistic method described below. We choose at random a point $\mathrm{M}(x; y)$ by drawing independently its coordinates $x$ and $y$ at random according to the uniform distribution on $[0; 1]$. We admit that the probability $p$ that a point drawn in this manner is located below the curve $\mathscr{C}_{g}$ is equal to the integral $J$. In practice, we initialize a counter $c$ to 0, we fix a natural number $n$ and we repeat $n$ times the following process:
  • we choose at random and independently two numbers $x$ and $y$, according to the uniform distribution on $[0; 1]$;
  • if $\mathrm{M}(x; y)$ is below the curve $\mathscr{C}_{g}$ we increment the counter $c$ by 1.
We admit that $f = \frac{c}{n}$ is an approximate value of $J$. This is the principle of the so-called Monte-Carlo method.
The purpose of the problem is the study of the integrals $I$ and $J$ defined by:

$$I = \int_{0}^{1} \frac{1}{1 + x} \mathrm{~d}x \quad \text{and} \quad J = \int_{0}^{1} \frac{1}{1 + x^{2}} \mathrm{~d}x$$

\textbf{Part A: exact value of the integral $I$}

\begin{enumerate}
  \item Give a geometric interpretation of the integral $I$.
  \item Calculate the exact value of $I$.
\end{enumerate}

\textbf{Part B: estimation of the value of $J$}

Let $g$ be the function defined on the interval $[0; 1]$ by $g(x) = \frac{1}{1 + x^{2}}$.\\
We denote $\mathscr{C}_{g}$ its representative curve in an orthonormal frame of the plane.\\
We therefore have: $J = \int_{0}^{1} g(x) \mathrm{d}x$.\\
The purpose of this part is to evaluate the integral $J$ using the probabilistic method described below.\\
We choose at random a point $\mathrm{M}(x; y)$ by drawing independently its coordinates $x$ and $y$ at random according to the uniform distribution on $[0; 1]$.\\
We admit that the probability $p$ that a point drawn in this manner is located below the curve $\mathscr{C}_{g}$ is equal to the integral $J$.\\
In practice, we initialize a counter $c$ to 0, we fix a natural number $n$ and we repeat $n$ times the following process:
\begin{itemize}
  \item we choose at random and independently two numbers $x$ and $y$, according to the uniform distribution on $[0; 1]$;
  \item if $\mathrm{M}(x; y)$ is below the curve $\mathscr{C}_{g}$ we increment the counter $c$ by 1.
\end{itemize}
We admit that $f = \frac{c}{n}$ is an approximate value of $J$. This is the principle of the so-called Monte-Carlo method.