\( \usepackage{hyperref} \newcommand{\R}{\mathbb{R}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\Rp}{\mathbb{R_+}} \newcommand{\cC}{\mathcal{C}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\Rn}{\mathbb{R}^n} \newcommand{\N}{\mathbb{N}} \renewcommand{\to}{\rightarrow} \newcommand{\from}{\colon} \renewcommand{\Vec}{\mathsf{vec}} \newcommand{\Ker}{\mathrm{Ker}} \renewcommand{\Im}{\mathrm{Im}} \newcommand{\rang}{\mathrm{rang}} \newcommand{\dpartial}[2]{{\partial #1 \over \partial #2}} \usepackage{amsthm} \newtheorem{theorem}{Théorème}[section] \newtheorem{definition}[theorem]{Définition} \newtheorem{lemma}[theorem]{Lemme} \newtheorem{exercice}{Exercice}[section] \newtheorem{correction}{Correction} \newtheorem{example}{Exemple}[section] \newtheorem{observation}{Observation}[section] \AtBeginDocument{\renewcommand\proofname{Démonstration}} \)

TD 5 : Fonctions Ă  une variable

MIA

Calculez les dérivées suivantes :

  1. \(f_1(x) = cos(x^2+2x)\)
  2. \(f_2(x) = e^{1+\ln(x)}\)
  3. \(f_3(x) = x^{1\over 3}+2\sin(x)+4\)
  4. \(f_4(x) = 1 \over 2x + 3\)
Correction
  1. On a \(\cos'(x) = -\sin(x)\) donc \(f_1'(x) = -\sin(x^2+2x)(2x+2)\).
  2. On peut récrire \(f_2(x)\) en \(e \times e^{\ln(x) = ex\) donc \(f_2'(x) = e\).
  3. \(f_3'(x) = {1 \over 3} x^{-2 \over 3} + 2\cos(x)\)
  4. \(f_4'(x) = {-2 \over (2x + 3)^2}\).

Montrez que :

  1. \(f_1(x) = {\sin(x) + \log(1+x) \over x} \simeq_0 2\)
  2. \(f_2(x) = x^2 + \sin(x)\cos(x) + e^{1 \over x} = O(x^2)\).
  3. \(f_3(x) = e^x-1-x = o(x)\).
Correction
  1. En utilisant la dérivée:
  • \(\sin(x) = \sin(0) + \cos(0)x + o_0(x) = 0 + x + o_0(x)\) et
  • \(\log(1+x) = \log(1+0) + {1 \over 1+0} x + o_0(x) = 0 + x + o_0(x)\).

Donc \({f_1(x) \over 2} = {x + x + o_0(x) \over 2x} = 1 + o_0(1) \rightarrow_{x \to 0} 1\) donc \(f_1(x) \simeq_0 2\).

  1. \(|{f_2(x) \over x^2}| = |1 + {\sin(x)\cos(x) \over x^2} + {e^{1 \over x} \over x^2}| \leq 2\) pour \(x > 2\) donc \(f_2(x) \over x^2\) est bornée quand \(x \to +\infty\), ce qui prouve \(f_2(x) = O(x^2)\).

  2. On va encore faire un développement limité : \(e^x = e^0 + e^0 x + o(x)\) donc \(f_3(x) = o(x)\).

On considère la fonction suivante :

\[ f(x) = \begin{cases} e^x \text{ si } x < 0 \\ 1+x \text{ si } x \geq 0 \end{cases} \]

  1. Montrez que \(f\) est continue sur \(\mathbb{R}\).
  2. Montrez que \(f\) est dérivable sur \(\mathbb{R}\).
  3. \(f\) est-elle dans \(\cC_2(\mathbb{R},\mathbb{R})\) ?
Correction
  1. Comme \(x \mapsto e^x\) et \(x \mapsto 1+x\) sont continues sur \(\mathbb{R}\), on a que \(f\) est continue sur \(\mathbb{R}\setminus{0}\). Il faut donc juste montrer que \(f(x) \to_{x \to 0} f(0)\). On a \(f(0) = 1\). Or, comme \(e^0=1=0+1\), on a bien la continuité de \(f\) en \(0\).

  2. Comme précédemment, \(f\) est dérivable, il suffit de vérifier que \(f\) est dérivable en \(0\). Si on note \(f_1(x) = e^x\) et \(f_2(x) = 1+x\), on a \(f_1'(0) = f_2'(0) = 1\) donc \({f(h)-f(0) \over h} \rightarrow_{h \to 0} 1\) puisque cette limite est valable à gauche comme à droite.

  3. \(f'\) n’est pas dérivable en \(0\). En effet \(f_1''(0) = e^0 = 1\) et \(f_2''(0) = 0\).

On considère la fonction \(x \mapsto 4x^2+2x+4\).

  1. Faites trois étapes de la méthodes de descente de gradient en partant de \(x_0 = 2\) et avec \(\alpha = 0.1\).
  2. Même question avec \(\alpha = 1/8\). Qu’observez-vous ?
Correction
  1. Si \(f(x) = 4x^2+2x+4\) alors \(f'(x) = 8x+2\) donc \(f'(x_0) = 18\). On a donc \(x_1 = x_0 - 0.1f'(x_0) = 0.2\). De mĂŞme, \(x_2 = x_1 - 0.1f'(x_1) = 0.2 - 0.1 \times 3.6 = -0.16\). Enfin \(x_3 = x_2 - 0.1f'(x_2) = -0.16 - 0.1 \times 0.72 = -0.232\).

  2. Si on fait pareil avec \(\alpha = {1 \over 8}\), alors \(x_1 = 2 - {18 \over 8} = -{1 \over 4}\). On converge donc en un pas vers le minimum de la fonction. À partir de là, \(x_3 = x_2 = x_1\) puisque \(f'(x_1) = 0\).