Salta al contenuto
Note per Studenti Free Extrema in Several Variables Report

Free Extrema in Several Variables

In questa pagina 4

This note builds on Differentiability and the Gradientf is differentiable at x0 if f(x) = f(x0) + grad f(x0)·(x - x0) + o(‖x - x0‖), i.e. near x0 the graph is indistinguishable from the tangent plane z = f(x0) + grad f(x0)·(x - x0). Differentiable implies continuous, with partial derivatives and D_v f = grad f · v; continuous partial derivatives imply differentiable. The gradient gives the direction of steepest increase (slope ‖grad f‖) and is orthogonal to level curves.Differentiability and the Gradient → and Hessian Matrix and Taylor FormulaThe second derivatives form the Hessian matrix H_f, symmetric by Schwarz's theorem (continuous mixed derivatives). Second-order Taylor: f(x0 + h) = f(x0) + grad f(x0)·h + (1/2) h^T H_f(x0) h + o(‖h‖^2). A symmetric matrix is positive or negative definite, semidefinite or indefinite according to the sign of the quadratic form h^T A h, recognized via eigenvalues or leading principal minors (in 2x2: determinant and first entry).Hessian Matrix and Taylor Formula →.

Critical points

Let f:Ω⊆Rn→Rf: \Omega \subseteq \mathbb{R}^n \to \mathbb{R} be a function defined on an open set Ω\Omega. A point x0∈Ωx_0 \in \Omega is called:

Definition. A relative maximum (minimum) point if there is a neighbourhood UU of x0x_0 such that f(x)≤f(x0)f(x) \le f(x_0) (f(x)≥f(x0)f(x) \ge f(x_0)) for every x∈U∩Ωx \in U \cap \Omega.

Example. f(x,y)=−x2−y2f(x,y) = -x^2 - y^2 has a relative (also absolute) maximum at (0,0)(0,0): f(x,y)≤0=f(0,0)f(x,y) \le 0 = f(0,0).

If ff is differentiable at x0x_0 and x0x_0 is a relative extremum interior to Ω\Omega, then Fermat's theorem must hold:

Theorem (Fermat). If x0x_0 is a relative extremum point for ff and ff is differentiable at x0x_0, then ∇f(x0)=0\nabla f(x_0) = 0.

Example. f(x,y)=x2+y2−2xf(x,y) = x^2 + y^2 - 2x has its minimum at (1,0)(1,0) and indeed ∇f=(2x−2,2y)=(0,0)\nabla f = (2x - 2, 2y) = (0,0) there.

Why. Fix a direction: the one-variable function g(t)=f(x0+tei)g(t) = f(x_0 + te_i) has a relative extremum at t=0t = 0, which is interior to its domain (because x0x_0 is interior). By Fermat's theorem in one variable g′(0)=0g'(0) = 0, and g′(0)=∂f∂xi(x0)g'(0) = \frac{\partial f}{\partial x_i}(x_0). This holds for every ii, so the whole gradient vanishes.

The points where the gradient vanishes are called critical points (or stationary points) of the function. As in one variable, the condition is only necessary: f(x,y)=x2−y2f(x, y) = x^2 - y^2 has zero gradient at (0,0)(0,0), but the origin is neither a maximum nor a minimum.

Definition. A critical point x0x_0 is a saddle point if in every neighbourhood of it there are points where f>f(x0)f > f(x_0) and points where f<f(x0)f < f(x_0).

Example. f(x,y)=x2−y2f(x,y) = x^2 - y^2 at (0,0)(0,0): f(x,0)=x2>0f(x,0) = x^2 > 0 and f(0,y)=−y2<0f(0,y) = -y^2 < 0 in every neighbourhood, so (0,0)(0,0) is a saddle point.

Second-order conditions

To classify the critical points, suppose f∈C2(Ω)f \in C^2(\Omega). The nature of the point depends on the quadratic form associated with the Hessian matrixThe second derivatives form the Hessian matrix H_f, symmetric by Schwarz's theorem (continuous mixed derivatives). Second-order Taylor: f(x0 + h) = f(x0) + grad f(x0)·h + (1/2) h^T H_f(x0) h + o(‖h‖^2). A symmetric matrix is positive or negative definite, semidefinite or indefinite according to the sign of the quadratic form h^T A h, recognized via eigenvalues or leading principal minors (in 2x2: determinant and first entry).Hessian Matrix and Taylor Formula → Hf(x0)H_f(x_0), defined by Hij=∂2f∂xi∂xjH_{ij} = \frac{\partial^2 f}{\partial x_i \partial x_j}.

Theorem. Let x0x_0 be a critical point of ff.

  1. If Hf(x0)H_f(x_0) is positive definite, then x0x_0 is a local minimum.
  2. If Hf(x0)H_f(x_0) is negative definite, then x0x_0 is a local maximum.
  3. If Hf(x0)H_f(x_0) is indefinite, then x0x_0 is a saddle point.
  4. If Hf(x0)H_f(x_0) is semidefinite, the test is inconclusive.

Example. f(x,y)=x3−3x+y2f(x,y) = x^3 - 3x + y^2 has critical points (±1,0)(\pm 1, 0) and H=(6x002)H = \begin{pmatrix} 6x & 0 \\ 0 & 2 \end{pmatrix}. At (1,0)(1,0): diag⁡(6,2)\operatorname{diag}(6,2) is positive definite, local minimum. At (−1,0)(-1,0): diag⁡(−6,2)\operatorname{diag}(-6,2) is indefinite, saddle.

Idea of the proof. At the critical point the Taylor formula gives f(x0+h)−f(x0)=12hTHf(x0) h+o(∥h∥2)f(x_0 + h) - f(x_0) = \frac12 h^T H_f(x_0)\,h + o(\|h\|^2) If the quadratic form is positive definite, it is at least m∥h∥2m\|h\|^2 for some m>0m > 0 (the smallest eigenvalue), and for small hh it dominates the error o(∥h∥2)o(\|h\|^2): the difference is positive, so x0x_0 is a minimum. If it is indefinite, along one direction the difference is positive and along another negative: saddle. If it is semidefinite, in the directions where the form vanishes the error decides, i.e. the higher-order derivatives: that is why the test is silent.

For n=1n = 1 we recover the second-derivative test: Hf=(f′′(x0))H_f = (f''(x_0)) is positive definite if f′′(x0)>0f''(x_0) > 0.

Sylvester's criterion for n=2n=2

For n=2n=2, let Hf=(fxxfxyfyxfyy)H_f = \begin{pmatrix} f_{xx} & f_{xy} \\ f_{yx} & f_{yy} \end{pmatrix}. Define D=det⁡(Hf)=fxxfyy−(fxy)2D = \det(H_f) = f_{xx}f_{yy} - (f_{xy})^2.

  • If D>0D > 0: the matrix is definite (positive if fxx>0f_{xx} > 0, negative if fxx<0f_{xx} < 0).
  • If D<0D < 0: the matrix is indefinite (saddle point).
  • If D=0D = 0: the test fails (a local study is necessary).

In the case D>0D > 0 it suffices to look at fxxf_{xx}: for D>0D > 0 we must have fxxfyy>fxy2≥0f_{xx}f_{yy} > f_{xy}^2 \geq 0, so fxxf_{xx} and fyyf_{yy} have the same sign.

The case D=0D = 0: three functions with the same zero Hessian at (0,0)(0,0).

  • x4+y4x^4 + y^4: f(x,y)>0=f(0,0)f(x,y) > 0 = f(0,0) away from the origin, absolute minimum.
  • −(x4+y4)-(x^4 + y^4): maximum.
  • x4−y4x^4 - y^4: on the xx axis it is positive, on the yy axis negative, saddle.

The Hessian cannot tell them apart: one needs the study of the sign of f(x)−f(x0)f(x) - f(x_0) near the point, for instance with restrictions to lines or curves.

Worked example

Let f(x,y)=3x2y+4y3−3x2−12y2+1f(x,y) = 3x^2y + 4y^3 - 3x^2 - 12y^2 + 1, defined and C2C^2 on all of R2\mathbb{R}^2.

  1. Gradient: fx=6xy−6x=6x(y−1)f_x = 6xy - 6x = 6x(y - 1), fy=3x2+12y2−24y\quad f_y = 3x^2 + 12y^2 - 24y.
  2. Critical points. fx=0f_x = 0 if x=0x = 0 or y=1y = 1 (we factored to split the system into two cases).
    • x=0x = 0: fy=12y2−24y=12y(y−2)=0f_y = 12y^2 - 24y = 12y(y - 2) = 0, so y=0y = 0 or y=2y = 2: points (0,0)(0, 0) and (0,2)(0, 2).
    • y=1y = 1: fy=3x2+12−24=3x2−12=0f_y = 3x^2 + 12 - 24 = 3x^2 - 12 = 0, so x=±2x = \pm 2: points (2,1)(2, 1) and (−2,1)(-2, 1).
  3. Hessian: fxx=6y−6f_{xx} = 6y - 6, fxy=6xf_{xy} = 6x, fyy=24y−24f_{yy} = 24y - 24: Hf(x,y)=(6y−66x6x24y−24)H_f(x, y) = \begin{pmatrix} 6y-6 & 6x \\ 6x & 24y-24 \end{pmatrix}
  4. Classification:
    • (0,0)(0,0): Hf=(−600−24)H_f = \begin{pmatrix} -6 & 0 \\ 0 & -24 \end{pmatrix}, det⁡=144>0\det = 144 > 0 and fxx=−6<0f_{xx} = -6 < 0: local maximum, f(0,0)=1f(0,0) = 1.
    • (0,2)(0,2): Hf=(60024)H_f = \begin{pmatrix} 6 & 0 \\ 0 & 24 \end{pmatrix}, det⁡=144>0\det = 144 > 0 and fxx=6>0f_{xx} = 6 > 0: local minimum, f(0,2)=32−48+1=−15f(0, 2) = 32 - 48 + 1 = -15.
    • (±2,1)(\pm 2, 1): Hf=(0±12±120)H_f = \begin{pmatrix} 0 & \pm 12 \\ \pm 12 & 0 \end{pmatrix}, det⁡=−144<0\det = -144 < 0: saddles.

Neither extremum is absolute: along the yy axis, f(0,y)=4y3−12y2+1f(0, y) = 4y^3 - 12y^2 + 1 goes to +∞+\infty as y→+∞y \to +\infty and to −∞-\infty as y→−∞y \to -\infty.

Grafico interattivo: Level curves of f = 3x²y + 4y³ − 3x² − 12y² + 1: local maximum at (0, 0), local minimum at (0, 2), saddles at (±2, 1) where the level −7 crosses itself

Common mistakes

  • Failed test: when det⁡(Hf)=0\det(H_f) = 0, do not conclude that the point is a saddle or an extremum. One must study the variation of f(x,y)−f(x0,y0)f(x,y) - f(x_0, y_0) directly (e.g. restrictions to lines y=mxy=mx or y=x2y=x^2).
  • Losing solutions of the system ∇f=0\nabla f = 0: do not divide by a variable that may be zero (6x(y−1)=06x(y-1) = 0 splits into x=0x = 0 or y=1y = 1).
  • Forgetting the points of non-differentiability: Fermat holds where ff is differentiable. x2+y2\sqrt{x^2 + y^2} has a minimum at the origin, where the gradient does not exist.
  • Confusing local and absolute: a relative maximum may not be the maximum of the function.

Versione ripasso

Relative maxima and minima. x0x_0 is a relative maximum (minimum) if there is a neighbourhood UU with f(x)≤f(x0)f(x) \le f(x_0) (f(x)≥f(x0)f(x) \ge f(x_0)) for every x∈U∩Ωx \in U \cap \Omega.

Fermat's theorem. If x0x_0 is an interior relative extremum and ff is differentiable at x0x_0, then ∇f(x0)=0\nabla f(x_0) = 0. Proof: each g(t)=f(x0+tei)g(t) = f(x_0 + te_i) has an extremum at t=0t = 0, so g′(0)=∂f∂xi(x0)=0g'(0) = \frac{\partial f}{\partial x_i}(x_0) = 0.

  • The condition is only necessary: x2−y2x^2 - y^2 has zero gradient at (0,0)(0,0), but it is a saddle.
  • Saddle: in every neighbourhood there are points with f>f(x0)f > f(x_0) and points with f<f(x0)f < f(x_0).

Hessian test. If f∈C2f \in C^2 and x0x_0 is critical, with Hij=∂2f∂xi∂xjH_{ij} = \frac{\partial^2 f}{\partial x_i\partial x_j}:

  1. HH positive definite: local minimum.
  2. HH negative definite: local maximum.
  3. HH indefinite: saddle.
  4. HH semidefinite: the test does not decide.

Idea: f(x0+h)−f(x0)=12hTHh+o(∥h∥2)f(x_0+h) - f(x_0) = \frac12 h^T H h + o(\|h\|^2). With HH positive definite the quadratic term dominates; with HH semidefinite the higher-order derivatives decide.

Case n=2n = 2. With D=fxxfyy−fxy2D = f_{xx}f_{yy} - f_{xy}^2:

  • D>0D > 0 and fxx>0f_{xx} > 0: minimum;
  • D>0D > 0 and fxx<0f_{xx} < 0: maximum;
  • D<0D < 0: saddle;
  • D=0D = 0: study the sign of f−f(x0)f - f(x_0). Examples with zero Hessian at (0,0)(0,0): x4+y4x^4+y^4 minimum, −(x4+y4)-(x^4+y^4) maximum, x4−y4x^4-y^4 saddle.

Worked example. f=3x2y+4y3−3x2−12y2+1f = 3x^2y + 4y^3 - 3x^2 - 12y^2 + 1.

  1. fx=6x(y−1)f_x = 6x(y-1), fy=3x2+12y2−24yf_y = 3x^2 + 12y^2 - 24y. The system splits into x=0x = 0 or y=1y = 1.
  2. Critical points: (0,0)(0,0), (0,2)(0,2), (±2,1)(\pm2, 1).
  3. H=(6y−66x6x24y−24)H = \begin{pmatrix}6y-6 & 6x\\ 6x & 24y-24\end{pmatrix}.
  4. (0,0)(0,0): det⁡=144>0\det = 144 > 0, fxx<0f_{xx} < 0, maximum with f=1f = 1. (0,2)(0,2): det⁡=144>0\det = 144 > 0, fxx>0f_{xx} > 0, minimum with f=−15f = -15. (±2,1)(\pm2,1): det⁡=−144\det = -144, saddles with f=−7f = -7.

Along the yy axis, f(0,y)=4y3−12y2+1f(0,y) = 4y^3 - 12y^2 + 1 goes to ±∞\pm\infty: the two extrema are not absolute.

Typical mistakes.

  • Concluding with det⁡H=0\det H = 0 instead of studying f−f(x0)f - f(x_0) directly.
  • Losing solutions of the system ∇f=0\nabla f = 0 by dividing by a variable that may be zero.
  • Applying Fermat at points of non-differentiability: x2+y2\sqrt{x^2+y^2} has a minimum at the origin, where the gradient does not exist.
  • Confusing local and absolute extrema.

Teoria collegata