Fonctions de plusieurs variables
Chapitre 12
TSI (2e année) — Chapitre 12. Introduction à la topologie de \mathbb{R}^n, limite et continuité, dérivées partielles, applications de classe \mathcal{C}^k (k = 1 ou 2), gradient, règle de la chaîne, équations aux dérivées partielles, extremums d’une fonction de deux variables, applications géométriques (tangentes, plans tangents).
Ce chapitre a été réalisé conformément au programme marocain de mathématiques de la filière TSI.
Dans tout ce chapitre, E = \mathbb{R}^m est muni de sa base canonique \mathcal{B} = (e_1, \ldots, e_m) et de la norme euclidienne \|\cdot\|. On identifie un vecteur x \in \mathbb{R}^m avec ses coordonnées (x_1, \ldots, x_m) dans la base \mathcal{B}. Si m = 2 (resp. m = 3), on notera (x, y) plutôt que (x_1, x_2) (resp. (x, y, z) plutôt que (x_1, x_2, x_3)).
1 Introduction à la topologie de \mathbb{R}^n
1.1 Boules et voisinages
Définition 1.1 — (Boule ouverte, boule fermée)
Soient a \in \mathbb{R}^m et r > 0.
La boule ouverte de centre a et de rayon r est : B(a, r) = \{x \in \mathbb{R}^m \mid \|x - a\| < r\}
La boule fermée de centre a et de rayon r est : \overline{B}(a, r) = \{x \in \mathbb{R}^m \mid \|x - a\| \leq r\}
Définition 1.2 — (Ouvert, fermé)
Soit U une partie de \mathbb{R}^m.
- U est un ouvert si pour tout a \in U, il existe r > 0 tel que B(a, r) \subset U.
- U est un fermé si son complémentaire \mathbb{R}^m \setminus U est un ouvert.
Exemple 1.1
- \mathbb{R}^m et \varnothing sont des ouverts et des fermés.
- B(a, r) est un ouvert.
- \overline{B}(a, r) est un fermé.
1.2 Ensembles convexes
Définition 1.3 — (Ensemble convexe)
Une partie U de \mathbb{R}^m est dite convexe si pour tous x, y \in U et tout t \in [0, 1] : (1 - t)x + ty \in U
Autrement dit, le segment [x, y] est entièrement contenu dans U.
Exemple 1.2
Les boules ouvertes et fermées sont convexes. Les hyperplans ne sont pas convexes (ce sont des variétés affines).
1.3 Connexité par arcs
Définition 1.4 — (Connexe par arcs)
Une partie U de \mathbb{R}^m est dite connexe par arcs si pour tous x, y \in U, il existe une application continue \gamma : [0, 1] \to U telle que \gamma(0) = x et \gamma(1) = y.
Proposition 1.1
Tout ouvert convexe est connexe par arcs.
2 Limite et continuité
2.1 Limite
Définition 2.1 — (Limite d’une fonction de plusieurs variables)
Soit f : U \subset \mathbb{R}^m \to \mathbb{R} une fonction et a \in U. On dit que f admet pour limite l \in \mathbb{R} en a si : \forall \varepsilon > 0, \quad \exists \delta > 0, \quad (x \in U \text{ et } \|x - a\| < \delta) \implies |f(x) - l| < \varepsilon
On note \lim_{x \to a} f(x) = l.
2.2 Continuité
Définition 2.2 — (Continuité)
Soit f : U \subset \mathbb{R}^m \to \mathbb{R} une fonction. On dit que f est continue en a \in U si : \lim_{x \to a} f(x) = f(a)
f est continue sur U si elle est continue en tout point de U.
Proposition 2.1 — (Opérations sur les fonctions continues)
Soient f, g : U \to \mathbb{R} deux fonctions continues en a \in U.
- f + g, f - g, \lambda f sont continues en a.
- fg est continue en a.
- Si g(a) \neq 0, \frac{f}{g} est continue en a.
Proposition 2.2 — (Composition)
Si f : U \to \mathbb{R} est continue en a et \varphi : \mathbb{R} \to \mathbb{R} est continue en f(a), alors \varphi \circ f est continue en a.
2.3 Continuité des applications partielles
Proposition 2.3 — (Condition nécessaire)
Si f : U \subset \mathbb{R}^m \to \mathbb{R} est continue en a, alors toutes les applications partielles f_i : t \mapsto f(a_1, \ldots, a_{i-1}, t, a_{i+1}, \ldots, a_m) sont continues en a_i.
Attention : La réciproque est fausse ! Une fonction peut avoir toutes ses applications partielles continues sans être continue.
3 Dérivées partielles
3.1 Définition
Définition 3.1 — (Application partielle)
Soit f : U \subset \mathbb{R}^m \to \mathbb{R} et a = (a_1, \ldots, a_m) \in U. Pour i \in \{1, \ldots, m\}, on appelle i-ème application partielle de f en a la fonction : f_i : t \mapsto f(a_1, \ldots, a_{i-1}, t, a_{i+1}, \ldots, a_m) définie au voisinage de a_i.
Définition 3.2 — (Dérivée partielle)
On dit que f admet une dérivée partielle selon x_i en a si l’application partielle f_i est dérivable en a_i. On note : \frac{\partial f}{\partial x_i}(a) = f_i'(a_i) = \lim_{t \to 0} \frac{f(a + te_i) - f(a)}{t}
Pour calculer \frac{\partial f}{\partial x_i}(x, y), on « gèle » la variable y (considérée comme constante) et on dérive l’expression par rapport à x. De même, pour calculer \frac{\partial f}{\partial y}(x, y), on fixe x et on dérive l’expression par rapport à y.
Exemple 3.1
Pour f(x, y) = x^2 \cos(y) : \frac{\partial f}{\partial x}(x, y) = 2x \cos(y), \quad \frac{\partial f}{\partial y}(x, y) = -x^2 \sin(y)
3.2 Dérivée selon un vecteur
Définition 3.3 — (Dérivée selon un vecteur)
Soit f : U \to \mathbb{R} et a \in U. Soit h = (h_1, \ldots, h_m) \in \mathbb{R}^m \setminus \{0\}. On dit que f admet une dérivée en a selon le vecteur h si la fonction : \varphi(t) = f(a + th) est dérivable en t = 0. On note : D_h f(a) = \varphi'(0) = \lim_{t \to 0} \frac{f(a + th) - f(a)}{t}
Proposition 3.1 — (Dérivée selon tout vecteur pour une fonction \boldsymbol{\mathcal{C}^1})
Si f : U \to \mathbb{R} est de classe \mathcal{C}^1 sur l’ouvert U, alors pour tout point a \in U et tout vecteur non nul h = (h_1, \ldots, h_m) \in \mathbb{R}^m, f admet une dérivée selon le vecteur h au point a et : D_h f(a) = \sum_{k=1}^m h_k \frac{\partial f}{\partial x_k}(a)
L’existence des dérivées partielles n’implique pas la continuité. Par exemple, la fonction : f(x, y) = \begin{cases} \frac{x^3 - y^3}{x^2 + y^2} & \text{si } (x, y) \neq (0, 0) \\ 0 & \text{si } (x, y) = (0, 0) \end{cases} admet des dérivées partielles en (0,0) mais n’est pas continue en (0,0).
4 Applications de classe \mathcal{C}^1 et \mathcal{C}^2
4.1 Définition
Définition 4.1 — (Fonction de classe \boldsymbol{\mathcal{C}^1})
Soit f : U \subset \mathbb{R}^m \to \mathbb{R} avec U ouvert. On dit que f est de classe \mathcal{C}^1 sur U si :
- Pour tout point a \in U, f possède des dérivées partielles \frac{\partial f}{\partial x_i}(a) pour tout i \in \{1, \ldots, m\}.
- Chacune des m fonctions \frac{\partial f}{\partial x_i} : U \to \mathbb{R} est continue sur U.
On note \mathcal{C}^1(U, \mathbb{R}) l’ensemble des fonctions de classe \mathcal{C}^1 sur U.
Définition 4.2 — (Fonction de classe \boldsymbol{\mathcal{C}^2})
f : U \to \mathbb{R} est de classe \mathcal{C}^2 si f et ses m dérivées partielles \frac{\partial f}{\partial x_i} sont de classe \mathcal{C}^1. Autrement dit, les m^2 dérivées partielles d’ordre 2 existent et sont continues sur U.
4.2 Différentiabilité
Définition 4.3 — (Différentielle)
On dit que f : U \to \mathbb{R} est différentiable en a \in U s’il existe une application linéaire L : \mathbb{R}^m \to \mathbb{R} et une fonction \varepsilon : \mathbb{R}^m \to \mathbb{R} avec \varepsilon(h) \to 0 quand h \to 0 tels que : f(a + h) = f(a) + L(h) + \|h\| \varepsilon(h)
L’application linéaire L, si elle existe, est unique. On l’appelle la différentielle de f en a et on la note df(a).
Proposition 4.1 — (Différentiabilité implique continuité)
Si f est différentiable en a, alors f est continue en a.
Proposition 4.2 — (Différentiabilité et dérivées partielles)
Si f est différentiable en a, alors f possède des dérivées partielles en a selon toutes les variables et : df(a)(h) = \sum_{i=1}^m h_i \frac{\partial f}{\partial x_i}(a)
La réciproque est fausse : l’existence des dérivées partielles n’implique pas la différentiabilité.
4.3 Théorème de Schwarz
Théorème 4.1 — (Théorème de Schwarz)
Soit f : U \to \mathbb{R} une fonction de classe \mathcal{C}^2 sur un ouvert U de \mathbb{R}^m. Alors pour tout (i, j) \in \{1, \ldots, m\}^2 : \frac{\partial^2 f}{\partial x_i \partial x_j} = \frac{\partial^2 f}{\partial x_j \partial x_i}
Autrement dit, les dérivées partielles d’ordre 2 commutent.
5 Gradient
5.1 Définition
Définition 5.1 — (Gradient)
Soit f : U \subset \mathbb{R}^m \to \mathbb{R} une fonction différentiable en a. Le gradient de f en a est le vecteur : \nabla f(a) = \left(\frac{\partial f}{\partial x_1}(a), \frac{\partial f}{\partial x_2}(a), \ldots, \frac{\partial f}{\partial x_m}(a)\right)
Proposition 5.1 — (Lien entre gradient et différentielle)
Si f est différentiable en a, alors pour tout h \in \mathbb{R}^m : df(a)(h) = \langle \nabla f(a), h \rangle
où \langle \cdot, \cdot \rangle désigne le produit scalaire euclidien sur \mathbb{R}^m.
Proposition 5.2 — (Dérivée selon un vecteur et gradient)
Si f est de classe \mathcal{C}^1 sur U, alors pour tout vecteur non nul h \in \mathbb{R}^m : D_h f(a) = \langle \nabla f(a), h \rangle
5.2 Interprétation géométrique
Proposition 5.3 — (Gradient et lignes de niveau)
Le gradient \nabla f(a) est orthogonal aux lignes de niveau de f passant par a. Plus précisément, si \gamma est une courbe de niveau de f passant par a, alors : \langle \nabla f(a), \gamma'(0) \rangle = 0
6 Règle de la chaîne
6.1 Composition de fonctions
Théorème 6.1 — (Règle de la chaîne)
Soient f : U \subset \mathbb{R}^m \to \mathbb{R} de classe \mathcal{C}^1 et \gamma : I \to U de classe \mathcal{C}^1, où I est un intervalle de \mathbb{R}. Alors f \circ \gamma : I \to \mathbb{R} est de classe \mathcal{C}^1 et : (f \circ \gamma)'(t) = df(\gamma(t))(\gamma'(t)) = \sum_{i=1}^m \frac{\partial f}{\partial x_i}(\gamma(t)) \cdot \gamma_i'(t) = \langle \nabla f(\gamma(t)), \gamma'(t) \rangle
6.2 Composition par une application de plusieurs variables
Théorème 6.2 — (Règle de la chaîne généralisée)
Soient f : U \subset \mathbb{R}^m \to \mathbb{R} de classe \mathcal{C}^1, \varphi : V \subset \mathbb{R}^p \to U de classe \mathcal{C}^1, où U et V sont des ouverts. Alors g = f \circ \varphi : V \to \mathbb{R} est de classe \mathcal{C}^1 et pour tout j \in \{1, \ldots, p\} : \frac{\partial g}{\partial u_j}(u) = \sum_{i=1}^m \frac{\partial f}{\partial x_i}(\varphi(u)) \cdot \frac{\partial \varphi_i}{\partial u_j}(u)
Exemple 6.1 — (Cas particulier : \boldsymbol{m = 1})
Si f : I \to \Omega' \subset \mathbb{R}^m est de classe \mathcal{C}^1 sur un intervalle I et g : \Omega' \to \mathbb{R} est de classe \mathcal{C}^1, alors h = g \circ f est de classe \mathcal{C}^1 sur I et : h'(t) = \sum_{i=1}^m \frac{\partial g}{\partial x_i}(f(t)) \cdot f_i'(t)
6.3 Changement de variables classiques
Exemple 6.2 — (Changement de variable linéaire)
Soit \varphi : \mathbb{R}^2 \to \mathbb{R}^2 définie par \varphi(u, v) = (au + bv, cu + dv) avec ad - bc \neq 0. Alors \varphi est un isomorphisme de classe \mathcal{C}^\infty.
Si f est de classe \mathcal{C}^1 et g(u, v) = f(au + bv, cu + dv), alors : \frac{\partial g}{\partial u}(u, v) = a \frac{\partial f}{\partial x}(au + bv, cu + dv) + c \frac{\partial f}{\partial y}(au + bv, cu + dv) \frac{\partial g}{\partial v}(u, v) = b \frac{\partial f}{\partial x}(au + bv, cu + dv) + d \frac{\partial f}{\partial y}(au + bv, cu + dv)
Exemple 6.3 — (Coordonnées polaires)
Soit \varphi : \mathbb{R}^+ \times [0, 2\pi[ \to \mathbb{R}^2 définie par \varphi(r, \theta) = (r\cos\theta, r\sin\theta). Si f est de classe \mathcal{C}^1 et g(r, \theta) = f(r\cos\theta, r\sin\theta), alors : \frac{\partial g}{\partial r}(r, \theta) = \cos\theta \frac{\partial f}{\partial x}(r\cos\theta, r\sin\theta) + \sin\theta \frac{\partial f}{\partial y}(r\cos\theta, r\sin\theta) \frac{\partial g}{\partial \theta}(r, \theta) = -r\sin\theta \frac{\partial f}{\partial x}(r\cos\theta, r\sin\theta) + r\cos\theta \frac{\partial f}{\partial y}(r\cos\theta, r\sin\theta)
7 Équations aux dérivées partielles
7.1 Exemples du premier ordre
Exemple 7.1 — (Équation \boldsymbol{\frac{\partial f}{\partial x} = 0})
Soit f : \mathbb{R}^2 \to \mathbb{R} de classe \mathcal{C}^1. Alors : \frac{\partial f}{\partial x} = 0 \iff \exists h : \mathbb{R} \to \mathbb{R} \text{ de classe } \mathcal{C}^1 \text{ telle que } \forall (x, y) \in \mathbb{R}^2, \; f(x, y) = h(y)
Exemple 7.2 — (Équation de transport)
Résoudre l’équation \frac{\partial f}{\partial x} + 2\frac{\partial f}{\partial y} = 0.
En posant le changement de variables u = x - y/2, v = y, on obtient \frac{\partial g}{\partial v} = 0, donc g(u, v) = H(u). En revenant aux variables initiales : f(x, y) = H(x - y/2)
Exemple 7.3 — (Équation en coordonnées polaires)
Résoudre l’équation x\frac{\partial f}{\partial x} + y\frac{\partial f}{\partial y} = 0.
En passant en coordonnées polaires x = r\cos\theta, y = r\sin\theta, on obtient : r\frac{\partial g}{\partial r} = 0 \implies \frac{\partial g}{\partial r} = 0 \implies g(r, \theta) = H(\theta) En revenant aux variables initiales : f(x, y) = H\left(\arctan\frac{y}{x}\right)
7.2 Exemple du second ordre
Exemple 7.4 — (Équation des ondes)
Résoudre l’équation des ondes \frac{\partial^2 f}{\partial x^2} - \frac{\partial^2 f}{\partial y^2} = 0.
En posant le changement de variables u = x + y, v = x - y, on obtient : \frac{\partial^2 g}{\partial u \partial v} = 0
Les solutions sont de la forme g(u, v) = H(u) + K(v), d’où : f(x, y) = H(x + y) + K(x - y) où H et K sont des fonctions de classe \mathcal{C}^2 d’une variable.
8 Extremums d’une fonction de deux variables
8.1 Extremum local
Définition 8.1 — (Extremum local)
Soit f : U \subset \mathbb{R}^2 \to \mathbb{R} et a \in U. On dit que f admet un maximum local (resp. minimum local) en a s’il existe un voisinage V de a dans U tel que : \forall x \in V, \quad f(x) \leq f(a) \quad (\text{resp. } f(x) \geq f(a))
8.2 Théorème d’ordre 1
Théorème 8.1 — (Condition nécessaire d’ordre 1)
Soit f : U \subset \mathbb{R}^2 \to \mathbb{R} une fonction de classe \mathcal{C}^1 sur l’ouvert U. Si f admet un extremum local en a \in U, alors : \nabla f(a) = 0 \quad \text{c'est-à-dire} \quad \frac{\partial f}{\partial x}(a) = 0 \text{ et } \frac{\partial f}{\partial y}(a) = 0
Définition 8.2 — (Point critique)
On dit que a \in U est un point critique de f si \nabla f(a) = 0.
8.3 Étude au second ordre
Proposition 8.1 — (Condition suffisante d’ordre 2)
Soit f : U \subset \mathbb{R}^2 \to \mathbb{R} une fonction de classe \mathcal{C}^2 sur l’ouvert U. Soit a \in U un point critique de f. On note : r = \frac{\partial^2 f}{\partial x^2}(a), \quad s = \frac{\partial^2 f}{\partial x \partial y}(a), \quad t = \frac{\partial^2 f}{\partial y^2}(a)
- Si rt - s^2 > 0 et r > 0 (donc t > 0), alors f admet un minimum local en a.
- Si rt - s^2 > 0 et r < 0 (donc t < 0), alors f admet un maximum local en a.
- Si rt - s^2 < 0, alors a est un point selle (ni maximum ni minimum local).
- Si rt - s^2 = 0, on ne peut pas conclure.
La condition rt - s^2 est le déterminant de la matrice hessienne de f en a : H_f(a) = \begin{pmatrix} r & s \\ s & t \end{pmatrix}
Le théorème spectral s’applique à cette matrice symétrique réelle : si les deux valeurs propres sont strictement positives, f admet un minimum local ; si elles sont strictement négatives, f admet un maximum local ; si elles sont de signes contraires, a est un point selle.
8.4 Méthode d’étude des extremums globaux
Proposition 8.2 — (Méthode d’étude)
Pour étudier les extremums globaux d’une fonction f sur un domaine K :
- Étudier f sur l’intérieur de K : déterminer les points critiques de f sur \mathring{K} et leur nature (maximum, minimum local, ou point selle).
- Étudier f sur le bord de K : restreindre f au bord de K et étudier les extremums de ces restrictions.
- Comparer les valeurs : comparer les valeurs de f aux points critiques intérieurs et sur le bord.
Exemple 8.1
On considère le domaine \Delta = \{(x, y) \in \mathbb{R}^2 \mid -1 \leq x \leq y \leq 1\} et la fonction f définie sur \Delta par f(x, y) = (y - x)^3 + 6xy. Déterminer son maximum et son minimum global.
Étape 1 : La fonction f est de classe \mathcal{C}^1 sur l’intérieur \mathring{\Delta} = \{(x, y) \in \mathbb{R}^2 \mid -1 < x < y < 1\} et on calcule : \frac{\partial f}{\partial x}(x, y) = 6y - 3(y - x)^2, \quad \frac{\partial f}{\partial y}(x, y) = 6x + 3(y - x)^2
On trouve les points critiques intérieurs (x, y) qui doivent vérifier (y-x)^2 = 2y = -2x, d’où y = -x puis y = -x = 1/2. On calcule f(-1/2, 1/2) = -1/2.
Étape 2 : On étudie la restriction de f sur les trois segments qui forment le bord du domaine.
Étape 3 : On compare les valeurs et on conclut.
9 Applications géométriques
9.1 Tangente à une courbe
Définition 9.1 — (Vecteur tangent)
Soit \gamma : I \to \mathbb{R}^2 un arc paramétré de classe \mathcal{C}^1 et a = \gamma(t_0). Le vecteur \gamma'(t_0) est appelé vecteur tangent à la courbe \gamma au point a.
Si \gamma'(t_0) \neq 0, la droite passant par a et dirigée par \gamma'(t_0) est la tangente à la courbe au point a.
9.2 Plan tangent à une surface
Définition 9.2 — (Plan tangent)
Soient f : U \subset \mathbb{R}^2 \to \mathbb{R} de classe \mathcal{C}^1 et \Sigma la surface d’équation z = f(x, y). Le plan tangent à \Sigma en le point (a, b, c) = (a, b, f(a, b)) est le plan d’équation : z - c = \frac{\partial f}{\partial x}(a, b)(x - a) + \frac{\partial f}{\partial y}(a, b)(y - b)
Définition 9.3 — (Plan tangent à une surface de niveau)
Soient f : U \subset \mathbb{R}^3 \to \mathbb{R} de classe \mathcal{C}^1 et \Sigma la surface d’équation f(M) = k (surface de niveau). Le plan tangent à \Sigma en le point régulier M_0 \in \Sigma est le plan passant par M_0 et orthogonal à \nabla f(M_0).
Une équation du plan tangent à \Sigma en M_0 est : \langle \nabla f(M_0), M \rangle = \langle \nabla f(M_0), M_0 \rangle
9.3 Vecteurs tangents au graphe d’une fonction
Proposition 9.1
Soit f : U \subset \mathbb{R}^2 \to \mathbb{R} différentiable et X le graphe de f, c’est-à-dire la partie de \mathbb{R}^3 définie par : X = \{(x, y, z) \mid (x, y) \in U \text{ et } z = f(x, y)\}
Les vecteurs tangents à X en (a, b, c) \in X constituent le plan d’équation : \frac{\partial f}{\partial x}(a, b) \cdot x + \frac{\partial f}{\partial y}(a, b) \cdot y - z = 0
10 Exercices
Exercice 10.1
Soit f(x, y) = x^2 y + e^{xy}. Calculer \frac{\partial f}{\partial x}, \frac{\partial f}{\partial y} et \nabla f.
Exercice 10.2
Soit f(x, y) = \sqrt{x^2 + y^2}. Montrer que f n’est pas différentiable en (0,0).
Exercice 10.3
Soit f(x, y, z) = x^2 + y^2 - z^2. Déterminer les points critiques de f et leur nature.
Exercice 10.4
Résoudre l’équation aux dérivées partielles : \frac{\partial f}{\partial x} + 2\frac{\partial f}{\partial y} = 0 en utilisant un changement de variable linéaire.
Exercice 10.5
Soit f(x, y) = x^2 y + \sin(xy). Calculer \frac{\partial^2 f}{\partial x \partial y} et \frac{\partial^2 f}{\partial y \partial x}. Vérifier le théorème de Schwarz.
Exercice 10.6 — (Extremums)
Soit f(x, y) = x^2 + y^2 - 2x - 4y + 5.
- Déterminer les points critiques de f.
- Déterminer la nature de chaque point critique.
- f admet-elle un extremum global ? Si oui, lequel ?
Exercice 10.7 — (Plan tangent)
Soit f(x, y) = x^2 + y^2. Déterminer l’équation du plan tangent au graphe de f au point (1, 1, 2).
Exercice 10.8 — (Équation des ondes)
Résoudre l’équation des ondes \frac{\partial^2 f}{\partial x^2} - \frac{\partial^2 f}{\partial y^2} = 0 en utilisant le changement de variable u = x + y, v = x - y.
Exercice 10.9 — (Optimisation sous contrainte)
Soit f(x, y) = xy et la contrainte g(x, y) = x^2 + y^2 - 1 = 0. Déterminer les extremums de f sur le cercle unité.