Consider the function $f$ defined on $\mathbb { R }$ by
$$f ( x ) = ( x + 2 ) \mathrm { e } ^ { - x }.$$
We denote by $\mathscr { C }$ the representative curve of the function $f$ in an orthogonal coordinate system.
- Study of the function $f$. a. Determine the coordinates of the intersection points of the curve $\mathscr { C }$ with the axes of the coordinate system. b. Study the limits of the function $f$ at $- \infty$ and at $+ \infty$. Deduce any possible asymptotes of the curve $\mathscr { C }$. c. Study the variations of $f$ on $\mathbb { R }$.
- Calculation of an approximate value of the area under a curve.
We denote by $\mathscr { D }$ the region between the $x$-axis, the curve $\mathscr { C }$ and the lines with equations $x = 0$ and $x = 1$. We approximate the area of the region $\mathscr { D }$ by calculating a sum of areas of rectangles. a. In this question, we divide the interval $[ 0 ; 1 ]$ into four intervals of equal length:
- On the interval $\left[ 0 ; \frac { 1 } { 4 } \right]$, we construct a rectangle of height $f ( 0 )$
- On the interval $\left[ \frac { 1 } { 4 } ; \frac { 1 } { 2 } \right]$, we construct a rectangle of height $f \left( \frac { 1 } { 4 } \right)$
- On the interval $\left[ \frac { 1 } { 2 } ; \frac { 3 } { 4 } \right]$, we construct a rectangle of height $f \left( \frac { 1 } { 2 } \right)$
- On the interval $\left[ \frac { 3 } { 4 } ; 1 \right]$, we construct a rectangle of height $f \left( \frac { 3 } { 4 } \right)$
The algorithm below allows us to obtain an approximate value of the area of the region $\mathscr { D }$ by adding the areas of the four preceding rectangles:
| Variables : | $k$ is an integer |
| $S$ is a real number |
| Initialization : | Assign to $S$ the value 0 |
| Processing: | For $k$ varying from 0 to 3 |
| $\mid$ Assign to $S$ the value $S + \frac { 1 } { 4 } f \left( \frac { k } { 4 } \right)$ |
| End For |
| Output : | Display $S$ |
Give an approximate value to $10 ^ { - 3 }$ of the result displayed by this algorithm. b. In this question, $N$ is an integer strictly greater than 1. We divide the interval $[ 0 ; 1 ]$ into $N$ intervals of equal length. On each of these intervals, we construct a rectangle by proceeding in the same manner as in question 2.a. Modify the preceding algorithm so that it displays as output the sum of the areas of the $N$ rectangles thus constructed.
3. Calculation of the exact value of the area under a curve.
Let $g$ be the function defined on $\mathbb { R }$ by
$$g ( x ) = ( - x - 3 ) \mathrm { e } ^ { - x }$$
We admit that $g$ is an antiderivative of the function $f$ on $\mathbb { R }$. a. Calculate the area $\mathscr { A }$ of the region $\mathscr { D }$, expressed in square units. b. Give an approximate value to $10 ^ { - 3 }$ of the error made by replacing $\mathscr { A }$ by the approximate value found using the algorithm of question 2.a, that is the difference between these two values.