maths.freeMultivariable Calculus › Optimisation in several variables

Optimisation in several variables

Critical points, the second-derivative test, and Lagrange multipliers.

Critical points are where the gradient vanishes; the Hessian's determinant sorts them into minima, maxima and saddles. With a constraint, Lagrange multipliers say the gradients of f and of the constraint are parallel at the optimum. Picture it: the surface's bowl bottom, hilltop or saddle — the 3D view shows which. Think it: constrained optimisation is the geometry of tangency between level sets.

工作范例: gradient of x^2 + y^2 - 2x - 4y

Gradient of x^2 - 2x + y^2 - 4y

x^{2} - 2 x + y^{2} - 4 y

一步

  1. f(x, y) = x^{2} - 2 x + y^{2} - 4 y

    The gradient is the vector of partial derivatives — differentiate with respect to each variable, holding the others constant.

  2. \frac{\partial f}{\partial x} = 2 x - 2

    Treat every variable except x as a constant.

  3. \frac{\partial f}{\partial y} = 2 y - 4

    Treat every variable except y as a constant.

  4. \nabla f = \left[\begin{matrix}2 x - 2\\2 y - 4\end{matrix}\right]

    Assemble the gradient vector. It points in the direction of steepest ascent.

  5. (1, 2)

    Critical points: where every partial derivative is zero.

发送答案
\nabla f = \left[\begin{matrix}2 x - 2\\2 y - 4\end{matrix}\right]

Symbols used here

\frac{\partial f}{\partial x}
partial derivative
Derivative with respect to x, holding the other variables fixed.
\nabla f
gradient (nabla, del)
Vector of partial derivatives; points uphill.
A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}
matrix
A rectangular array of numbers; a linear map.
\leq,\ \geq
less/greater than or equal
Inequalities that allow equality; < and > exclude it.
\int f(x)\,dx,\ \int_a^b
integral
Antiderivative (indefinite) or signed area from a to b (definite).
\iint,\ \oint
double / contour integral
Integral over a region of the plane; integral around a closed curve.
\mathbf{v},\ \vec{v}
vector
A quantity with magnitude and direction; a column of numbers.
\mathbf{u} \cdot \mathbf{v},\ \|\mathbf{v}\|
dot product, norm
Σ u_i v_i; the length of v, √(v·v).

How to: Optimisation in several variables

  1. The gradient is the vector of partial derivatives — differentiate with respect to each variable, holding the others constant.
  2. Treat every variable except x as a constant.
  3. Treat every variable except y as a constant.
  4. Assemble the gradient vector. It points in the direction of steepest ascent.
  5. Critical points: where every partial derivative is zero.

Questions people ask

What is a partial derivative?

The ordinary derivative with respect to one variable while every other variable is frozen — the slope of the surface in one coordinate direction.

What does the gradient point at?

Uphill: the direction of steepest increase, with length equal to that steepest slope. It is perpendicular to the level curves.

试试你自己试试

更多 Multivariable Calculus