Modeling and Analysis of Mechanical Systems — Derivatives, Gradients, Hessians and the Material Derivative

A derivative tells us how fast a function changes. With one input there is only one direction to move; with several inputs the rate depends on which way we move. This post goes from the ordinary derivative to the gradient and the directional derivative, then uses a ski hill to find the steepest way down. The second half builds the foundations of optimization: the Jacobian, Taylor series, gradient descent, and the Hessian for telling minima, maxima and saddle points apart, with a load-capacity design example. It ends with the material derivative — the rate of change seen by a moving fluid particle.

1. Derivative vs. gradient

Both measure the rate of change (slope) of a function, but for different kinds of functions:

  Derivative Gradient
Function single variable, $y=\phi(x)$ multivariable scalar field, $f(x,y,z)$
Definition $y’=\dfrac{dy}{dx}=\phi’(x)$ $\nabla f=\dfrac{\partial f}{\partial x}\,\hat i+\dfrac{\partial f}{\partial y}\,\hat j+\dfrac{\partial f}{\partial z}\,\hat k$
Result a scalar a vector
Meaning slope of the curve at $x$ direction of steepest increase; its magnitude is that steepest slope

The derivative is the limit of the slope of a secant line,

\[\phi'(x)=\lim_{h\to0}\frac{\phi(x+h)-\phi(x)}{h}.\]

A partial derivative applies the same idea along one coordinate, holding the others fixed: $\dfrac{\partial f}{\partial x}=\lim_{h\to0}\dfrac{f(x+h,y,z)-f(x,y,z)}{h}$. The gradient collects all of them into a column vector:

\[\nabla f=\begin{bmatrix}\partial f/\partial x\\ \partial f/\partial y\\ \partial f/\partial z\end{bmatrix}.\]

The gradient is defined for a scalar function of several variables. For a vector-valued function (several outputs) the analogue is the Jacobian matrix, whose rows are the gradients of each output.

A single partial derivative only gives the slope along a coordinate axis. To get the slope in an arbitrary direction we need the directional derivative.

2. Directional derivative

The directional derivative $D_{\hat u}f$ is the rate of change of $f$ when moving in the direction of a unit vector $\hat u$ ($\lvert\hat u\rvert=1$). It is a scalar: the projection of the gradient onto $\hat u$,

\[D_{\hat u}f=\nabla f\cdot\hat u=\lvert\nabla f\rvert\,\lvert\hat u\rvert\cos\theta=\lvert\nabla f\rvert\cos\theta,\]

where $\theta$ is the angle between $\nabla f$ and $\hat u$. Since $-1\le\cos\theta\le1$, every directional derivative lies between $-\lvert\nabla f\rvert$ and $+\lvert\nabla f\rvert$:

Angle $\theta$ $D_{\hat u}f$ Meaning
$0$ $+\lvert\nabla f\rvert$ (maximum) $\hat u$ along $\nabla f$: steepest ascent, straight up the slope
$90^\circ$ $0$ $\hat u\perp\nabla f$: walking along a contour (level curve), no change in height
$180^\circ=\pi$ $-\lvert\nabla f\rvert$ (minimum) $\hat u$ against $\nabla f$: steepest descent, straight down the slope

So the gradient points in the direction of steepest ascent, $-\nabla f$ in the direction of steepest descent, and the gradient is always perpendicular to the contour lines of $f$. This is why the arrows on a contour map that show the fall line cross the contours at right angles.

Pitfall: normalize the direction first. The formula assumes $\lvert\hat u\rvert=1$. For a direction given as $\vec v=\hat i+\hat j$, use $\hat u=\vec v/\lvert\vec v\rvert=(\hat i+\hat j)/\sqrt2$. Using $\vec v$ directly multiplies the answer by $\lvert\vec v\rvert=\sqrt2$.

3. Ski-hill example

The topography of a ski hill is modeled by

\[f(x,y)=1200-0.05x^2-0.01y^2,\]

where $f$ is the elevation in metres at horizontal position $(x,y)$, also in metres. The summit is at the origin, $f(0,0)=1200$ m. You stand at $(10,50)$, where $f(10,50)=1200-5-25=1170$ m.

(a) The direction of steepest ascent, as a unit vector.

\[\nabla f=\begin{bmatrix}-2(0.05)x\\-2(0.01)y\end{bmatrix}=\begin{bmatrix}-0.1x\\-0.02y\end{bmatrix} \;\Rightarrow\; \nabla f(10,50)=\begin{bmatrix}-1\\-1\end{bmatrix}=-\hat i-\hat j .\]

$\lvert\nabla f\rvert=\sqrt{1^2+1^2}=\sqrt2$ is the magnitude of the maximum slope. The steepest-ascent direction is

\[\hat u=\frac{\nabla f}{\lvert\nabla f\rvert}=\frac{-\hat i-\hat j}{\sqrt2}=-\frac{1}{\sqrt2}(\hat i+\hat j).\]

(b) The slope of steepest descent. Steepest descent points opposite to the gradient, along $\hat s=-\hat u=(\hat i+\hat j)/\sqrt2$, i.e. $\theta=180^\circ$:

\[D_{\hat s}f=\nabla f\cdot\hat s=\lvert\nabla f\rvert\,\lvert\hat s\rvert\cos180^\circ=-\lvert\nabla f\rvert=-\sqrt2\approx-1.41 .\]

The slope of steepest descent is the minimum directional derivative. Its units are metres of elevation per metre of horizontal travel: you drop about 1.41 m for every metre you move, a slope angle of $\arctan\sqrt2\approx54.7^\circ$ — a black-diamond run.

Checking other directions at $(10,50)$, with $\nabla f=(-1,-1)$:

Direction $\hat u$ $D_{\hat u}f=\nabla f\cdot\hat u$ Interpretation
east, $(1,0)$ $-1$ going downhill, but not the steepest way
along the contour, $(1,-1)/\sqrt2$ $0$ traversing at constant height
straight at the summit, $(-0.196,-0.981)$ $+1.18$ uphill, but less steep than $\sqrt2$
steepest descent, $(1,1)/\sqrt2$ $-\sqrt2$ the fall line

Note the third row: the steepest way up does not point at the summit. The direction to the top, $(-10,-50)$, is $33.7^\circ$ away from $\nabla f$, because the hill is elliptical (it falls off 5 times faster in $x$ than in $y$). Following the gradient everywhere traces a curved path, $dy/dx=(0.02y)/(0.1x)\Rightarrow y=Cx^{0.2}$, here $y\approx31.5\,x^{0.2}$, which bends toward the $y$-axis before reaching the summit. Locally steepest is not globally shortest.

The map below shows this: the orange arrow ($\nabla f$) crosses the contours at right angles, the red curve is the path that always follows the gradient, and the dashed line points straight at the summit. Hover to read elevations; drag to zoom.

{"data":[{"type":"contour","x":[-12.0,-11.5,-11.0,-10.5,-10.0,-9.5,-9.0,-8.5,-8.0,-7.5,-7.0,-6.5,-6.0,-5.5,-5.0,-4.5,-4.0,-3.5,-3.0,-2.5,-2.0,-1.5,-1.0,-0.5,0.0,0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0,15.5,16.0,16.5,17.0,17.5,18.0,18.5,19.0,19.5,20.0,20.5,21.0,21.5,22.0],"y":[-8.0,-7.0,-6.0,-5.0,-4.0,-3.0,-2.0,-1.0,0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0,17.0,18.0,19.0,20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0,28.0,29.0,30.0,31.0,32.0,33.0,34.0,35.0,36.0,37.0,38.0,39.0,40.0,41.0,42.0,43.0,44.0,45.0,46.0,47.0,48.0,49.0,50.0,51.0,52.0,53.0,54.0,55.0,56.0,57.0,58.0,59.0,60.0,61.0,62.0],"z":[[1192.2,1192.7,1193.3,1193.8,1194.4,1194.8,1195.3,1195.7,1196.2,1196.5,1196.9,1197.2,1197.6,1197.8,1198.1,1198.3,1198.6,1198.7,1198.9,1199.0,1199.2,1199.2,1199.3,1199.3,1199.4,1199.3,1199.3,1199.2,1199.2,1199.0,1198.9,1198.7,1198.6,1198.3,1198.1,1197.8,1197.6,1197.2,1196.9,1196.5,1196.2,1195.7,1195.3,1194.8,1194.4,1193.8,1193.3,1192.7,1192.2,1191.5,1190.9,1190.2,1189.6,1188.8,1188.1,1187.3,1186.6,1185.7,1184.9,1184.0,1183.2,1182.2,1181.3,1180.3,1179.4,1178.3,1177.3,1176.2,1175.2],[1192.3,1192.9,1193.5,1194.0,1194.5,1195.0,1195.5,1195.9,1196.3,1196.7,1197.1,1197.4,1197.7,1198.0,1198.3,1198.5,1198.7,1198.9,1199.1,1199.2,1199.3,1199.4,1199.5,1199.5,1199.5,1199.5,1199.5,1199.4,1199.3,1199.2,1199.1,1198.9,1198.7,1198.5,1198.3,1198.0,1197.7,1197.4,1197.1,1196.7,1196.3,1195.9,1195.5,1195.0,1194.5,1194.0,1193.5,1192.9,1192.3,1191.7,1191.1,1190.4,1189.7,1189.0,1188.3,1187.5,1186.7,1185.9,1185.1,1184.2,1183.3,1182.4,1181.5,1180.5,1179.5,1178.5,1177.5,1176.4,1175.3],[1192.4,1193.0,1193.6,1194.1,1194.6,1195.1,1195.6,1196.0,1196.4,1196.8,1197.2,1197.5,1197.8,1198.1,1198.4,1198.6,1198.8,1199.0,1199.2,1199.3,1199.4,1199.5,1199.6,1199.6,1199.6,1199.6,1199.6,1199.5,1199.4,1199.3,1199.2,1199.0,1198.8,1198.6,1198.4,1198.1,1197.8,1197.5,1197.2,1196.8,1196.4,1196.0,1195.6,1195.1,1194.6,1194.1,1193.6,1193.0,1192.4,1191.8,1191.2,1190.5,1189.8,1189.1,1188.4,1187.6,1186.8,1186.0,1185.2,1184.3,1183.4,1182.5,1181.6,1180.6,1179.6,1178.6,1177.6,1176.5,1175.4],[1192.6,1193.1,1193.7,1194.2,1194.8,1195.2,1195.7,1196.1,1196.6,1196.9,1197.3,1197.6,1198.0,1198.2,1198.5,1198.7,1199.0,1199.1,1199.3,1199.4,1199.6,1199.6,1199.7,1199.7,1199.8,1199.7,1199.7,1199.6,1199.6,1199.4,1199.3,1199.1,1199.0,1198.7,1198.5,1198.2,1198.0,1197.6,1197.3,1196.9,1196.6,1196.1,1195.7,1195.2,1194.8,1194.2,1193.7,1193.1,1192.6,1191.9,1191.3,1190.6,1190.0,1189.2,1188.5,1187.7,1187.0,1186.1,1185.3,1184.4,1183.6,1182.6,1181.7,1180.7,1179.8,1178.7,1177.7,1176.6,1175.6],[1192.6,1193.2,1193.8,1194.3,1194.8,1195.3,1195.8,1196.2,1196.6,1197.0,1197.4,1197.7,1198.0,1198.3,1198.6,1198.8,1199.0,1199.2,1199.4,1199.5,1199.6,1199.7,1199.8,1199.8,1199.8,1199.8,1199.8,1199.7,1199.6,1199.5,1199.4,1199.2,1199.0,1198.8,1198.6,1198.3,1198.0,1197.7,1197.4,1197.0,1196.6,1196.2,1195.8,1195.3,1194.8,1194.3,1193.8,1193.2,1192.6,1192.0,1191.4,1190.7,1190.0,1189.3,1188.6,1187.8,1187.0,1186.2,1185.4,1184.5,1183.6,1182.7,1181.8,1180.8,1179.8,1178.8,1177.8,1176.7,1175.6],[1192.7,1193.3,1193.9,1194.4,1194.9,1195.4,1195.9,1196.3,1196.7,1197.1,1197.5,1197.8,1198.1,1198.4,1198.7,1198.9,1199.1,1199.3,1199.5,1199.6,1199.7,1199.8,1199.9,1199.9,1199.9,1199.9,1199.9,1199.8,1199.7,1199.6,1199.5,1199.3,1199.1,1198.9,1198.7,1198.4,1198.1,1197.8,1197.5,1197.1,1196.7,1196.3,1195.9,1195.4,1194.9,1194.4,1193.9,1193.3,1192.7,1192.1,1191.5,1190.8,1190.1,1189.4,1188.7,1187.9,1187.1,1186.3,1185.5,1184.6,1183.7,1182.8,1181.9,1180.9,1179.9,1178.9,1177.9,1176.8,1175.7],[1192.8,1193.3,1193.9,1194.4,1195.0,1195.4,1195.9,1196.3,1196.8,1197.1,1197.5,1197.8,1198.2,1198.4,1198.7,1198.9,1199.2,1199.3,1199.5,1199.6,1199.8,1199.8,1199.9,1199.9,1200.0,1199.9,1199.9,1199.8,1199.8,1199.6,1199.5,1199.3,1199.2,1198.9,1198.7,1198.4,1198.2,1197.8,1197.5,1197.1,1196.8,1196.3,1195.9,1195.4,1195.0,1194.4,1193.9,1193.3,1192.8,1192.1,1191.5,1190.8,1190.2,1189.4,1188.7,1187.9,1187.2,1186.3,1185.5,1184.6,1183.8,1182.8,1181.9,1180.9,1180.0,1178.9,1177.9,1176.8,1175.8],[1192.8,1193.4,1193.9,1194.5,1195.0,1195.5,1195.9,1196.4,1196.8,1197.2,1197.5,1197.9,1198.2,1198.5,1198.7,1199.0,1199.2,1199.4,1199.5,1199.7,1199.8,1199.9,1199.9,1200.0,1200.0,1200.0,1199.9,1199.9,1199.8,1199.7,1199.5,1199.4,1199.2,1199.0,1198.7,1198.5,1198.2,1197.9,1197.5,1197.2,1196.8,1196.4,1195.9,1195.5,1195.0,1194.5,1193.9,1193.4,1192.8,1192.2,1191.5,1190.9,1190.2,1189.5,1188.7,1188.0,1187.2,1186.4,1185.5,1184.7,1183.8,1182.9,1181.9,1181.0,1180.0,1179.0,1177.9,1176.9,1175.8],[1192.8,1193.4,1194.0,1194.5,1195.0,1195.5,1196.0,1196.4,1196.8,1197.2,1197.6,1197.9,1198.2,1198.5,1198.8,1199.0,1199.2,1199.4,1199.6,1199.7,1199.8,1199.9,1200.0,1200.0,1200.0,1200.0,1200.0,1199.9,1199.8,1199.7,1199.6,1199.4,1199.2,1199.0,1198.8,1198.5,1198.2,1197.9,1197.6,1197.2,1196.8,1196.4,1196.0,1195.5,1195.0,1194.5,1194.0,1193.4,1192.8,1192.2,1191.6,1190.9,1190.2,1189.5,1188.8,1188.0,1187.2,1186.4,1185.6,1184.7,1183.8,1182.9,1182.0,1181.0,1180.0,1179.0,1178.0,1176.9,1175.8],[1192.8,1193.4,1193.9,1194.5,1195.0,1195.5,1195.9,1196.4,1196.8,1197.2,1197.5,1197.9,1198.2,1198.5,1198.7,1199.0,1199.2,1199.4,1199.5,1199.7,1199.8,1199.9,1199.9,1200.0,1200.0,1200.0,1199.9,1199.9,1199.8,1199.7,1199.5,1199.4,1199.2,1199.0,1198.7,1198.5,1198.2,1197.9,1197.5,1197.2,1196.8,1196.4,1195.9,1195.5,1195.0,1194.5,1193.9,1193.4,1192.8,1192.2,1191.5,1190.9,1190.2,1189.5,1188.7,1188.0,1187.2,1186.4,1185.5,1184.7,1183.8,1182.9,1181.9,1181.0,1180.0,1179.0,1177.9,1176.9,1175.8],[1192.8,1193.3,1193.9,1194.4,1195.0,1195.4,1195.9,1196.3,1196.8,1197.1,1197.5,1197.8,1198.2,1198.4,1198.7,1198.9,1199.2,1199.3,1199.5,1199.6,1199.8,1199.8,1199.9,1199.9,1200.0,1199.9,1199.9,1199.8,1199.8,1199.6,1199.5,1199.3,1199.2,1198.9,1198.7,1198.4,1198.2,1197.8,1197.5,1197.1,1196.8,1196.3,1195.9,1195.4,1195.0,1194.4,1193.9,1193.3,1192.8,1192.1,1191.5,1190.8,1190.2,1189.4,1188.7,1187.9,1187.2,1186.3,1185.5,1184.6,1183.8,1182.8,1181.9,1180.9,1180.0,1178.9,1177.9,1176.8,1175.8],[1192.7,1193.3,1193.9,1194.4,1194.9,1195.4,1195.9,1196.3,1196.7,1197.1,1197.5,1197.8,1198.1,1198.4,1198.7,1198.9,1199.1,1199.3,1199.5,1199.6,1199.7,1199.8,1199.9,1199.9,1199.9,1199.9,1199.9,1199.8,1199.7,1199.6,1199.5,1199.3,1199.1,1198.9,1198.7,1198.4,1198.1,1197.8,1197.5,1197.1,1196.7,1196.3,1195.9,1195.4,1194.9,1194.4,1193.9,1193.3,1192.7,1192.1,1191.5,1190.8,1190.1,1189.4,1188.7,1187.9,1187.1,1186.3,1185.5,1184.6,1183.7,1182.8,1181.9,1180.9,1179.9,1178.9,1177.9,1176.8,1175.7],[1192.6,1193.2,1193.8,1194.3,1194.8,1195.3,1195.8,1196.2,1196.6,1197.0,1197.4,1197.7,1198.0,1198.3,1198.6,1198.8,1199.0,1199.2,1199.4,1199.5,1199.6,1199.7,1199.8,1199.8,1199.8,1199.8,1199.8,1199.7,1199.6,1199.5,1199.4,1199.2,1199.0,1198.8,1198.6,1198.3,1198.0,1197.7,1197.4,1197.0,1196.6,1196.2,1195.8,1195.3,1194.8,1194.3,1193.8,1193.2,1192.6,1192.0,1191.4,1190.7,1190.0,1189.3,1188.6,1187.8,1187.0,1186.2,1185.4,1184.5,1183.6,1182.7,1181.8,1180.8,1179.8,1178.8,1177.8,1176.7,1175.6],[1192.6,1193.1,1193.7,1194.2,1194.8,1195.2,1195.7,1196.1,1196.6,1196.9,1197.3,1197.6,1198.0,1198.2,1198.5,1198.7,1199.0,1199.1,1199.3,1199.4,1199.6,1199.6,1199.7,1199.7,1199.8,1199.7,1199.7,1199.6,1199.6,1199.4,1199.3,1199.1,1199.0,1198.7,1198.5,1198.2,1198.0,1197.6,1197.3,1196.9,1196.6,1196.1,1195.7,1195.2,1194.8,1194.2,1193.7,1193.1,1192.6,1191.9,1191.3,1190.6,1190.0,1189.2,1188.5,1187.7,1187.0,1186.1,1185.3,1184.4,1183.6,1182.6,1181.7,1180.7,1179.8,1178.7,1177.7,1176.6,1175.6],[1192.4,1193.0,1193.6,1194.1,1194.6,1195.1,1195.6,1196.0,1196.4,1196.8,1197.2,1197.5,1197.8,1198.1,1198.4,1198.6,1198.8,1199.0,1199.2,1199.3,1199.4,1199.5,1199.6,1199.6,1199.6,1199.6,1199.6,1199.5,1199.4,1199.3,1199.2,1199.0,1198.8,1198.6,1198.4,1198.1,1197.8,1197.5,1197.2,1196.8,1196.4,1196.0,1195.6,1195.1,1194.6,1194.1,1193.6,1193.0,1192.4,1191.8,1191.2,1190.5,1189.8,1189.1,1188.4,1187.6,1186.8,1186.0,1185.2,1184.3,1183.4,1182.5,1181.6,1180.6,1179.6,1178.6,1177.6,1176.5,1175.4],[1192.3,1192.9,1193.5,1194.0,1194.5,1195.0,1195.5,1195.9,1196.3,1196.7,1197.1,1197.4,1197.7,1198.0,1198.3,1198.5,1198.7,1198.9,1199.1,1199.2,1199.3,1199.4,1199.5,1199.5,1199.5,1199.5,1199.5,1199.4,1199.3,1199.2,1199.1,1198.9,1198.7,1198.5,1198.3,1198.0,1197.7,1197.4,1197.1,1196.7,1196.3,1195.9,1195.5,1195.0,1194.5,1194.0,1193.5,1192.9,1192.3,1191.7,1191.1,1190.4,1189.7,1189.0,1188.3,1187.5,1186.7,1185.9,1185.1,1184.2,1183.3,1182.4,1181.5,1180.5,1179.5,1178.5,1177.5,1176.4,1175.3],[1192.2,1192.7,1193.3,1193.8,1194.4,1194.8,1195.3,1195.7,1196.2,1196.5,1196.9,1197.2,1197.6,1197.8,1198.1,1198.3,1198.6,1198.7,1198.9,1199.0,1199.2,1199.2,1199.3,1199.3,1199.4,1199.3,1199.3,1199.2,1199.2,1199.0,1198.9,1198.7,1198.6,1198.3,1198.1,1197.8,1197.6,1197.2,1196.9,1196.5,1196.2,1195.7,1195.3,1194.8,1194.4,1193.8,1193.3,1192.7,1192.2,1191.5,1190.9,1190.2,1189.6,1188.8,1188.1,1187.3,1186.6,1185.7,1184.9,1184.0,1183.2,1182.2,1181.3,1180.3,1179.4,1178.3,1177.3,1176.2,1175.2],[1192.0,1192.6,1193.1,1193.7,1194.2,1194.7,1195.1,1195.6,1196.0,1196.4,1196.7,1197.1,1197.4,1197.7,1197.9,1198.2,1198.4,1198.6,1198.7,1198.9,1199.0,1199.1,1199.1,1199.2,1199.2,1199.2,1199.1,1199.1,1199.0,1198.9,1198.7,1198.6,1198.4,1198.2,1197.9,1197.7,1197.4,1197.1,1196.7,1196.4,1196.0,1195.6,1195.1,1194.7,1194.2,1193.7,1193.1,1192.6,1192.0,1191.4,1190.7,1190.1,1189.4,1188.7,1187.9,1187.2,1186.4,1185.6,1184.7,1183.9,1183.0,1182.1,1181.1,1180.2,1179.2,1178.2,1177.1,1176.1,1175.0],[1191.8,1192.4,1193.0,1193.5,1194.0,1194.5,1195.0,1195.4,1195.8,1196.2,1196.6,1196.9,1197.2,1197.5,1197.8,1198.0,1198.2,1198.4,1198.6,1198.7,1198.8,1198.9,1199.0,1199.0,1199.0,1199.0,1199.0,1198.9,1198.8,1198.7,1198.6,1198.4,1198.2,1198.0,1197.8,1197.5,1197.2,1196.9,1196.6,1196.2,1195.8,1195.4,1195.0,1194.5,1194.0,1193.5,1193.0,1192.4,1191.8,1191.2,1190.6,1189.9,1189.2,1188.5,1187.8,1187.0,1186.2,1185.4,1184.6,1183.7,1182.8,1181.9,1181.0,1180.0,1179.0,1178.0,1177.0,1175.9,1174.8],[1191.6,1192.2,1192.7,1193.3,1193.8,1194.3,1194.7,1195.2,1195.6,1196.0,1196.3,1196.7,1197.0,1197.3,1197.5,1197.8,1198.0,1198.2,1198.3,1198.5,1198.6,1198.7,1198.7,1198.8,1198.8,1198.8,1198.7,1198.7,1198.6,1198.5,1198.3,1198.2,1198.0,1197.8,1197.5,1197.3,1197.0,1196.7,1196.3,1196.0,1195.6,1195.2,1194.7,1194.3,1193.8,1193.3,1192.7,1192.2,1191.6,1191.0,1190.3,1189.7,1189.0,1188.3,1187.5,1186.8,1186.0,1185.2,1184.3,1183.5,1182.6,1181.7,1180.7,1179.8,1178.8,1177.8,1176.7,1175.7,1174.6],[1191.4,1191.9,1192.5,1193.0,1193.6,1194.0,1194.5,1194.9,1195.4,1195.7,1196.1,1196.4,1196.8,1197.0,1197.3,1197.5,1197.8,1197.9,1198.1,1198.2,1198.4,1198.4,1198.5,1198.5,1198.6,1198.5,1198.5,1198.4,1198.4,1198.2,1198.1,1197.9,1197.8,1197.5,1197.3,1197.0,1196.8,1196.4,1196.1,1195.7,1195.4,1194.9,1194.5,1194.0,1193.6,1193.0,1192.5,1191.9,1191.4,1190.7,1190.1,1189.4,1188.8,1188.0,1187.3,1186.5,1185.8,1184.9,1184.1,1183.2,1182.4,1181.4,1180.5,1179.5,1178.6,1177.5,1176.5,1175.4,1174.4],[1191.1,1191.7,1192.3,1192.8,1193.3,1193.8,1194.3,1194.7,1195.1,1195.5,1195.9,1196.2,1196.5,1196.8,1197.1,1197.3,1197.5,1197.7,1197.9,1198.0,1198.1,1198.2,1198.3,1198.3,1198.3,1198.3,1198.3,1198.2,1198.1,1198.0,1197.9,1197.7,1197.5,1197.3,1197.1,1196.8,1196.5,1196.2,1195.9,1195.5,1195.1,1194.7,1194.3,1193.8,1193.3,1192.8,1192.3,1191.7,1191.1,1190.5,1189.9,1189.2,1188.5,1187.8,1187.1,1186.3,1185.5,1184.7,1183.9,1183.0,1182.1,1181.2,1180.3,1179.3,1178.3,1177.3,1176.3,1175.2,1174.1],[1190.8,1191.4,1192.0,1192.5,1193.0,1193.5,1194.0,1194.4,1194.8,1195.2,1195.6,1195.9,1196.2,1196.5,1196.8,1197.0,1197.2,1197.4,1197.6,1197.7,1197.8,1197.9,1198.0,1198.0,1198.0,1198.0,1198.0,1197.9,1197.8,1197.7,1197.6,1197.4,1197.2,1197.0,1196.8,1196.5,1196.2,1195.9,1195.6,1195.2,1194.8,1194.4,1194.0,1193.5,1193.0,1192.5,1192.0,1191.4,1190.8,1190.2,1189.6,1188.9,1188.2,1187.5,1186.8,1186.0,1185.2,1184.4,1183.6,1182.7,1181.8,1180.9,1180.0,1179.0,1178.0,1177.0,1176.0,1174.9,1173.8],[1190.6,1191.1,1191.7,1192.2,1192.8,1193.2,1193.7,1194.1,1194.6,1194.9,1195.3,1195.6,1196.0,1196.2,1196.5,1196.7,1197.0,1197.1,1197.3,1197.4,1197.6,1197.6,1197.7,1197.7,1197.8,1197.7,1197.7,1197.6,1197.6,1197.4,1197.3,1197.1,1197.0,1196.7,1196.5,1196.2,1196.0,1195.6,1195.3,1194.9,1194.6,1194.1,1193.7,1193.2,1192.8,1192.2,1191.7,1191.1,1190.6,1189.9,1189.3,1188.6,1188.0,1187.2,1186.5,1185.7,1185.0,1184.1,1183.3,1182.4,1181.6,1180.6,1179.7,1178.7,1177.8,1176.7,1175.7,1174.6,1173.6],[1190.2,1190.8,1191.4,1191.9,1192.4,1192.9,1193.4,1193.8,1194.2,1194.6,1195.0,1195.3,1195.6,1195.9,1196.2,1196.4,1196.6,1196.8,1197.0,1197.1,1197.2,1197.3,1197.4,1197.4,1197.4,1197.4,1197.4,1197.3,1197.2,1197.1,1197.0,1196.8,1196.6,1196.4,1196.2,1195.9,1195.6,1195.3,1195.0,1194.6,1194.2,1193.8,1193.4,1192.9,1192.4,1191.9,1191.4,1190.8,1190.2,1189.6,1189.0,1188.3,1187.6,1186.9,1186.2,1185.4,1184.6,1183.8,1183.0,1182.1,1181.2,1180.3,1179.4,1178.4,1177.4,1176.4,1175.4,1174.3,1173.2],[1189.9,1190.5,1191.1,1191.6,1192.1,1192.6,1193.1,1193.5,1193.9,1194.3,1194.7,1195.0,1195.3,1195.6,1195.9,1196.1,1196.3,1196.5,1196.7,1196.8,1196.9,1197.0,1197.1,1197.1,1197.1,1197.1,1197.1,1197.0,1196.9,1196.8,1196.7,1196.5,1196.3,1196.1,1195.9,1195.6,1195.3,1195.0,1194.7,1194.3,1193.9,1193.5,1193.1,1192.6,1192.1,1191.6,1191.1,1190.5,1189.9,1189.3,1188.7,1188.0,1187.3,1186.6,1185.9,1185.1,1184.3,1183.5,1182.7,1181.8,1180.9,1180.0,1179.1,1178.1,1177.1,1176.1,1175.1,1174.0,1172.9],[1189.6,1190.1,1190.7,1191.2,1191.8,1192.2,1192.7,1193.1,1193.6,1193.9,1194.3,1194.6,1195.0,1195.2,1195.5,1195.7,1196.0,1196.1,1196.3,1196.4,1196.6,1196.6,1196.7,1196.7,1196.8,1196.7,1196.7,1196.6,1196.6,1196.4,1196.3,1196.1,1196.0,1195.7,1195.5,1195.2,1195.0,1194.6,1194.3,1193.9,1193.6,1193.1,1192.7,1192.2,1191.8,1191.2,1190.7,1190.1,1189.6,1188.9,1188.3,1187.6,1187.0,1186.2,1185.5,1184.7,1184.0,1183.1,1182.3,1181.4,1180.6,1179.6,1178.7,1177.7,1176.8,1175.7,1174.7,1173.6,1172.6],[1189.2,1189.8,1190.3,1190.9,1191.4,1191.9,1192.3,1192.8,1193.2,1193.6,1193.9,1194.3,1194.6,1194.9,1195.1,1195.4,1195.6,1195.8,1195.9,1196.1,1196.2,1196.3,1196.3,1196.4,1196.4,1196.4,1196.3,1196.3,1196.2,1196.1,1195.9,1195.8,1195.6,1195.4,1195.1,1194.9,1194.6,1194.3,1193.9,1193.6,1193.2,1192.8,1192.3,1191.9,1191.4,1190.9,1190.3,1189.8,1189.2,1188.6,1187.9,1187.3,1186.6,1185.9,1185.1,1184.4,1183.6,1182.8,1181.9,1181.1,1180.2,1179.3,1178.3,1177.4,1176.4,1175.4,1174.3,1173.3,1172.2],[1188.8,1189.4,1190.0,1190.5,1191.0,1191.5,1192.0,1192.4,1192.8,1193.2,1193.6,1193.9,1194.2,1194.5,1194.8,1195.0,1195.2,1195.4,1195.6,1195.7,1195.8,1195.9,1196.0,1196.0,1196.0,1196.0,1196.0,1195.9,1195.8,1195.7,1195.6,1195.4,1195.2,1195.0,1194.8,1194.5,1194.2,1193.9,1193.6,1193.2,1192.8,1192.4,1192.0,1191.5,1191.0,1190.5,1190.0,1189.4,1188.8,1188.2,1187.6,1186.9,1186.2,1185.5,1184.8,1184.0,1183.2,1182.4,1181.6,1180.7,1179.8,1178.9,1178.0,1177.0,1176.0,1175.0,1174.0,1172.9,1171.8],[1188.4,1189.0,1189.5,1190.1,1190.6,1191.1,1191.5,1192.0,1192.4,1192.8,1193.1,1193.5,1193.8,1194.1,1194.3,1194.6,1194.8,1195.0,1195.1,1195.3,1195.4,1195.5,1195.5,1195.6,1195.6,1195.6,1195.5,1195.5,1195.4,1195.3,1195.1,1195.0,1194.8,1194.6,1194.3,1194.1,1193.8,1193.5,1193.1,1192.8,1192.4,1192.0,1191.5,1191.1,1190.6,1190.1,1189.5,1189.0,1188.4,1187.8,1187.1,1186.5,1185.8,1185.1,1184.3,1183.6,1182.8,1182.0,1181.1,1180.3,1179.4,1178.5,1177.5,1176.6,1175.6,1174.6,1173.5,1172.5,1171.4],[1188.0,1188.5,1189.1,1189.6,1190.2,1190.6,1191.1,1191.5,1192.0,1192.3,1192.7,1193.0,1193.4,1193.6,1193.9,1194.1,1194.4,1194.5,1194.7,1194.8,1195.0,1195.0,1195.1,1195.1,1195.2,1195.1,1195.1,1195.0,1195.0,1194.8,1194.7,1194.5,1194.4,1194.1,1193.9,1193.6,1193.4,1193.0,1192.7,1192.3,1192.0,1191.5,1191.1,1190.6,1190.2,1189.6,1189.1,1188.5,1188.0,1187.3,1186.7,1186.0,1185.4,1184.6,1183.9,1183.1,1182.4,1181.5,1180.7,1179.8,1179.0,1178.0,1177.1,1176.1,1175.2,1174.1,1173.1,1172.0,1171.0],[1187.5,1188.1,1188.7,1189.2,1189.7,1190.2,1190.7,1191.1,1191.5,1191.9,1192.3,1192.6,1192.9,1193.2,1193.5,1193.7,1193.9,1194.1,1194.3,1194.4,1194.5,1194.6,1194.7,1194.7,1194.7,1194.7,1194.7,1194.6,1194.5,1194.4,1194.3,1194.1,1193.9,1193.7,1193.5,1193.2,1192.9,1192.6,1192.3,1191.9,1191.5,1191.1,1190.7,1190.2,1189.7,1189.2,1188.7,1188.1,1187.5,1186.9,1186.3,1185.6,1184.9,1184.2,1183.5,1182.7,1181.9,1181.1,1180.3,1179.4,1178.5,1177.6,1176.7,1175.7,1174.7,1173.7,1172.7,1171.6,1170.5],[1187.0,1187.6,1188.2,1188.7,1189.2,1189.7,1190.2,1190.6,1191.0,1191.4,1191.8,1192.1,1192.4,1192.7,1193.0,1193.2,1193.4,1193.6,1193.8,1193.9,1194.0,1194.1,1194.2,1194.2,1194.2,1194.2,1194.2,1194.1,1194.0,1193.9,1193.8,1193.6,1193.4,1193.2,1193.0,1192.7,1192.4,1192.1,1191.8,1191.4,1191.0,1190.6,1190.2,1189.7,1189.2,1188.7,1188.2,1187.6,1187.0,1186.4,1185.8,1185.1,1184.4,1183.7,1183.0,1182.2,1181.4,1180.6,1179.8,1178.9,1178.0,1177.1,1176.2,1175.2,1174.2,1173.2,1172.2,1171.1,1170.0],[1186.6,1187.1,1187.7,1188.2,1188.8,1189.2,1189.7,1190.1,1190.6,1190.9,1191.3,1191.6,1192.0,1192.2,1192.5,1192.7,1193.0,1193.1,1193.3,1193.4,1193.6,1193.6,1193.7,1193.7,1193.8,1193.7,1193.7,1193.6,1193.6,1193.4,1193.3,1193.1,1193.0,1192.7,1192.5,1192.2,1192.0,1191.6,1191.3,1190.9,1190.6,1190.1,1189.7,1189.2,1188.8,1188.2,1187.7,1187.1,1186.6,1185.9,1185.3,1184.6,1184.0,1183.2,1182.5,1181.7,1181.0,1180.1,1179.3,1178.4,1177.6,1176.6,1175.7,1174.7,1173.8,1172.7,1171.7,1170.6,1169.6],[1186.0,1186.6,1187.2,1187.7,1188.2,1188.7,1189.2,1189.6,1190.0,1190.4,1190.8,1191.1,1191.4,1191.7,1192.0,1192.2,1192.4,1192.6,1192.8,1192.9,1193.0,1193.1,1193.2,1193.2,1193.2,1193.2,1193.2,1193.1,1193.0,1192.9,1192.8,1192.6,1192.4,1192.2,1192.0,1191.7,1191.4,1191.1,1190.8,1190.4,1190.0,1189.6,1189.2,1188.7,1188.2,1187.7,1187.2,1186.6,1186.0,1185.4,1184.8,1184.1,1183.4,1182.7,1182.0,1181.2,1180.4,1179.6,1178.8,1177.9,1177.0,1176.1,1175.2,1174.2,1173.2,1172.2,1171.2,1170.1,1169.0],[1185.5,1186.1,1186.7,1187.2,1187.7,1188.2,1188.7,1189.1,1189.5,1189.9,1190.3,1190.6,1190.9,1191.2,1191.5,1191.7,1191.9,1192.1,1192.3,1192.4,1192.5,1192.6,1192.7,1192.7,1192.7,1192.7,1192.7,1192.6,1192.5,1192.4,1192.3,1192.1,1191.9,1191.7,1191.5,1191.2,1190.9,1190.6,1190.3,1189.9,1189.5,1189.1,1188.7,1188.2,1187.7,1187.2,1186.7,1186.1,1185.5,1184.9,1184.3,1183.6,1182.9,1182.2,1181.5,1180.7,1179.9,1179.1,1178.3,1177.4,1176.5,1175.6,1174.7,1173.7,1172.7,1171.7,1170.7,1169.6,1168.5],[1185.0,1185.5,1186.1,1186.6,1187.2,1187.6,1188.1,1188.5,1189.0,1189.3,1189.7,1190.0,1190.4,1190.6,1190.9,1191.1,1191.4,1191.5,1191.7,1191.8,1192.0,1192.0,1192.1,1192.1,1192.2,1192.1,1192.1,1192.0,1192.0,1191.8,1191.7,1191.5,1191.4,1191.1,1190.9,1190.6,1190.4,1190.0,1189.7,1189.3,1189.0,1188.5,1188.1,1187.6,1187.2,1186.6,1186.1,1185.5,1185.0,1184.3,1183.7,1183.0,1182.4,1181.6,1180.9,1180.1,1179.4,1178.5,1177.7,1176.8,1176.0,1175.0,1174.1,1173.1,1172.2,1171.1,1170.1,1169.0,1168.0],[1184.4,1185.0,1185.5,1186.1,1186.6,1187.1,1187.5,1188.0,1188.4,1188.8,1189.1,1189.5,1189.8,1190.1,1190.3,1190.6,1190.8,1191.0,1191.1,1191.3,1191.4,1191.5,1191.5,1191.6,1191.6,1191.6,1191.5,1191.5,1191.4,1191.3,1191.1,1191.0,1190.8,1190.6,1190.3,1190.1,1189.8,1189.5,1189.1,1188.8,1188.4,1188.0,1187.5,1187.1,1186.6,1186.1,1185.5,1185.0,1184.4,1183.8,1183.1,1182.5,1181.8,1181.1,1180.3,1179.6,1178.8,1178.0,1177.1,1176.3,1175.4,1174.5,1173.5,1172.6,1171.6,1170.6,1169.5,1168.5,1167.4],[1183.8,1184.4,1185.0,1185.5,1186.0,1186.5,1187.0,1187.4,1187.8,1188.2,1188.6,1188.9,1189.2,1189.5,1189.8,1190.0,1190.2,1190.4,1190.6,1190.7,1190.8,1190.9,1191.0,1191.0,1191.0,1191.0,1191.0,1190.9,1190.8,1190.7,1190.6,1190.4,1190.2,1190.0,1189.8,1189.5,1189.2,1188.9,1188.6,1188.2,1187.8,1187.4,1187.0,1186.5,1186.0,1185.5,1185.0,1184.4,1183.8,1183.2,1182.6,1181.9,1181.2,1180.5,1179.8,1179.0,1178.2,1177.4,1176.6,1175.7,1174.8,1173.9,1173.0,1172.0,1171.0,1170.0,1169.0,1167.9,1166.8],[1183.2,1183.8,1184.3,1184.9,1185.4,1185.9,1186.3,1186.8,1187.2,1187.6,1187.9,1188.3,1188.6,1188.9,1189.1,1189.4,1189.6,1189.8,1189.9,1190.1,1190.2,1190.3,1190.3,1190.4,1190.4,1190.4,1190.3,1190.3,1190.2,1190.1,1189.9,1189.8,1189.6,1189.4,1189.1,1188.9,1188.6,1188.3,1187.9,1187.6,1187.2,1186.8,1186.3,1185.9,1185.4,1184.9,1184.3,1183.8,1183.2,1182.6,1181.9,1181.3,1180.6,1179.9,1179.1,1178.4,1177.6,1176.8,1175.9,1175.1,1174.2,1173.3,1172.3,1171.4,1170.4,1169.4,1168.3,1167.3,1166.2],[1182.6,1183.1,1183.7,1184.2,1184.8,1185.2,1185.7,1186.1,1186.6,1186.9,1187.3,1187.6,1188.0,1188.2,1188.5,1188.7,1189.0,1189.1,1189.3,1189.4,1189.6,1189.6,1189.7,1189.7,1189.8,1189.7,1189.7,1189.6,1189.6,1189.4,1189.3,1189.1,1189.0,1188.7,1188.5,1188.2,1188.0,1187.6,1187.3,1186.9,1186.6,1186.1,1185.7,1185.2,1184.8,1184.2,1183.7,1183.1,1182.6,1181.9,1181.3,1180.6,1180.0,1179.2,1178.5,1177.7,1177.0,1176.1,1175.3,1174.4,1173.6,1172.6,1171.7,1170.7,1169.8,1168.7,1167.7,1166.6,1165.6],[1181.9,1182.5,1183.1,1183.6,1184.1,1184.6,1185.1,1185.5,1185.9,1186.3,1186.7,1187.0,1187.3,1187.6,1187.9,1188.1,1188.3,1188.5,1188.7,1188.8,1188.9,1189.0,1189.1,1189.1,1189.1,1189.1,1189.1,1189.0,1188.9,1188.8,1188.7,1188.5,1188.3,1188.1,1187.9,1187.6,1187.3,1187.0,1186.7,1186.3,1185.9,1185.5,1185.1,1184.6,1184.1,1183.6,1183.1,1182.5,1181.9,1181.3,1180.7,1180.0,1179.3,1178.6,1177.9,1177.1,1176.3,1175.5,1174.7,1173.8,1172.9,1172.0,1171.1,1170.1,1169.1,1168.1,1167.1,1166.0,1164.9],[1181.2,1181.8,1182.4,1182.9,1183.4,1183.9,1184.4,1184.8,1185.2,1185.6,1186.0,1186.3,1186.6,1186.9,1187.2,1187.4,1187.6,1187.8,1188.0,1188.1,1188.2,1188.3,1188.4,1188.4,1188.4,1188.4,1188.4,1188.3,1188.2,1188.1,1188.0,1187.8,1187.6,1187.4,1187.2,1186.9,1186.6,1186.3,1186.0,1185.6,1185.2,1184.8,1184.4,1183.9,1183.4,1182.9,1182.4,1181.8,1181.2,1180.6,1180.0,1179.3,1178.6,1177.9,1177.2,1176.4,1175.6,1174.8,1174.0,1173.1,1172.2,1171.3,1170.4,1169.4,1168.4,1167.4,1166.4,1165.3,1164.2],[1180.6,1181.1,1181.7,1182.2,1182.8,1183.2,1183.7,1184.1,1184.6,1184.9,1185.3,1185.6,1186.0,1186.2,1186.5,1186.7,1187.0,1187.1,1187.3,1187.4,1187.6,1187.6,1187.7,1187.7,1187.8,1187.7,1187.7,1187.6,1187.6,1187.4,1187.3,1187.1,1187.0,1186.7,1186.5,1186.2,1186.0,1185.6,1185.3,1184.9,1184.6,1184.1,1183.7,1183.2,1182.8,1182.2,1181.7,1181.1,1180.6,1179.9,1179.3,1178.6,1178.0,1177.2,1176.5,1175.7,1175.0,1174.1,1173.3,1172.4,1171.6,1170.6,1169.7,1168.7,1167.8,1166.7,1165.7,1164.6,1163.6],[1179.8,1180.4,1181.0,1181.5,1182.0,1182.5,1183.0,1183.4,1183.8,1184.2,1184.6,1184.9,1185.2,1185.5,1185.8,1186.0,1186.2,1186.4,1186.6,1186.7,1186.8,1186.9,1187.0,1187.0,1187.0,1187.0,1187.0,1186.9,1186.8,1186.7,1186.6,1186.4,1186.2,1186.0,1185.8,1185.5,1185.2,1184.9,1184.6,1184.2,1183.8,1183.4,1183.0,1182.5,1182.0,1181.5,1181.0,1180.4,1179.8,1179.2,1178.6,1177.9,1177.2,1176.5,1175.8,1175.0,1174.2,1173.4,1172.6,1171.7,1170.8,1169.9,1169.0,1168.0,1167.0,1166.0,1165.0,1163.9,1162.8],[1179.1,1179.7,1180.3,1180.8,1181.3,1181.8,1182.3,1182.7,1183.1,1183.5,1183.9,1184.2,1184.5,1184.8,1185.1,1185.3,1185.5,1185.7,1185.9,1186.0,1186.1,1186.2,1186.3,1186.3,1186.3,1186.3,1186.3,1186.2,1186.1,1186.0,1185.9,1185.7,1185.5,1185.3,1185.1,1184.8,1184.5,1184.2,1183.9,1183.5,1183.1,1182.7,1182.3,1181.8,1181.3,1180.8,1180.3,1179.7,1179.1,1178.5,1177.9,1177.2,1176.5,1175.8,1175.1,1174.3,1173.5,1172.7,1171.9,1171.0,1170.1,1169.2,1168.3,1167.3,1166.3,1165.3,1164.3,1163.2,1162.1],[1178.4,1178.9,1179.5,1180.0,1180.6,1181.0,1181.5,1181.9,1182.4,1182.7,1183.1,1183.4,1183.8,1184.0,1184.3,1184.5,1184.8,1184.9,1185.1,1185.2,1185.4,1185.4,1185.5,1185.5,1185.6,1185.5,1185.5,1185.4,1185.4,1185.2,1185.1,1184.9,1184.8,1184.5,1184.3,1184.0,1183.8,1183.4,1183.1,1182.7,1182.4,1181.9,1181.5,1181.0,1180.6,1180.0,1179.5,1178.9,1178.4,1177.7,1177.1,1176.4,1175.8,1175.0,1174.3,1173.5,1172.8,1171.9,1171.1,1170.2,1169.4,1168.4,1167.5,1166.5,1165.6,1164.5,1163.5,1162.4,1161.4],[1177.6,1178.2,1178.7,1179.3,1179.8,1180.3,1180.7,1181.2,1181.6,1182.0,1182.3,1182.7,1183.0,1183.3,1183.5,1183.8,1184.0,1184.2,1184.3,1184.5,1184.6,1184.7,1184.7,1184.8,1184.8,1184.8,1184.7,1184.7,1184.6,1184.5,1184.3,1184.2,1184.0,1183.8,1183.5,1183.3,1183.0,1182.7,1182.3,1182.0,1181.6,1181.2,1180.7,1180.3,1179.8,1179.3,1178.7,1178.2,1177.6,1177.0,1176.3,1175.7,1175.0,1174.3,1173.5,1172.8,1172.0,1171.2,1170.3,1169.5,1168.6,1167.7,1166.7,1165.8,1164.8,1163.8,1162.7,1161.7,1160.6],[1176.8,1177.4,1178.0,1178.5,1179.0,1179.5,1180.0,1180.4,1180.8,1181.2,1181.6,1181.9,1182.2,1182.5,1182.8,1183.0,1183.2,1183.4,1183.6,1183.7,1183.8,1183.9,1184.0,1184.0,1184.0,1184.0,1184.0,1183.9,1183.8,1183.7,1183.6,1183.4,1183.2,1183.0,1182.8,1182.5,1182.2,1181.9,1181.6,1181.2,1180.8,1180.4,1180.0,1179.5,1179.0,1178.5,1178.0,1177.4,1176.8,1176.2,1175.6,1174.9,1174.2,1173.5,1172.8,1172.0,1171.2,1170.4,1169.6,1168.7,1167.8,1166.9,1166.0,1165.0,1164.0,1163.0,1162.0,1160.9,1159.8],[1176.0,1176.6,1177.1,1177.7,1178.2,1178.7,1179.1,1179.6,1180.0,1180.4,1180.7,1181.1,1181.4,1181.7,1181.9,1182.2,1182.4,1182.6,1182.7,1182.9,1183.0,1183.1,1183.1,1183.2,1183.2,1183.2,1183.1,1183.1,1183.0,1182.9,1182.7,1182.6,1182.4,1182.2,1181.9,1181.7,1181.4,1181.1,1180.7,1180.4,1180.0,1179.6,1179.1,1178.7,1178.2,1177.7,1177.1,1176.6,1176.0,1175.4,1174.7,1174.1,1173.4,1172.7,1171.9,1171.2,1170.4,1169.6,1168.7,1167.9,1167.0,1166.1,1165.1,1164.2,1163.2,1162.2,1161.1,1160.1,1159.0],[1175.2,1175.7,1176.3,1176.8,1177.4,1177.8,1178.3,1178.7,1179.2,1179.5,1179.9,1180.2,1180.6,1180.8,1181.1,1181.3,1181.6,1181.7,1181.9,1182.0,1182.2,1182.2,1182.3,1182.3,1182.4,1182.3,1182.3,1182.2,1182.2,1182.0,1181.9,1181.7,1181.6,1181.3,1181.1,1180.8,1180.6,1180.2,1179.9,1179.5,1179.2,1178.7,1178.3,1177.8,1177.4,1176.8,1176.3,1175.7,1175.2,1174.5,1173.9,1173.2,1172.6,1171.8,1171.1,1170.3,1169.6,1168.7,1167.9,1167.0,1166.2,1165.2,1164.3,1163.3,1162.4,1161.3,1160.3,1159.2,1158.2],[1174.3,1174.9,1175.5,1176.0,1176.5,1177.0,1177.5,1177.9,1178.3,1178.7,1179.1,1179.4,1179.7,1180.0,1180.3,1180.5,1180.7,1180.9,1181.1,1181.2,1181.3,1181.4,1181.5,1181.5,1181.5,1181.5,1181.5,1181.4,1181.3,1181.2,1181.1,1180.9,1180.7,1180.5,1180.3,1180.0,1179.7,1179.4,1179.1,1178.7,1178.3,1177.9,1177.5,1177.0,1176.5,1176.0,1175.5,1174.9,1174.3,1173.7,1173.1,1172.4,1171.7,1171.0,1170.3,1169.5,1168.7,1167.9,1167.1,1166.2,1165.3,1164.4,1163.5,1162.5,1161.5,1160.5,1159.5,1158.4,1157.3],[1173.4,1174.0,1174.6,1175.1,1175.6,1176.1,1176.6,1177.0,1177.4,1177.8,1178.2,1178.5,1178.8,1179.1,1179.4,1179.6,1179.8,1180.0,1180.2,1180.3,1180.4,1180.5,1180.6,1180.6,1180.6,1180.6,1180.6,1180.5,1180.4,1180.3,1180.2,1180.0,1179.8,1179.6,1179.4,1179.1,1178.8,1178.5,1178.2,1177.8,1177.4,1177.0,1176.6,1176.1,1175.6,1175.1,1174.6,1174.0,1173.4,1172.8,1172.2,1171.5,1170.8,1170.1,1169.4,1168.6,1167.8,1167.0,1166.2,1165.3,1164.4,1163.5,1162.6,1161.6,1160.6,1159.6,1158.6,1157.5,1156.4],[1172.6,1173.1,1173.7,1174.2,1174.8,1175.2,1175.7,1176.1,1176.6,1176.9,1177.3,1177.6,1178.0,1178.2,1178.5,1178.7,1179.0,1179.1,1179.3,1179.4,1179.6,1179.6,1179.7,1179.7,1179.8,1179.7,1179.7,1179.6,1179.6,1179.4,1179.3,1179.1,1179.0,1178.7,1178.5,1178.2,1178.0,1177.6,1177.3,1176.9,1176.6,1176.1,1175.7,1175.2,1174.8,1174.2,1173.7,1173.1,1172.6,1171.9,1171.3,1170.6,1170.0,1169.2,1168.5,1167.7,1167.0,1166.1,1165.3,1164.4,1163.6,1162.6,1161.7,1160.7,1159.8,1158.7,1157.7,1156.6,1155.6],[1171.6,1172.2,1172.8,1173.3,1173.8,1174.3,1174.8,1175.2,1175.6,1176.0,1176.4,1176.7,1177.0,1177.3,1177.6,1177.8,1178.0,1178.2,1178.4,1178.5,1178.6,1178.7,1178.8,1178.8,1178.8,1178.8,1178.8,1178.7,1178.6,1178.5,1178.4,1178.2,1178.0,1177.8,1177.6,1177.3,1177.0,1176.7,1176.4,1176.0,1175.6,1175.2,1174.8,1174.3,1173.8,1173.3,1172.8,1172.2,1171.6,1171.0,1170.4,1169.7,1169.0,1168.3,1167.6,1166.8,1166.0,1165.2,1164.4,1163.5,1162.6,1161.7,1160.8,1159.8,1158.8,1157.8,1156.8,1155.7,1154.6],[1170.7,1171.3,1171.9,1172.4,1172.9,1173.4,1173.9,1174.3,1174.7,1175.1,1175.5,1175.8,1176.1,1176.4,1176.7,1176.9,1177.1,1177.3,1177.5,1177.6,1177.7,1177.8,1177.9,1177.9,1177.9,1177.9,1177.9,1177.8,1177.7,1177.6,1177.5,1177.3,1177.1,1176.9,1176.7,1176.4,1176.1,1175.8,1175.5,1175.1,1174.7,1174.3,1173.9,1173.4,1172.9,1172.4,1171.9,1171.3,1170.7,1170.1,1169.5,1168.8,1168.1,1167.4,1166.7,1165.9,1165.1,1164.3,1163.5,1162.6,1161.7,1160.8,1159.9,1158.9,1157.9,1156.9,1155.9,1154.8,1153.7],[1169.8,1170.3,1170.9,1171.4,1172.0,1172.4,1172.9,1173.3,1173.8,1174.1,1174.5,1174.8,1175.2,1175.4,1175.7,1175.9,1176.2,1176.3,1176.5,1176.6,1176.8,1176.8,1176.9,1176.9,1177.0,1176.9,1176.9,1176.8,1176.8,1176.6,1176.5,1176.3,1176.2,1175.9,1175.7,1175.4,1175.2,1174.8,1174.5,1174.1,1173.8,1173.3,1172.9,1172.4,1172.0,1171.4,1170.9,1170.3,1169.8,1169.1,1168.5,1167.8,1167.2,1166.4,1165.7,1164.9,1164.2,1163.3,1162.5,1161.6,1160.8,1159.8,1158.9,1157.9,1157.0,1155.9,1154.9,1153.8,1152.8],[1168.8,1169.4,1169.9,1170.5,1171.0,1171.5,1171.9,1172.4,1172.8,1173.2,1173.5,1173.9,1174.2,1174.5,1174.7,1175.0,1175.2,1175.4,1175.5,1175.7,1175.8,1175.9,1175.9,1176.0,1176.0,1176.0,1175.9,1175.9,1175.8,1175.7,1175.5,1175.4,1175.2,1175.0,1174.7,1174.5,1174.2,1173.9,1173.5,1173.2,1172.8,1172.4,1171.9,1171.5,1171.0,1170.5,1169.9,1169.4,1168.8,1168.2,1167.5,1166.9,1166.2,1165.5,1164.7,1164.0,1163.2,1162.4,1161.5,1160.7,1159.8,1158.9,1157.9,1157.0,1156.0,1155.0,1153.9,1152.9,1151.8],[1167.8,1168.4,1169.0,1169.5,1170.0,1170.5,1171.0,1171.4,1171.8,1172.2,1172.6,1172.9,1173.2,1173.5,1173.8,1174.0,1174.2,1174.4,1174.6,1174.7,1174.8,1174.9,1175.0,1175.0,1175.0,1175.0,1175.0,1174.9,1174.8,1174.7,1174.6,1174.4,1174.2,1174.0,1173.8,1173.5,1173.2,1172.9,1172.6,1172.2,1171.8,1171.4,1171.0,1170.5,1170.0,1169.5,1169.0,1168.4,1167.8,1167.2,1166.6,1165.9,1165.2,1164.5,1163.8,1163.0,1162.2,1161.4,1160.6,1159.7,1158.8,1157.9,1157.0,1156.0,1155.0,1154.0,1153.0,1151.9,1150.8],[1166.8,1167.4,1167.9,1168.5,1169.0,1169.5,1169.9,1170.4,1170.8,1171.2,1171.5,1171.9,1172.2,1172.5,1172.7,1173.0,1173.2,1173.4,1173.5,1173.7,1173.8,1173.9,1173.9,1174.0,1174.0,1174.0,1173.9,1173.9,1173.8,1173.7,1173.5,1173.4,1173.2,1173.0,1172.7,1172.5,1172.2,1171.9,1171.5,1171.2,1170.8,1170.4,1169.9,1169.5,1169.0,1168.5,1167.9,1167.4,1166.8,1166.2,1165.5,1164.9,1164.2,1163.5,1162.7,1162.0,1161.2,1160.4,1159.5,1158.7,1157.8,1156.9,1155.9,1155.0,1154.0,1153.0,1151.9,1150.9,1149.8],[1165.8,1166.3,1166.9,1167.4,1168.0,1168.4,1168.9,1169.3,1169.8,1170.1,1170.5,1170.8,1171.2,1171.4,1171.7,1171.9,1172.2,1172.3,1172.5,1172.6,1172.8,1172.8,1172.9,1172.9,1173.0,1172.9,1172.9,1172.8,1172.8,1172.6,1172.5,1172.3,1172.2,1171.9,1171.7,1171.4,1171.2,1170.8,1170.5,1170.1,1169.8,1169.3,1168.9,1168.4,1168.0,1167.4,1166.9,1166.3,1165.8,1165.1,1164.5,1163.8,1163.2,1162.4,1161.7,1160.9,1160.2,1159.3,1158.5,1157.6,1156.8,1155.8,1154.9,1153.9,1153.0,1151.9,1150.9,1149.8,1148.8],[1164.7,1165.3,1165.9,1166.4,1166.9,1167.4,1167.9,1168.3,1168.7,1169.1,1169.5,1169.8,1170.1,1170.4,1170.7,1170.9,1171.1,1171.3,1171.5,1171.6,1171.7,1171.8,1171.9,1171.9,1171.9,1171.9,1171.9,1171.8,1171.7,1171.6,1171.5,1171.3,1171.1,1170.9,1170.7,1170.4,1170.1,1169.8,1169.5,1169.1,1168.7,1168.3,1167.9,1167.4,1166.9,1166.4,1165.9,1165.3,1164.7,1164.1,1163.5,1162.8,1162.1,1161.4,1160.7,1159.9,1159.1,1158.3,1157.5,1156.6,1155.7,1154.8,1153.9,1152.9,1151.9,1150.9,1149.9,1148.8,1147.7],[1163.6,1164.2,1164.8,1165.3,1165.8,1166.3,1166.8,1167.2,1167.6,1168.0,1168.4,1168.7,1169.0,1169.3,1169.6,1169.8,1170.0,1170.2,1170.4,1170.5,1170.6,1170.7,1170.8,1170.8,1170.8,1170.8,1170.8,1170.7,1170.6,1170.5,1170.4,1170.2,1170.0,1169.8,1169.6,1169.3,1169.0,1168.7,1168.4,1168.0,1167.6,1167.2,1166.8,1166.3,1165.8,1165.3,1164.8,1164.2,1163.6,1163.0,1162.4,1161.7,1161.0,1160.3,1159.6,1158.8,1158.0,1157.2,1156.4,1155.5,1154.6,1153.7,1152.8,1151.8,1150.8,1149.8,1148.8,1147.7,1146.6],[1162.6,1163.1,1163.7,1164.2,1164.8,1165.2,1165.7,1166.1,1166.6,1166.9,1167.3,1167.6,1168.0,1168.2,1168.5,1168.7,1169.0,1169.1,1169.3,1169.4,1169.6,1169.6,1169.7,1169.7,1169.8,1169.7,1169.7,1169.6,1169.6,1169.4,1169.3,1169.1,1169.0,1168.7,1168.5,1168.2,1168.0,1167.6,1167.3,1166.9,1166.6,1166.1,1165.7,1165.2,1164.8,1164.2,1163.7,1163.1,1162.6,1161.9,1161.3,1160.6,1160.0,1159.2,1158.5,1157.7,1157.0,1156.1,1155.3,1154.4,1153.6,1152.6,1151.7,1150.7,1149.8,1148.7,1147.7,1146.6,1145.6],[1161.4,1162.0,1162.6,1163.1,1163.6,1164.1,1164.6,1165.0,1165.4,1165.8,1166.2,1166.5,1166.8,1167.1,1167.4,1167.6,1167.8,1168.0,1168.2,1168.3,1168.4,1168.5,1168.6,1168.6,1168.6,1168.6,1168.6,1168.5,1168.4,1168.3,1168.2,1168.0,1167.8,1167.6,1167.4,1167.1,1166.8,1166.5,1166.2,1165.8,1165.4,1165.0,1164.6,1164.1,1163.6,1163.1,1162.6,1162.0,1161.4,1160.8,1160.2,1159.5,1158.8,1158.1,1157.4,1156.6,1155.8,1155.0,1154.2,1153.3,1152.4,1151.5,1150.6,1149.6,1148.6,1147.6,1146.6,1145.5,1144.4],[1160.3,1160.9,1161.5,1162.0,1162.5,1163.0,1163.5,1163.9,1164.3,1164.7,1165.1,1165.4,1165.7,1166.0,1166.3,1166.5,1166.7,1166.9,1167.1,1167.2,1167.3,1167.4,1167.5,1167.5,1167.5,1167.5,1167.5,1167.4,1167.3,1167.2,1167.1,1166.9,1166.7,1166.5,1166.3,1166.0,1165.7,1165.4,1165.1,1164.7,1164.3,1163.9,1163.5,1163.0,1162.5,1162.0,1161.5,1160.9,1160.3,1159.7,1159.1,1158.4,1157.7,1157.0,1156.3,1155.5,1154.7,1153.9,1153.1,1152.2,1151.3,1150.4,1149.5,1148.5,1147.5,1146.5,1145.5,1144.4,1143.3],[1159.2,1159.7,1160.3,1160.8,1161.4,1161.8,1162.3,1162.7,1163.2,1163.5,1163.9,1164.2,1164.6,1164.8,1165.1,1165.3,1165.6,1165.7,1165.9,1166.0,1166.2,1166.2,1166.3,1166.3,1166.4,1166.3,1166.3,1166.2,1166.2,1166.0,1165.9,1165.7,1165.6,1165.3,1165.1,1164.8,1164.6,1164.2,1163.9,1163.5,1163.2,1162.7,1162.3,1161.8,1161.4,1160.8,1160.3,1159.7,1159.2,1158.5,1157.9,1157.2,1156.6,1155.8,1155.1,1154.3,1153.6,1152.7,1151.9,1151.0,1150.2,1149.2,1148.3,1147.3,1146.4,1145.3,1144.3,1143.2,1142.2],[1158.0,1158.6,1159.1,1159.7,1160.2,1160.7,1161.1,1161.6,1162.0,1162.4,1162.7,1163.1,1163.4,1163.7,1163.9,1164.2,1164.4,1164.6,1164.7,1164.9,1165.0,1165.1,1165.1,1165.2,1165.2,1165.2,1165.1,1165.1,1165.0,1164.9,1164.7,1164.6,1164.4,1164.2,1163.9,1163.7,1163.4,1163.1,1162.7,1162.4,1162.0,1161.6,1161.1,1160.7,1160.2,1159.7,1159.1,1158.6,1158.0,1157.4,1156.7,1156.1,1155.4,1154.7,1153.9,1153.2,1152.4,1151.6,1150.7,1149.9,1149.0,1148.1,1147.1,1146.2,1145.2,1144.2,1143.1,1142.1,1141.0],[1156.8,1157.4,1158.0,1158.5,1159.0,1159.5,1160.0,1160.4,1160.8,1161.2,1161.6,1161.9,1162.2,1162.5,1162.8,1163.0,1163.2,1163.4,1163.6,1163.7,1163.8,1163.9,1164.0,1164.0,1164.0,1164.0,1164.0,1163.9,1163.8,1163.7,1163.6,1163.4,1163.2,1163.0,1162.8,1162.5,1162.2,1161.9,1161.6,1161.2,1160.8,1160.4,1160.0,1159.5,1159.0,1158.5,1158.0,1157.4,1156.8,1156.2,1155.6,1154.9,1154.2,1153.5,1152.8,1152.0,1151.2,1150.4,1149.6,1148.7,1147.8,1146.9,1146.0,1145.0,1144.0,1143.0,1142.0,1140.9,1139.8],[1155.6,1156.2,1156.7,1157.3,1157.8,1158.3,1158.7,1159.2,1159.6,1160.0,1160.3,1160.7,1161.0,1161.3,1161.5,1161.8,1162.0,1162.2,1162.3,1162.5,1162.6,1162.7,1162.7,1162.8,1162.8,1162.8,1162.7,1162.7,1162.6,1162.5,1162.3,1162.2,1162.0,1161.8,1161.5,1161.3,1161.0,1160.7,1160.3,1160.0,1159.6,1159.2,1158.7,1158.3,1157.8,1157.3,1156.7,1156.2,1155.6,1155.0,1154.3,1153.7,1153.0,1152.3,1151.5,1150.8,1150.0,1149.2,1148.3,1147.5,1146.6,1145.7,1144.7,1143.8,1142.8,1141.8,1140.7,1139.7,1138.6],[1154.4,1154.9,1155.5,1156.0,1156.6,1157.0,1157.5,1157.9,1158.4,1158.7,1159.1,1159.4,1159.8,1160.0,1160.3,1160.5,1160.8,1160.9,1161.1,1161.2,1161.4,1161.4,1161.5,1161.5,1161.6,1161.5,1161.5,1161.4,1161.4,1161.2,1161.1,1160.9,1160.8,1160.5,1160.3,1160.0,1159.8,1159.4,1159.1,1158.7,1158.4,1157.9,1157.5,1157.0,1156.6,1156.0,1155.5,1154.9,1154.4,1153.7,1153.1,1152.4,1151.8,1151.0,1150.3,1149.5,1148.8,1147.9,1147.1,1146.2,1145.4,1144.4,1143.5,1142.5,1141.6,1140.5,1139.5,1138.4,1137.4]],"colorscale":"Viridis","contours":{"start":1160,"end":1200,"size":5,"showlabels":true,"labelformat":".0f"},"colorbar":{"title":{"text":"elevation (m)"}},"name":"f(x,y)"},{"type":"scatter","x":[10.0,9.769,9.538,9.308,9.077,8.846,8.615,8.385,8.154,7.923,7.692,7.462,7.231,7.0,6.769,6.538,6.308,6.077,5.846,5.615,5.385,5.154,4.923,4.692,4.462,4.231,4.0,3.769,3.538,3.308,3.077,2.846,2.615,2.385,2.154,1.923,1.692,1.462,1.231,1.0,1.0,0.79,0.624,0.492,0.389,0.307,0.242,0.191,0.151,0.119,0.094,0.074,0.059,0.046,0.037,0.029,0.023,0.018,0.014,0.011,0.009,0.007,0.006,0.004,0.003,0.003,0.002,0.002,0.001,0.001,0.001,0.001,0.001,0.0,0.0,0.0,0.0,0.0,0.0,0.0],"y":[50.0,49.767,49.53,49.288,49.041,48.789,48.532,48.269,48.0,47.725,47.444,47.156,46.86,46.557,46.246,45.927,45.598,45.259,44.91,44.55,44.177,43.792,43.393,42.978,42.547,42.097,41.628,41.136,40.619,40.075,39.5,38.889,38.236,37.536,36.78,35.956,35.048,34.035,32.886,31.548,31.548,30.092,28.704,27.38,26.117,24.912,23.763,22.666,21.621,20.623,19.672,18.764,17.898,17.073,16.285,15.534,14.817,14.134,13.482,12.86,12.266,11.7,11.161,10.646,10.155,9.686,9.239,8.813,8.406,8.019,7.649,7.296,6.959,6.638,6.332,6.04,5.761,5.495,5.242,5.0],"mode":"lines","line":{"color":"red","width":3},"name":"steepest-ascent path y\u224831.5x^0.2"},{"type":"scatter","x":[10,0],"y":[50,0],"mode":"lines","line":{"color":"white","dash":"dash","width":2},"name":"straight line to summit"},{"type":"scatter","x":[10,0],"y":[50,0],"mode":"markers+text","text":["  you (10, 50)","  summit (0, 0)"],"textposition":["middle right","middle right"],"marker":{"size":10,"color":["orange","white"]},"textfont":{"color":"white"},"showlegend":false}],"layout":{"title":{"text":"Ski hill: the gradient is perpendicular to the contours"},"xaxis":{"title":{"text":"x (m)"},"range":[-12,22],"constrain":"domain"},"yaxis":{"title":{"text":"y (m)"},"scaleanchor":"x","range":[-8,62],"constrain":"domain"},"height":700,"legend":{"orientation":"h","y":-0.15},"annotations":[{"x":0.10050506338833642,"y":40.10050506338834,"ax":10,"ay":50,"xref":"x","yref":"y","axref":"x","ayref":"y","showarrow":true,"arrowhead":3,"arrowwidth":3,"arrowcolor":"orange","text":"","font":{"color":"orange"},"xanchor":"right","yanchor":"top"},{"x":-0.3994949366116636,"y":39.60050506338834,"xref":"x","yref":"y","showarrow":false,"text":"\u2207f = (\u22121, \u22121)<br>steepest ascent","font":{"color":"orange"},"xanchor":"right","yanchor":"top"},{"x":19.899494936611664,"y":59.89949493661166,"ax":10,"ay":50,"xref":"x","yref":"y","axref":"x","ayref":"y","showarrow":true,"arrowhead":3,"arrowwidth":3,"arrowcolor":"cyan","text":"","font":{"color":"cyan"},"xanchor":"left","yanchor":"middle"},{"x":20.399494936611664,"y":59.89949493661166,"xref":"x","yref":"y","showarrow":false,"text":" \u2212\u2207f: steepest descent","font":{"color":"cyan"},"xanchor":"left","yanchor":"middle"}]}}

Numerical check. A central finite difference confirms the gradient:

f = lambda x, y: 1200 - 0.05*x**2 - 0.01*y**2
h = 1e-6
dfdx = (f(10+h, 50) - f(10-h, 50)) / (2*h)   # -1.0
dfdy = (f(10, 50+h) - f(10, 50-h)) / (2*h)   # -1.0

4. Gradient of a vector function: the Jacobian

For a scalar function $f(x_1,x_2,x_3,\dots)$ of many variables the gradient is the column vector of first partial derivatives,

\[\nabla f=\begin{bmatrix}\partial f/\partial x_1\\ \partial f/\partial x_2\\ \partial f/\partial x_3\\ \vdots\end{bmatrix}.\]

Near a point $\vec x_0$ it defines the best linear approximation of $f$: $f(\vec x)\approx f(\vec x_0)+\nabla f(\vec x_0)\cdot(\vec x-\vec x_0)$ (the tangent plane).

For a vector-valued function each component has its own gradient, and stacking them as rows gives the Jacobian matrix $J_{ij}=\partial v_i/\partial x_j$. Example:

\[\vec v=\begin{bmatrix}3x^2y\\3y^3\\7xz\end{bmatrix} \quad\Rightarrow\quad J=\nabla\vec v= \begin{bmatrix} \partial v_1/\partial x&\partial v_1/\partial y&\partial v_1/\partial z\\ \partial v_2/\partial x&\partial v_2/\partial y&\partial v_2/\partial z\\ \partial v_3/\partial x&\partial v_3/\partial y&\partial v_3/\partial z \end{bmatrix} =\begin{bmatrix}6xy&3x^2&0\\0&9y^2&0\\7z&0&7x\end{bmatrix}.\]

Row $i$ is $(\nabla v_i)^T$. (Some texts, notably in continuum mechanics, define $\nabla\vec v$ as the transpose, so check the convention.) The Jacobian is to a vector function what the derivative is to a scalar one: $\vec v(\vec x)\approx\vec v(\vec x_0)+J(\vec x-\vec x_0)$.

5. Taylor series: the best linear and quadratic approximations

In one variable, around $x_0$:

\[f(x)\approx\underbrace{f(x_0)+f'(x_0)(x-x_0)}_{\text{best linear}}+\frac{f''(x_0)}{2!}(x-x_0)^2 ,\]

where adding the last term gives the best quadratic approximation. For $n$ variables, with $\vec x_0=(x_1^0,\dots,x_n^0)$:

\[f(\vec x)\approx f(\vec x_0)+\sum_{i=1}^{n}\frac{\partial f}{\partial x_i}(x_i-x_i^0)+\frac12\sum_{i=1}^{n}\sum_{j=1}^{n}\frac{\partial^2 f}{\partial x_i\,\partial x_j}(x_i-x_i^0)(x_j-x_j^0),\]

with all derivatives evaluated at $\vec x_0$. In matrix form, with $\Delta\vec x=\vec x-\vec x_0$,

\[f(\vec x)\approx f(\vec x_0)+\nabla f^T\Delta\vec x+\tfrac12\,\Delta\vec x^T H\,\Delta\vec x, \qquad H_{ij}=\frac{\partial^2 f}{\partial x_i\,\partial x_j}.\]

$H$ is the Hessian matrix. For smooth functions the mixed partials are equal ($\partial^2f/\partial x\partial y=\partial^2f/\partial y\partial x$), so $H$ is symmetric. Note the factor $\tfrac12$, matching the $1/2!$ of the 1-D series.

6. Finding a minimum or maximum

Analytical route. At an interior minimum or maximum the slope is zero in every direction, so solve

\[\nabla f=\vec 0 .\]

This condition is necessary but not sufficient: the points that satisfy it are critical (stationary) points, which may be minima, maxima or saddle points (§8). For realistic engineering models — thousands of variables, $f$ given by a simulation rather than a formula — this system usually cannot be solved by hand. So we search numerically, using $\nabla f$ (and sometimes $H$) only at the points we visit. The condition $\nabla f=\vec0$ still matters: it is how we recognize that we have arrived.

7. Gradient descent

To minimize $f$, start at $\vec x_0$ and repeatedly step in a downhill direction $\vec p$:

\[\vec x_{k+1}=\vec x_k+\alpha\,\vec p_k .\]

Two things must be chosen at every step:

  1. The search direction $\vec p$. The only requirement is that $f$ decreases along it. By the best linear approximation, $f(\vec x_k+\alpha\vec p)\approx f(\vec x_k)+\alpha\,\nabla f\cdot\vec p$, so $\vec p$ is a descent direction whenever $\nabla f\cdot\vec p<0$ (angle with the gradient above $90^\circ$). The steepest choice is $\vec p=-\nabla f$ (§2), giving \(\vec x_{k+1}=\vec x_k-\alpha\,\nabla f(\vec x_k).\)
  2. The step size $\alpha>0$. Too small is slow; too large overshoots and can diverge, because the linear approximation only holds near $\vec x_k$. In practice $\alpha$ is either fixed (the “learning rate” in machine learning) or chosen by a line search that shrinks it until $f$ decreases enough.

To find a maximum, either step uphill, $\vec x_{k+1}=\vec x_k+\alpha\nabla f$ (gradient ascent), or minimize $-f$.

8. The Hessian: is it a cup, a dome or a saddle?

At a critical point $\nabla f=\vec0$, so the Taylor series reduces to $f(\vec x)-f(\vec x_0)\approx\tfrac12\Delta\vec x^TH\Delta\vec x$. The local shape is set by the quadratic form of $H$ — the same classification as for positive definite matrices in the matrix decomposition post. Since $H$ is symmetric, its eigenvalues are real:

Eigenvalues of $H$ $H$ is Shape Critical point
all $\lambda>0$ positive definite cup ∪ local minimum
all $\lambda<0$ negative definite dome ∩ local maximum
mixed signs indefinite saddle saddle point (neither)
some $\lambda=0$, rest one sign semi-definite flat direction test is inconclusive

For $2\times2$ there is a shortcut, since $\det H=\lambda_1\lambda_2$ and $\operatorname{tr}H=\lambda_1+\lambda_2$: $\det H<0$ means a saddle; $\det H>0$ means a minimum if $\operatorname{tr}H>0$ (equivalently $f_{xx}>0$) and a maximum if $\operatorname{tr}H<0$.

Worked example. Find and classify the critical points of

\[f(x,y)=12xy-x^3-y^3 .\]

Gradient and Hessian:

\[\nabla f=\begin{bmatrix}12y-3x^2\\12x-3y^2\end{bmatrix},\qquad H=\begin{bmatrix}\partial^2f/\partial x^2&\partial^2f/\partial x\partial y\\\partial^2f/\partial y\partial x&\partial^2f/\partial y^2\end{bmatrix}=\begin{bmatrix}-6x&12\\12&-6y\end{bmatrix}.\]

Critical points: $\nabla f=\vec0$ gives $y=x^2/4$ and $x=y^2/4$, so $x=x^4/64\Rightarrow x(x^3-64)=0$, i.e. $(0,0)$ and $(4,4)$.

At $(4,4)$: $\nabla f=(48-48,\ 48-48)=(0,0)$ ✓ and

\[H=\begin{bmatrix}-24&12\\12&-24\end{bmatrix},\qquad (-24-\lambda)^2-12^2=0\Rightarrow(-24-\lambda-12)(-24-\lambda+12)=0\Rightarrow\lambda=-36,\ -12 .\]

Both eigenvalues are negative: $H$ is negative definite, the surface is dome-shaped, and $(4,4)$ is a local maximum with $f(4,4)=192-64-64=64$. (Check: $\det H=432>0$, $\operatorname{tr}H=-48<0$.)

At $(0,0)$: $H=\begin{bmatrix}0&12\12&0\end{bmatrix}$, $\lambda=\pm12$ — mixed signs, so a saddle point. Along $y=x$ the function first rises, along $y=-x$ it falls ($f=-12x^2$).

Local is not global. $(4,4)$ is the highest point nearby, but $f$ is unbounded: $f(-10,0)=1000>64$, and $f\to+\infty$ as $x\to-\infty$. The Hessian test is purely local.

Numerically. Gradient ascent with $\alpha=0.02$ from $(3,5)$:

Iteration $k$ $(x_k,y_k)$ $f$
0 $(3,\ 5)$ 28.0
1 $(3.66,\ 4.22)$ 61.16
3 $(3.94,\ 3.98)$ 63.96
10 $(3.994,\ 3.994)$ 63.9996
50 $(4.000,\ 4.000)$ 64.0000

The contour map shows both critical points: the closed rings around $(4,4)$ are the dome, and the contours crossing at $(0,0)$ are the saddle (the surface rises in two opposite quadrants and falls in the other two). The black dots are the gradient-ascent iterates from the table, climbing perpendicular to the contours.

{"data":[{"type":"contour","x":[-2.0,-1.867,-1.733,-1.6,-1.467,-1.333,-1.2,-1.067,-0.933,-0.8,-0.667,-0.533,-0.4,-0.267,-0.133,0.0,0.133,0.267,0.4,0.533,0.667,0.8,0.933,1.067,1.2,1.333,1.467,1.6,1.733,1.867,2.0,2.133,2.267,2.4,2.533,2.667,2.8,2.933,3.067,3.2,3.333,3.467,3.6,3.733,3.867,4.0,4.133,4.267,4.4,4.533,4.667,4.8,4.933,5.067,5.2,5.333,5.467,5.6,5.733,5.867,6.0],"y":[-2.0,-1.867,-1.733,-1.6,-1.467,-1.333,-1.2,-1.067,-0.933,-0.8,-0.667,-0.533,-0.4,-0.267,-0.133,0.0,0.133,0.267,0.4,0.533,0.667,0.8,0.933,1.067,1.2,1.333,1.467,1.6,1.733,1.867,2.0,2.133,2.267,2.4,2.533,2.667,2.8,2.933,3.067,3.2,3.333,3.467,3.6,3.733,3.867,4.0,4.133,4.267,4.4,4.533,4.667,4.8,4.933,5.067,5.2,5.333,5.467,5.6,5.733,5.867,6.0],"z":[[64.0,59.3,54.81,50.5,46.35,42.37,38.53,34.81,31.21,27.71,24.3,20.95,17.66,14.42,11.2,8.0,4.8,1.58,-1.66,-4.95,-8.3,-11.71,-15.21,-18.81,-22.53,-26.37,-30.35,-34.5,-38.81,-43.3,-48.0,-52.91,-58.05,-63.42,-69.06,-74.96,-81.15,-87.64,-94.44,-101.57,-109.04,-116.86,-125.06,-133.63,-142.61,-152.0,-161.82,-172.07,-182.78,-193.97,-205.63,-217.79,-230.47,-243.67,-257.41,-271.7,-286.57,-302.02,-318.06,-334.72,-352.0],[59.3,54.82,50.54,46.44,42.51,38.74,35.11,31.61,28.22,24.94,21.73,18.6,15.53,12.5,9.49,6.5,3.52,0.51,-2.52,-5.59,-8.73,-11.93,-15.22,-18.6,-22.1,-25.73,-29.5,-33.43,-37.53,-41.81,-46.3,-50.99,-55.91,-61.08,-66.5,-72.19,-78.17,-84.44,-91.03,-97.94,-105.2,-112.81,-120.79,-129.16,-137.92,-147.1,-156.7,-166.74,-177.24,-188.21,-199.66,-211.61,-224.07,-237.06,-250.58,-264.67,-279.32,-294.55,-310.38,-326.83,-343.9],[54.81,50.54,46.47,42.58,38.87,35.31,31.9,28.61,25.43,22.36,19.37,16.45,13.59,10.77,7.98,5.21,2.43,-0.36,-3.18,-6.04,-8.96,-11.94,-15.02,-18.19,-21.48,-24.9,-28.45,-32.17,-36.05,-40.12,-44.39,-48.87,-53.58,-58.54,-63.74,-69.22,-74.98,-81.05,-87.42,-94.12,-101.16,-108.56,-116.33,-124.48,-133.03,-141.99,-151.38,-161.21,-171.5,-182.25,-193.49,-205.22,-217.47,-230.25,-243.56,-257.43,-271.87,-286.89,-302.51,-318.74,-335.59],[50.5,46.44,42.58,38.91,35.41,32.07,28.86,25.79,22.83,19.97,17.19,14.49,11.84,9.23,6.66,4.1,1.53,-1.04,-3.65,-6.3,-9.0,-11.78,-14.64,-17.6,-20.67,-23.87,-27.22,-30.72,-34.39,-38.25,-42.3,-46.57,-51.07,-55.81,-60.8,-66.07,-71.62,-77.46,-83.62,-90.11,-96.94,-104.13,-111.68,-119.62,-127.95,-136.7,-145.88,-155.5,-165.57,-176.11,-187.13,-198.66,-210.69,-223.25,-236.35,-250.01,-264.23,-279.04,-294.45,-310.46,-327.1],[46.35,42.51,38.87,35.41,32.12,28.99,26.0,23.14,20.39,17.75,15.18,12.69,10.26,7.87,5.5,3.15,0.81,-1.56,-3.95,-6.38,-8.87,-11.44,-14.08,-16.83,-19.69,-22.68,-25.81,-29.1,-32.56,-36.2,-40.05,-44.1,-48.38,-52.91,-57.69,-62.74,-68.08,-73.71,-79.66,-85.93,-92.55,-99.52,-106.86,-114.59,-122.71,-131.25,-140.21,-149.61,-159.47,-169.8,-180.61,-191.92,-203.74,-216.09,-228.97,-242.42,-256.43,-271.02,-286.21,-302.02,-318.45],[42.37,38.74,35.31,32.07,28.99,26.07,23.3,20.65,18.12,15.68,13.33,11.06,8.83,6.66,4.51,2.37,0.23,-1.92,-4.09,-6.31,-8.59,-10.94,-13.38,-15.91,-18.56,-21.33,-24.25,-27.33,-30.57,-34.0,-37.63,-41.47,-45.54,-49.85,-54.42,-59.26,-64.38,-69.8,-75.54,-81.6,-88.0,-94.76,-101.89,-109.4,-117.31,-125.63,-134.38,-143.57,-153.21,-163.33,-173.93,-185.02,-196.63,-208.76,-221.44,-234.67,-248.46,-262.85,-277.82,-293.41,-309.63],[38.53,35.11,31.9,28.86,26.0,23.3,20.74,18.3,15.98,13.76,11.62,9.56,7.55,5.59,3.65,1.73,-0.19,-2.13,-4.1,-6.1,-8.17,-10.3,-12.53,-14.85,-17.28,-19.84,-22.55,-25.41,-28.44,-31.66,-35.07,-38.7,-42.56,-46.66,-51.01,-55.63,-60.54,-65.75,-71.27,-77.12,-83.31,-89.85,-96.77,-104.07,-111.76,-119.87,-128.41,-137.38,-146.82,-156.72,-167.1,-177.98,-189.38,-201.3,-213.76,-226.78,-240.36,-254.53,-269.29,-284.67,-300.67],[34.81,31.61,28.61,25.79,23.14,20.65,18.3,16.08,13.97,11.97,10.04,8.19,6.4,4.65,2.92,1.21,-0.5,-2.22,-3.97,-5.76,-7.62,-9.54,-11.55,-13.65,-15.87,-18.22,-20.71,-23.36,-26.18,-29.18,-32.39,-35.8,-39.45,-43.33,-47.47,-51.88,-56.58,-61.57,-66.88,-72.51,-78.49,-84.82,-91.52,-98.61,-106.09,-113.99,-122.31,-131.07,-140.29,-149.98,-160.15,-170.82,-182.0,-193.71,-205.95,-218.76,-232.13,-246.08,-260.63,-275.8,-291.59],[31.21,28.22,25.43,22.83,20.39,18.12,15.98,13.97,12.08,10.29,8.58,6.94,5.36,3.82,2.31,0.81,-0.68,-2.19,-3.73,-5.31,-6.95,-8.66,-10.45,-12.35,-14.35,-16.49,-18.77,-21.2,-23.81,-26.6,-29.59,-32.79,-36.22,-39.89,-43.82,-48.02,-52.5,-57.28,-62.37,-67.79,-73.56,-79.68,-86.16,-93.03,-100.3,-107.99,-116.1,-124.65,-133.65,-143.13,-153.08,-163.54,-174.51,-186.0,-198.03,-210.62,-223.78,-237.52,-251.86,-266.81,-282.39],[27.71,24.94,22.36,19.97,17.75,15.68,13.76,11.97,10.29,8.7,7.21,5.78,4.42,3.09,1.79,0.51,-0.77,-2.07,-3.39,-4.76,-6.18,-7.68,-9.26,-10.94,-12.74,-14.66,-16.72,-18.94,-21.34,-23.91,-26.69,-29.68,-32.89,-36.35,-40.07,-44.05,-48.32,-52.89,-57.77,-62.98,-68.53,-74.43,-80.7,-87.36,-94.42,-101.89,-109.78,-118.12,-126.91,-136.17,-145.92,-156.16,-166.91,-178.19,-190.02,-202.39,-215.34,-228.86,-242.99,-257.73,-273.09],[24.3,21.73,19.37,17.19,15.18,13.33,11.62,10.04,8.58,7.21,5.93,4.71,3.56,2.45,1.37,0.3,-0.77,-1.86,-2.97,-4.12,-5.33,-6.62,-7.98,-9.45,-11.03,-12.74,-14.59,-16.6,-18.78,-21.14,-23.7,-26.48,-29.48,-32.73,-36.23,-40.0,-44.06,-48.41,-53.08,-58.07,-63.41,-69.1,-75.16,-81.6,-88.45,-95.7,-103.39,-111.51,-120.09,-129.14,-138.67,-148.7,-159.24,-170.3,-181.91,-194.07,-206.81,-220.12,-234.03,-248.55,-263.7],[20.95,18.6,16.45,14.49,12.69,11.06,9.56,8.19,6.94,5.78,4.71,3.72,2.78,1.88,1.01,0.15,-0.7,-1.57,-2.47,-3.41,-4.41,-5.48,-6.63,-7.89,-9.26,-10.75,-12.39,-14.18,-16.15,-18.3,-20.65,-23.21,-26.0,-29.03,-32.32,-35.88,-39.72,-43.86,-48.32,-53.1,-58.22,-63.7,-69.54,-75.78,-82.41,-89.45,-96.92,-104.83,-113.19,-122.03,-131.34,-141.16,-151.49,-162.34,-173.74,-185.69,-198.2,-211.3,-225.0,-239.31,-254.25],[17.66,15.53,13.59,11.84,10.26,8.83,7.55,6.4,5.36,4.42,3.56,2.78,2.05,1.36,0.71,0.06,-0.58,-1.23,-1.92,-2.65,-3.43,-4.29,-5.23,-6.27,-7.42,-8.71,-10.13,-11.71,-13.46,-15.4,-17.54,-19.89,-22.46,-25.28,-28.35,-31.7,-35.33,-39.26,-43.5,-48.06,-52.97,-58.24,-63.87,-69.89,-76.31,-83.14,-90.39,-98.09,-106.24,-114.86,-123.97,-133.57,-143.68,-154.32,-165.5,-177.24,-189.54,-202.43,-215.92,-230.01,-244.74],[14.42,12.5,10.77,9.23,7.87,6.66,5.59,4.65,3.82,3.09,2.45,1.88,1.36,0.89,0.45,0.02,-0.41,-0.85,-1.33,-1.84,-2.41,-3.05,-3.78,-4.61,-5.55,-6.62,-7.83,-9.2,-10.74,-12.46,-14.38,-16.52,-18.88,-21.49,-24.35,-27.48,-30.89,-34.61,-38.63,-42.99,-47.68,-52.74,-58.16,-63.96,-70.17,-76.78,-83.82,-91.31,-99.25,-107.65,-116.54,-125.93,-135.83,-146.26,-157.23,-168.75,-180.84,-193.52,-206.79,-220.67,-235.18],[11.2,9.49,7.98,6.66,5.5,4.51,3.65,2.92,2.31,1.79,1.37,1.01,0.71,0.45,0.22,0.0,-0.21,-0.44,-0.7,-1.0,-1.36,-1.79,-2.3,-2.92,-3.65,-4.5,-5.5,-6.65,-7.98,-9.49,-11.2,-13.12,-15.27,-17.66,-20.31,-23.23,-26.43,-29.93,-33.74,-37.89,-42.37,-47.21,-52.41,-58.01,-64.0,-70.4,-77.23,-84.5,-92.22,-100.42,-109.09,-118.27,-127.96,-138.17,-148.93,-160.23,-172.11,-184.57,-197.63,-211.3,-225.6],[8.0,6.5,5.21,4.1,3.15,2.37,1.73,1.21,0.81,0.51,0.3,0.15,0.06,0.02,0.0,0.0,-0.0,-0.02,-0.06,-0.15,-0.3,-0.51,-0.81,-1.21,-1.73,-2.37,-3.15,-4.1,-5.21,-6.5,-8.0,-9.71,-11.65,-13.82,-16.26,-18.96,-21.95,-25.24,-28.84,-32.77,-37.04,-41.66,-46.66,-52.03,-57.81,-64.0,-70.62,-77.67,-85.18,-93.17,-101.63,-110.59,-120.07,-130.07,-140.61,-151.7,-163.37,-175.62,-188.46,-201.92,-216.0],[4.8,3.52,2.43,1.53,0.81,0.23,-0.19,-0.5,-0.68,-0.77,-0.77,-0.7,-0.58,-0.41,-0.21,-0.0,0.21,0.41,0.57,0.7,0.77,0.77,0.68,0.49,0.19,-0.24,-0.81,-1.54,-2.44,-3.52,-4.8,-6.3,-8.02,-9.99,-12.21,-14.7,-17.47,-20.55,-23.94,-27.65,-31.71,-36.12,-40.9,-46.06,-51.63,-57.6,-64.0,-70.85,-78.15,-85.91,-94.17,-102.91,-112.18,-121.96,-132.29,-143.17,-154.62,-166.66,-179.29,-192.53,-206.4],[1.58,0.51,-0.36,-1.04,-1.56,-1.92,-2.13,-2.22,-2.19,-2.07,-1.86,-1.57,-1.23,-0.85,-0.44,-0.02,0.41,0.82,1.2,1.54,1.82,2.03,2.15,2.18,2.09,1.88,1.52,1.01,0.32,-0.55,-1.62,-2.9,-4.41,-6.16,-8.17,-10.45,-13.01,-15.87,-19.05,-22.55,-26.39,-30.59,-35.15,-40.11,-45.46,-51.22,-57.41,-64.04,-71.12,-78.68,-86.72,-95.25,-104.3,-113.87,-123.99,-134.66,-145.89,-157.71,-170.13,-183.16,-196.82],[-1.66,-2.52,-3.18,-3.65,-3.95,-4.09,-4.1,-3.97,-3.73,-3.39,-2.97,-2.47,-1.92,-1.33,-0.7,-0.06,0.57,1.2,1.79,2.34,2.84,3.26,3.6,3.84,3.97,3.97,3.82,3.52,3.05,2.39,1.54,0.47,-0.83,-2.37,-4.16,-6.23,-8.58,-11.22,-14.18,-17.47,-21.1,-25.09,-29.44,-34.18,-39.31,-44.86,-50.84,-57.26,-64.13,-71.47,-79.29,-87.62,-96.45,-105.81,-115.71,-126.17,-137.19,-148.8,-161.01,-173.82,-187.26],[-4.95,-5.59,-6.04,-6.3,-6.38,-6.31,-6.1,-5.76,-5.31,-4.76,-4.12,-3.41,-2.65,-1.84,-1.0,-0.15,0.7,1.54,2.34,3.11,3.82,4.46,5.01,5.46,5.8,6.01,6.08,5.99,5.73,5.29,4.65,3.79,2.71,1.38,-0.2,-2.05,-4.18,-6.62,-9.37,-12.44,-15.86,-19.63,-23.77,-28.29,-33.22,-38.55,-44.31,-50.52,-57.18,-64.3,-71.91,-80.02,-88.64,-97.79,-107.48,-117.72,-128.53,-139.93,-151.92,-164.52,-177.75],[-8.3,-8.73,-8.96,-9.0,-8.87,-8.59,-8.17,-7.62,-6.95,-6.18,-5.33,-4.41,-3.43,-2.41,-1.36,-0.3,0.77,1.82,2.84,3.82,4.74,5.59,6.36,7.02,7.58,8.0,8.28,8.41,8.36,8.13,7.7,7.06,6.19,5.08,3.71,2.07,0.15,-2.07,-4.6,-7.46,-10.67,-14.22,-18.15,-22.46,-27.17,-32.3,-37.85,-43.84,-50.28,-57.19,-64.59,-72.49,-80.9,-89.83,-99.3,-109.33,-119.93,-131.11,-142.89,-155.28,-168.3],[-11.71,-11.93,-11.94,-11.78,-11.44,-10.94,-10.3,-9.54,-8.66,-7.68,-6.62,-5.48,-4.29,-3.05,-1.79,-0.51,0.77,2.03,3.26,4.46,5.59,6.66,7.63,8.51,9.28,9.92,10.41,10.75,10.92,10.9,10.69,10.26,9.6,8.7,7.55,6.13,4.42,2.41,0.09,-2.56,-5.55,-8.89,-12.61,-16.71,-21.2,-26.11,-31.45,-37.22,-43.46,-50.16,-57.34,-65.02,-73.22,-81.94,-91.2,-101.02,-111.4,-122.37,-133.93,-146.11,-158.91],[-15.21,-15.22,-15.02,-14.64,-14.08,-13.38,-12.53,-11.55,-10.45,-9.26,-7.98,-6.63,-5.23,-3.78,-2.3,-0.81,0.68,2.15,3.6,5.01,6.36,7.63,8.83,9.92,10.9,11.75,12.46,13.01,13.39,13.59,13.59,13.37,12.93,12.24,11.3,10.09,8.59,6.8,4.69,2.26,-0.52,-3.65,-7.15,-11.03,-15.32,-20.01,-25.14,-30.7,-36.72,-43.2,-50.18,-57.65,-65.63,-74.13,-83.18,-92.78,-102.95,-113.71,-125.06,-137.02,-149.61],[-18.81,-18.6,-18.19,-17.6,-16.83,-15.91,-14.85,-13.65,-12.35,-10.94,-9.45,-7.89,-6.27,-4.61,-2.92,-1.21,0.49,2.18,3.84,5.46,7.02,8.51,9.92,11.23,12.42,13.48,14.4,15.17,15.77,16.18,16.39,16.38,16.15,15.68,14.95,13.96,12.67,11.09,9.2,6.98,4.42,1.5,-1.79,-5.46,-9.53,-14.01,-18.92,-24.27,-30.08,-36.35,-43.11,-50.37,-58.13,-66.43,-75.26,-84.65,-94.61,-105.15,-116.29,-128.04,-140.41],[-22.53,-22.1,-21.48,-20.67,-19.69,-18.56,-17.28,-15.87,-14.35,-12.74,-11.03,-9.26,-7.42,-5.55,-3.65,-1.73,0.19,2.09,3.97,5.8,7.58,9.28,10.9,12.42,13.82,15.1,16.24,17.22,18.02,18.65,19.07,19.28,19.27,19.01,18.49,17.71,16.64,15.27,13.59,11.58,9.23,6.53,3.46,-0.0,-3.86,-8.13,-12.82,-17.96,-23.55,-29.61,-36.16,-43.2,-50.75,-58.83,-67.46,-76.63,-86.38,-96.7,-107.63,-119.17,-131.33],[-26.37,-25.73,-24.9,-23.87,-22.68,-21.33,-19.84,-18.22,-16.49,-14.66,-12.74,-10.75,-8.71,-6.62,-4.5,-2.37,-0.24,1.88,3.97,6.01,8.0,9.92,11.75,13.48,15.1,16.59,17.94,19.13,20.16,20.99,21.63,22.05,22.25,22.21,21.9,21.33,20.48,19.32,17.86,16.06,13.93,11.43,8.57,5.33,1.69,-2.37,-6.85,-11.78,-17.15,-23.0,-29.33,-36.16,-43.5,-51.37,-59.78,-68.74,-78.27,-88.39,-99.1,-110.42,-122.37],[-30.35,-29.5,-28.45,-27.22,-25.81,-24.25,-22.55,-20.71,-18.77,-16.72,-14.59,-12.39,-10.13,-7.83,-5.5,-3.15,-0.81,1.52,3.82,6.08,8.28,10.41,12.46,14.4,16.24,17.94,19.5,20.91,22.14,23.19,24.05,24.68,25.09,25.26,25.17,24.82,24.17,23.23,21.98,20.4,18.47,16.2,13.55,10.52,7.09,3.25,-1.02,-5.73,-10.9,-16.53,-22.65,-29.27,-36.39,-44.05,-52.24,-60.99,-70.31,-80.21,-90.71,-101.82,-113.55],[-34.5,-33.43,-32.17,-30.72,-29.1,-27.33,-25.41,-23.36,-21.2,-18.94,-16.6,-14.18,-11.71,-9.2,-6.65,-4.1,-1.54,1.01,3.52,5.99,8.41,10.75,13.01,15.17,17.22,19.13,20.91,22.53,23.98,25.24,26.3,27.15,27.78,28.16,28.29,28.14,27.71,26.98,25.94,24.58,22.87,20.8,18.37,15.55,12.33,8.7,4.65,0.15,-4.8,-10.22,-16.13,-22.53,-29.44,-36.88,-44.86,-53.4,-62.5,-72.19,-82.48,-93.37,-104.9],[-38.81,-37.53,-36.05,-34.39,-32.56,-30.57,-28.44,-26.18,-23.81,-21.34,-18.78,-16.15,-13.46,-10.74,-7.98,-5.21,-2.44,0.32,3.05,5.73,8.36,10.92,13.39,15.77,18.02,20.16,22.14,23.98,25.64,27.11,28.39,29.46,30.29,30.89,31.23,31.3,31.08,30.57,29.74,28.58,27.09,25.24,23.02,20.41,17.41,13.99,10.15,5.87,1.13,-4.08,-9.77,-15.96,-22.66,-29.89,-37.66,-45.98,-54.87,-64.34,-74.42,-85.1,-96.41],[-43.3,-41.81,-40.12,-38.25,-36.2,-34.0,-31.66,-29.18,-26.6,-23.91,-21.14,-18.3,-15.4,-12.46,-9.49,-6.5,-3.52,-0.55,2.39,5.29,8.13,10.9,13.59,16.18,18.65,20.99,23.19,25.24,27.11,28.8,30.3,31.57,32.62,33.43,33.98,34.27,34.26,33.96,33.35,32.41,31.13,29.49,27.48,25.09,22.3,19.1,15.47,11.4,6.87,1.88,-3.6,-9.58,-16.06,-23.08,-30.63,-38.74,-47.42,-56.68,-66.54,-77.01,-88.1],[-48.0,-46.3,-44.39,-42.3,-40.05,-37.63,-35.07,-32.39,-29.59,-26.69,-23.7,-20.65,-17.54,-14.38,-11.2,-8.0,-4.8,-1.62,1.54,4.65,7.7,10.69,13.59,16.39,19.07,21.63,24.05,26.3,28.39,30.3,32.0,33.49,34.75,35.78,36.54,37.04,37.25,37.16,36.76,36.03,34.96,33.54,31.74,29.57,26.99,24.0,20.58,16.73,12.42,7.63,2.37,-3.39,-9.67,-16.47,-23.81,-31.7,-40.17,-49.22,-58.86,-69.12,-80.0],[-52.91,-50.99,-48.87,-46.57,-44.1,-41.47,-38.7,-35.8,-32.79,-29.68,-26.48,-23.21,-19.89,-16.52,-13.12,-9.71,-6.3,-2.9,0.47,3.79,7.06,10.26,13.37,16.38,19.28,22.05,24.68,27.15,29.46,31.57,33.49,35.2,36.67,37.91,38.89,39.59,40.02,40.14,39.96,39.44,38.59,37.38,35.79,33.83,31.47,28.69,25.49,21.85,17.75,13.18,8.13,2.58,-3.48,-10.07,-17.2,-24.88,-33.13,-41.97,-51.4,-61.44,-72.11],[-58.05,-55.91,-53.58,-51.07,-48.38,-45.54,-42.56,-39.45,-36.22,-32.89,-29.48,-26.0,-22.46,-18.88,-15.27,-11.65,-8.02,-4.41,-0.83,2.71,6.19,9.6,12.93,16.15,19.27,22.25,25.09,27.78,30.29,32.62,34.75,36.67,38.36,39.81,41.0,41.92,42.56,42.9,42.93,42.63,41.98,40.99,39.62,37.87,35.72,33.15,30.17,26.74,22.85,18.5,13.66,8.32,2.47,-3.9,-10.81,-18.28,-26.32,-34.94,-44.16,-53.99,-64.45],[-63.42,-61.08,-58.54,-55.81,-52.91,-49.85,-46.66,-43.33,-39.89,-36.35,-32.73,-29.03,-25.28,-21.49,-17.66,-13.82,-9.99,-6.16,-2.37,1.38,5.08,8.7,12.24,15.68,19.01,22.21,25.26,28.16,30.89,33.43,35.78,37.91,39.81,41.47,42.88,44.01,44.86,45.42,45.66,45.57,45.14,44.35,43.2,41.66,39.73,37.38,34.6,31.38,27.71,23.57,18.95,13.82,8.19,2.03,-4.67,-11.93,-19.75,-28.16,-37.17,-46.78,-57.02],[-69.06,-66.5,-63.74,-60.8,-57.69,-54.42,-51.01,-47.47,-43.82,-40.07,-36.23,-32.32,-28.35,-24.35,-20.31,-16.26,-12.21,-8.17,-4.16,-0.2,3.71,7.55,11.3,14.95,18.49,21.9,25.17,28.29,31.23,33.98,36.54,38.89,41.0,42.88,44.5,45.85,46.91,47.68,48.13,48.25,48.04,47.47,46.53,45.2,43.48,41.34,38.78,35.78,32.32,28.39,23.98,19.07,13.65,7.7,1.21,-5.83,-13.44,-21.63,-30.43,-39.83,-49.86],[-74.96,-72.19,-69.22,-66.07,-62.74,-59.26,-55.63,-51.88,-48.02,-44.05,-40.0,-35.88,-31.7,-27.48,-23.23,-18.96,-14.7,-10.45,-6.23,-2.05,2.07,6.13,10.09,13.96,17.71,21.33,24.82,28.14,31.3,34.27,37.04,39.59,41.92,44.01,45.85,47.41,48.69,49.66,50.33,50.67,50.67,50.31,49.58,48.47,46.96,45.04,42.69,39.9,36.65,32.94,28.74,24.05,18.84,13.1,6.83,0.0,-7.4,-15.38,-23.96,-33.15,-42.96],[-81.15,-78.17,-74.98,-71.62,-68.08,-64.38,-60.54,-56.58,-52.5,-48.32,-44.06,-39.72,-35.33,-30.89,-26.43,-21.95,-17.47,-13.01,-8.58,-4.18,0.15,4.42,8.59,12.67,16.64,20.48,24.17,27.71,31.08,34.26,37.25,40.02,42.56,44.86,46.91,48.69,50.18,51.37,52.25,52.8,53.01,52.87,52.35,51.45,50.16,48.45,46.31,43.74,40.7,37.2,33.22,28.74,23.74,18.22,12.16,5.54,-1.64,-9.41,-17.77,-26.75,-36.35],[-87.64,-84.44,-81.05,-77.46,-73.71,-69.8,-65.75,-61.57,-57.28,-52.89,-48.41,-43.86,-39.26,-34.61,-29.93,-25.24,-20.55,-15.87,-11.22,-6.62,-2.07,2.41,6.8,11.09,15.27,19.32,23.23,26.98,30.57,33.96,37.16,40.14,42.9,45.42,47.68,49.66,51.37,52.77,53.87,54.63,55.06,55.13,54.82,54.14,53.06,51.56,49.64,47.27,44.46,41.17,37.4,33.13,28.35,23.04,17.19,10.79,3.82,-3.74,-11.89,-20.65,-30.04],[-94.44,-91.03,-87.42,-83.62,-79.66,-75.54,-71.27,-66.88,-62.37,-57.77,-53.08,-48.32,-43.5,-38.63,-33.74,-28.84,-23.94,-19.05,-14.18,-9.37,-4.6,0.09,4.69,9.2,13.59,17.86,21.98,25.94,29.74,33.35,36.76,39.96,42.93,45.66,48.13,50.33,52.25,53.87,55.17,56.15,56.79,57.07,56.98,56.51,55.64,54.36,52.65,50.5,47.9,44.82,41.26,37.21,32.64,27.55,21.91,15.72,8.96,1.62,-6.31,-14.86,-24.04],[-101.57,-97.94,-94.12,-90.11,-85.93,-81.6,-77.12,-72.51,-67.79,-62.98,-58.07,-53.1,-48.06,-42.99,-37.89,-32.77,-27.65,-22.55,-17.47,-12.44,-7.46,-2.56,2.26,6.98,11.58,16.06,20.4,24.58,28.58,32.41,36.03,39.44,42.63,45.57,48.25,50.67,52.8,54.63,56.15,57.34,58.19,58.69,58.82,58.56,57.9,56.83,55.34,53.4,51.01,48.15,44.8,40.96,36.61,31.73,26.3,20.33,13.78,6.66,-1.07,-9.41,-18.37],[-109.04,-105.2,-101.16,-96.94,-92.55,-88.0,-83.31,-78.49,-73.56,-68.53,-63.41,-58.22,-52.97,-47.68,-42.37,-37.04,-31.71,-26.39,-21.1,-15.86,-10.67,-5.55,-0.52,4.42,9.23,13.93,18.47,22.87,27.09,31.13,34.96,38.59,41.98,45.14,48.04,50.67,53.01,55.06,56.79,58.19,59.26,59.97,60.31,60.26,59.82,58.96,57.68,55.96,53.78,51.13,48.0,44.37,40.23,35.56,30.35,24.59,18.26,11.35,3.84,-4.29,-13.04],[-116.86,-112.81,-108.56,-104.13,-99.52,-94.76,-89.85,-84.82,-79.68,-74.43,-69.1,-63.7,-58.24,-52.74,-47.21,-41.66,-36.12,-30.59,-25.09,-19.63,-14.22,-8.89,-3.65,1.5,6.53,11.43,16.2,20.8,25.24,29.49,33.54,37.38,40.99,44.35,47.47,50.31,52.87,55.13,57.07,58.69,59.97,60.89,61.44,61.61,61.38,60.74,59.67,58.16,56.19,53.76,50.84,47.43,43.5,39.04,34.05,28.5,22.38,15.68,8.38,0.47,-8.06],[-125.06,-120.79,-116.33,-111.68,-106.86,-101.89,-96.77,-91.52,-86.16,-80.7,-75.16,-69.54,-63.87,-58.16,-52.41,-46.66,-40.9,-35.15,-29.44,-23.77,-18.15,-12.61,-7.15,-1.79,3.46,8.57,13.55,18.37,23.02,27.48,31.74,35.79,39.62,43.2,46.53,49.58,52.35,54.82,56.98,58.82,60.31,61.44,62.21,62.59,62.57,62.14,61.29,59.99,58.24,56.02,53.31,50.11,46.4,42.16,37.38,32.04,26.14,19.65,12.56,4.87,-3.46],[-133.63,-129.16,-124.48,-119.62,-114.59,-109.4,-104.07,-98.61,-93.03,-87.36,-81.6,-75.78,-69.89,-63.96,-58.01,-52.03,-46.06,-40.11,-34.18,-28.29,-22.46,-16.71,-11.03,-5.46,-0.0,5.33,10.52,15.55,20.41,25.09,29.57,33.83,37.87,41.66,45.2,48.47,51.45,54.14,56.51,58.56,60.26,61.61,62.59,63.18,63.38,63.17,62.52,61.44,59.9,57.89,55.4,52.41,48.91,44.89,40.32,35.2,29.5,23.23,16.36,8.87,0.77],[-142.61,-137.92,-133.03,-127.95,-122.71,-117.31,-111.76,-106.09,-100.3,-94.42,-88.45,-82.41,-76.31,-70.17,-64.0,-57.81,-51.63,-45.46,-39.31,-33.22,-27.17,-21.2,-15.32,-9.53,-3.86,1.69,7.09,12.33,17.41,22.3,26.99,31.47,35.72,39.73,43.48,46.96,50.16,53.06,55.64,57.9,59.82,61.38,62.57,63.38,63.79,63.79,63.36,62.49,61.17,59.37,57.09,54.32,51.03,47.22,42.86,37.95,32.47,26.41,19.75,12.48,4.59],[-152.0,-147.1,-141.99,-136.7,-131.25,-125.63,-119.87,-113.99,-107.99,-101.89,-95.7,-89.45,-83.14,-76.78,-70.4,-64.0,-57.6,-51.22,-44.86,-38.55,-32.3,-26.11,-20.01,-14.01,-8.13,-2.37,3.25,8.7,13.99,19.1,24.0,28.69,33.15,37.38,41.34,45.04,48.45,51.56,54.36,56.83,58.96,60.74,62.14,63.17,63.79,64.0,63.78,63.13,62.02,60.43,58.37,55.81,52.73,49.13,44.99,40.3,35.03,29.18,22.74,15.68,8.0],[-161.82,-156.7,-151.38,-145.88,-140.21,-134.38,-128.41,-122.31,-116.1,-109.78,-103.39,-96.92,-90.39,-83.82,-77.23,-70.62,-64.0,-57.41,-50.84,-44.31,-37.85,-31.45,-25.14,-18.92,-12.82,-6.85,-1.02,4.65,10.15,15.47,20.58,25.49,30.17,34.6,38.78,42.69,46.31,49.64,52.65,55.34,57.68,59.67,61.29,62.52,63.36,63.78,63.78,63.34,62.44,61.07,59.22,56.87,54.01,50.62,46.7,42.21,37.16,31.53,25.3,18.45,10.98],[-172.07,-166.74,-161.21,-155.5,-149.61,-143.57,-137.38,-131.07,-124.65,-118.12,-111.51,-104.83,-98.09,-91.31,-84.5,-77.67,-70.85,-64.04,-57.26,-50.52,-43.84,-37.22,-30.7,-24.27,-17.96,-11.78,-5.73,0.15,5.87,11.4,16.73,21.85,26.74,31.38,35.78,39.9,43.74,47.27,50.5,53.4,55.96,58.16,59.99,61.44,62.49,63.13,63.34,63.11,62.42,61.27,59.63,57.5,54.85,51.67,47.96,43.69,38.85,33.43,27.41,20.78,13.53],[-182.78,-177.24,-171.5,-165.57,-159.47,-153.21,-146.82,-140.29,-133.65,-126.91,-120.09,-113.19,-106.24,-99.25,-92.22,-85.18,-78.15,-71.12,-64.13,-57.18,-50.28,-43.46,-36.72,-30.08,-23.55,-17.15,-10.9,-4.8,1.13,6.87,12.42,17.75,22.85,27.71,32.32,36.65,40.7,44.46,47.9,51.01,53.78,56.19,58.24,59.9,61.17,62.02,62.44,62.42,61.95,61.01,59.59,57.66,55.23,52.27,48.77,44.71,40.09,34.88,29.07,22.66,15.62],[-193.97,-188.21,-182.25,-176.11,-169.8,-163.33,-156.72,-149.98,-143.13,-136.17,-129.14,-122.03,-114.86,-107.65,-100.42,-93.17,-85.91,-78.68,-71.47,-64.3,-57.19,-50.16,-43.2,-36.35,-29.61,-23.0,-16.53,-10.22,-4.08,1.88,7.63,13.18,18.5,23.57,28.39,32.94,37.2,41.17,44.82,48.15,51.13,53.76,56.02,57.89,59.37,60.43,61.07,61.27,61.01,60.28,59.07,57.36,55.14,52.39,49.11,45.26,40.85,35.86,30.27,24.06,17.23],[-205.63,-199.66,-193.49,-187.13,-180.61,-173.93,-167.1,-160.15,-153.08,-145.92,-138.67,-131.34,-123.97,-116.54,-109.09,-101.63,-94.17,-86.72,-79.29,-71.91,-64.59,-57.34,-50.18,-43.11,-36.16,-29.33,-22.65,-16.13,-9.77,-3.6,2.37,8.13,13.66,18.95,23.98,28.74,33.22,37.4,41.26,44.8,48.0,50.84,53.31,55.4,57.09,58.37,59.22,59.63,59.59,59.07,58.07,56.58,54.57,52.04,48.96,45.33,41.14,36.35,30.98,24.99,18.37],[-217.79,-211.61,-205.22,-198.66,-191.92,-185.02,-177.98,-170.82,-163.54,-156.16,-148.7,-141.16,-133.57,-125.93,-118.27,-110.59,-102.91,-95.25,-87.62,-80.02,-72.49,-65.02,-57.65,-50.37,-43.2,-36.16,-29.27,-22.53,-15.96,-9.58,-3.39,2.58,8.32,13.82,19.07,24.05,28.74,33.13,37.21,40.96,44.37,47.43,50.11,52.41,54.32,55.81,56.87,57.5,57.66,57.36,56.58,55.3,53.5,51.18,48.32,44.9,40.92,36.35,31.19,25.41,19.01],[-230.47,-224.07,-217.47,-210.69,-203.74,-196.63,-189.38,-182.0,-174.51,-166.91,-159.24,-151.49,-143.68,-135.83,-127.96,-120.07,-112.18,-104.3,-96.45,-88.64,-80.9,-73.22,-65.63,-58.13,-50.75,-43.5,-36.39,-29.44,-22.66,-16.06,-9.67,-3.48,2.47,8.19,13.65,18.84,23.74,28.35,32.64,36.61,40.23,43.5,46.4,48.91,51.03,52.73,54.01,54.85,55.23,55.14,54.57,53.5,51.92,49.81,47.17,43.96,40.19,35.84,30.89,25.32,19.13],[-243.67,-237.06,-230.25,-223.25,-216.09,-208.76,-201.3,-193.71,-186.0,-178.19,-170.3,-162.34,-154.32,-146.26,-138.17,-130.07,-121.96,-113.87,-105.81,-97.79,-89.83,-81.94,-74.13,-66.43,-58.83,-51.37,-44.05,-36.88,-29.89,-23.08,-16.47,-10.07,-3.9,2.03,7.7,13.1,18.22,23.04,27.55,31.73,35.56,39.04,42.16,44.89,47.22,49.13,50.62,51.67,52.27,52.39,52.04,51.18,49.81,47.92,45.49,42.5,38.94,34.8,30.06,24.71,18.73],[-257.41,-250.58,-243.56,-236.35,-228.97,-221.44,-213.76,-205.95,-198.03,-190.02,-181.91,-173.74,-165.5,-157.23,-148.93,-140.61,-132.29,-123.99,-115.71,-107.48,-99.3,-91.2,-83.18,-75.26,-67.46,-59.78,-52.24,-44.86,-37.66,-30.63,-23.81,-17.2,-10.81,-4.67,1.21,6.83,12.16,17.19,21.91,26.3,30.35,34.05,37.38,40.32,42.86,44.99,46.7,47.96,48.77,49.11,48.96,48.32,47.17,45.49,43.26,40.49,37.14,33.22,28.69,23.55,17.79],[-271.7,-264.67,-257.43,-250.01,-242.42,-234.67,-226.78,-218.76,-210.62,-202.39,-194.07,-185.69,-177.24,-168.75,-160.23,-151.7,-143.17,-134.66,-126.17,-117.72,-109.33,-101.02,-92.78,-84.65,-76.63,-68.74,-60.99,-53.4,-45.98,-38.74,-31.7,-24.88,-18.28,-11.93,-5.83,0.0,5.54,10.79,15.72,20.33,24.59,28.5,32.04,35.2,37.95,40.3,42.21,43.69,44.71,45.26,45.33,44.9,43.96,42.5,40.49,37.93,34.79,31.08,26.77,21.85,16.3],[-286.57,-279.32,-271.87,-264.23,-256.43,-248.46,-240.36,-232.13,-223.78,-215.34,-206.81,-198.2,-189.54,-180.84,-172.11,-163.37,-154.62,-145.89,-137.19,-128.53,-119.93,-111.4,-102.95,-94.61,-86.38,-78.27,-70.31,-62.5,-54.87,-47.42,-40.17,-33.13,-26.32,-19.75,-13.44,-7.4,-1.64,3.82,8.96,13.78,18.26,22.38,26.14,29.5,32.47,35.03,37.16,38.85,40.09,40.85,41.14,40.92,40.19,38.94,37.14,34.79,31.88,28.38,24.28,19.57,14.23],[-302.02,-294.55,-286.89,-279.04,-271.02,-262.85,-254.53,-246.08,-237.52,-228.86,-220.12,-211.3,-202.43,-193.52,-184.57,-175.62,-166.66,-157.71,-148.8,-139.93,-131.11,-122.37,-113.71,-105.15,-96.7,-88.39,-80.21,-72.19,-64.34,-56.68,-49.22,-41.97,-34.94,-28.16,-21.63,-15.38,-9.41,-3.74,1.62,6.66,11.35,15.68,19.65,23.23,26.41,29.18,31.53,33.43,34.88,35.86,36.35,36.35,35.84,34.8,33.22,31.08,28.38,25.09,21.2,16.71,11.58],[-318.06,-310.38,-302.51,-294.45,-286.21,-277.82,-269.29,-260.63,-251.86,-242.99,-234.03,-225.0,-215.92,-206.79,-197.63,-188.46,-179.29,-170.13,-161.01,-151.92,-142.89,-133.93,-125.06,-116.29,-107.63,-99.1,-90.71,-82.48,-74.42,-66.54,-58.86,-51.4,-44.16,-37.17,-30.43,-23.96,-17.77,-11.89,-6.31,-1.07,3.84,8.38,12.56,16.36,19.75,22.74,25.3,27.41,29.07,30.27,30.98,31.19,30.89,30.06,28.69,26.77,24.28,21.2,17.53,13.25,8.34],[-334.72,-326.83,-318.74,-310.46,-302.02,-293.41,-284.67,-275.8,-266.81,-257.73,-248.55,-239.31,-230.01,-220.67,-211.3,-201.92,-192.53,-183.16,-173.82,-164.52,-155.28,-146.11,-137.02,-128.04,-119.17,-110.42,-101.82,-93.37,-85.1,-77.01,-69.12,-61.44,-53.99,-46.78,-39.83,-33.15,-26.75,-20.65,-14.86,-9.41,-4.29,0.47,4.87,8.87,12.48,15.68,18.45,20.78,22.66,24.06,24.99,25.41,25.32,24.71,23.55,21.85,19.57,16.71,13.25,9.18,4.48],[-352.0,-343.9,-335.59,-327.1,-318.45,-309.63,-300.67,-291.59,-282.39,-273.09,-263.7,-254.25,-244.74,-235.18,-225.6,-216.0,-206.4,-196.82,-187.26,-177.75,-168.3,-158.91,-149.61,-140.41,-131.33,-122.37,-113.55,-104.9,-96.41,-88.1,-80.0,-72.11,-64.45,-57.02,-49.86,-42.96,-36.35,-30.04,-24.04,-18.37,-13.04,-8.06,-3.46,0.77,4.59,8.0,10.98,13.53,15.62,17.23,18.37,19.01,19.13,18.73,17.79,16.3,14.23,11.58,8.34,4.48,0.0]],"colorscale":"RdBu","reversescale":true,"contours":{"start":-60,"end":64,"size":8},"colorbar":{"title":{"text":"f"}}},{"type":"scatter","x":[3.0,3.66,3.869,3.938,3.964,3.976,3.982,3.987,3.99,3.992,3.994,3.996,3.997,3.997,3.998,3.999],"y":[5.0,4.22,4.03,3.984,3.977,3.979,3.983,3.987,3.99,3.992,3.994,3.996,3.997,3.997,3.998,3.999],"mode":"lines+markers","line":{"color":"black"},"marker":{"size":5},"name":"gradient ascent from (3,5)"},{"type":"scatter","x":[4,0],"y":[4,0],"mode":"markers+text","text":["max (4,4): \u03bb=\u221236,\u221212","saddle (0,0): \u03bb=\u00b112"],"textposition":["bottom right","bottom right"],"marker":{"size":12,"symbol":["star","x"],"color":"gold","line":{"color":"black","width":1}},"name":"critical points"}],"layout":{"title":{"text":"f = 12xy \u2212 x\u00b3 \u2212 y\u00b3: a peak and a saddle"},"xaxis":{"title":{"text":"x"},"constrain":"domain"},"yaxis":{"title":{"text":"y"},"scaleanchor":"x","constrain":"domain"},"height":580,"legend":{"orientation":"h","y":-0.15}}}

9. Why the test works: the 2-D second-derivative test

For two variables the Hessian is

\[H=\begin{bmatrix}f_{xx}&f_{xy}\\f_{yx}&f_{yy}\end{bmatrix},\qquad f_{xy}=f_{yx}\ \text{(symmetric)},\qquad D=\det H=f_{xx}f_{yy}-f_{xy}^2 .\]

The gradient is the slope; the Hessian is the curvature (bendiness) — how the slope itself changes as we move in different directions.

Step 1: Taylor expand around the critical point. Let $(a,b)$ be a critical point, so $f_x(a,b)=f_y(a,b)=0$, and take a small step $(h,k)$:

\[f(a+h,b+k)=f(a,b)+\underbrace{h f_x+k f_y}_{=0}+\tfrac12\left(f_{xx}h^2+2f_{xy}hk+f_{yy}k^2\right)+\dots\]

With all derivatives evaluated at $(a,b)$, the change is

\[\Delta f=f(a+h,b+k)-f(a,b)\approx\tfrac12\left(f_{xx}h^2+2f_{xy}hk+f_{yy}k^2\right).\]

$(a,b)$ is a minimum if $\Delta f>0$ for every small step, a maximum if $\Delta f<0$ for every step, and a saddle if the sign depends on the direction.

Step 2: complete the square. Assume $f_{xx}\ne0$ and multiply and divide by $f_{xx}$:

\[\Delta f\approx\frac{1}{2f_{xx}}\left[f_{xx}^2h^2+2f_{xx}f_{xy}hk+f_{xx}f_{yy}k^2\right] =\frac{1}{2f_{xx}}\Big[\underbrace{(f_{xx}h+f_{xy}k)^2}_{\ge0}+\underbrace{(f_{xx}f_{yy}-f_{xy}^2)}_{D}\,k^2\Big].\]

(Expand $(f_{xx}h+f_{xy}k)^2=f_{xx}^2h^2+2f_{xx}f_{xy}hk+f_{xy}^2k^2$; the leftover is exactly $D\,k^2$.) The squared term is never negative, and is zero only on the line $f_{xx}h+f_{xy}k=0$. So the sign of $\Delta f$ is controlled by $f_{xx}$ and $D$.

Step 3: read off the cases.

Condition at $(a,b)$ Bracket $\Delta f$ Point
$D>0$, $f_{xx}>0$ sum of two non-negative terms, not both zero $>0$ in every direction local minimum (cup)
$D>0$, $f_{xx}<0$ positive, divided by negative $2f_{xx}$ $<0$ in every direction local maximum (peak)
$D<0$ $+(\cdot)^2$ and $-\lvert D\rvert k^2$ compete changes sign with direction saddle point
$D=0$ single perfect square $=0$ along one line inconclusive

Why the bracket can’t vanish when $D>0$: both terms are zero only if $k=0$ and then $f_{xx}h=0$, i.e. $h=0$ — no step at all.

Saddle ($D<0$), two test paths:

  • Move along $k=0$: the second term vanishes, $\Delta f=\tfrac12f_{xx}h^2$, which has the sign of $f_{xx}$.
  • Move along $f_{xx}h+f_{xy}k=0$: the first term vanishes, $\Delta f=Dk^2/(2f_{xx})$, which has the opposite sign of $f_{xx}$.

Since $\Delta f$ changes sign depending on the path, the point is neither a maximum nor a minimum.

Inconclusive ($D=0$): $\Delta f\approx(f_{xx}h+f_{xy}k)^2/(2f_{xx})$ is a single perfect square, which is zero along the line $f_{xx}h+f_{xy}k=0$. Along that line the second-order change vanishes, so third- or fourth-order terms decide. All of these have $D=0$ at the origin but behave differently:

$f(x,y)$ Origin is
$x^4+y^4$ minimum
$-(x^4+y^4)$ maximum
$x^4-y^4$ saddle
$x^2+y^3$ neither (saddle-like: $f<0$ for small $y<0$)

Why test $f_{xx}$ and not $f_{yy}$? Either works. At an extremum $D>0$, so $f_{xx}f_{yy}>f_{xy}^2\ge0$, which forces $f_{xx}$ and $f_{yy}$ to have the same sign. Checking either one gives the same conclusion. (If $f_{xx}=0$ then $D=-f_{xy}^2\le0$, so the point is a saddle when $f_{xy}\ne0$; otherwise complete the square in $k$ using $f_{yy}$ instead.)

Link to eigenvalues and LU. Completing the square is exactly Gaussian elimination (§4 of the decomposition post) applied to $H$: the pivots are $f_{xx}$ and $D/f_{xx}$, since

\[\Delta f\approx\tfrac12\left[f_{xx}\Big(h+\tfrac{f_{xy}}{f_{xx}}k\Big)^2+\frac{D}{f_{xx}}k^2\right].\]

For a symmetric matrix, the number of positive (and negative) pivots equals the number of positive (and negative) eigenvalues (Sylvester’s law of inertia). So “$f_{xx}>0$ and $D>0$” is the same statement as “both eigenvalues positive” (§8), checked without solving the characteristic equation. It is the $2\times2$ case of Sylvester’s criterion: a symmetric matrix is positive definite if all its leading principal minors ($f_{xx}$, then $\det H$) are positive.

10. Engineering example: maximum load-bearing capacity

The maximum load-bearing capacity $L$ (kN) of a machine foundation depends on two geometric features $x$ and $y$ (cm). Balancing weight against material strength gives the empirical expression

\[L(x,y)=12xy-x^3-y^3 .\]

Find the dimensions that maximize the load capacity.

Step 1 — Critical point.

\[\nabla L=\begin{bmatrix}12y-3x^2\\12x-3y^2\end{bmatrix}=\vec0 \;\Rightarrow\;4y=x^2,\quad 4x=y^2 .\]

Substituting $y=x^2/4$ into the second: $4x=x^4/16\Rightarrow x(x^3-64)=0$, so $x=0$ or $x=4$. The critical points are $(0,0)$ and $(4,4)$ cm. $(0,0)$ is a saddle (§8) and physically meaningless (no foundation), so the candidate is $(x,y)=(4,4)$ cm.

Step 2 — Second-derivative test.

\[H=\begin{bmatrix}-6x&12\\12&-6y\end{bmatrix}\;\xrightarrow{(4,4)}\;\begin{bmatrix}-24&12\\12&-24\end{bmatrix},\qquad D=(-24)(-24)-12^2=24^2-12^2=(24+12)(24-12)=432>0 .\]

$D>0$, so $(4,4)$ is a local minimum or maximum. $L_{xx}=-24<0$, so it is a maximum:

\[L_\text{max}=L(4,4)=12(16)-64-64=64\ \text{kN}.\]

(The eigenvalues $-36$ and $-12$ of §8 say the same thing.)

Is it the global maximum? In §8 we noted that on the whole plane it is not ($L(-10,0)=1000$). But dimensions must be non-negative, so only $x,y\ge0$ matters. There, $(4,4)$ is the only interior critical point; on the boundary $L=-x^3$ or $-y^3\le0$; and $L\to-\infty$ for large $x$ or $y$. So within the physical domain, 64 kN at $4\times4$ cm is the global maximum. Always check the domain and its boundary, not just $\nabla f=\vec0$.

Units: in an empirical fit like this the coefficients carry units (here 12 has units of kN/cm², and the cubic terms have an implicit 1 kN/cm³), which is why cm² and cm³ terms can be added to give kN.

11. Newton’s method: using the Hessian

Gradient descent uses only the linear (first-order) model. Newton’s method minimizes the quadratic model of §5 instead: setting the gradient of $f(\vec x_k)+\nabla f^T\Delta\vec x+\tfrac12\Delta\vec x^TH\Delta\vec x$ to zero gives

\[H(\vec x_k)\,\Delta\vec x=-\nabla f(\vec x_k),\qquad \vec x_{k+1}=\vec x_k+\Delta\vec x .\]

It picks the direction and the step size together, and near the optimum the number of correct digits roughly doubles each iteration. On the example above, from $(3,5)$ it reaches $(4,4)$ to six digits in 3 iterations, against about 50 for gradient ascent. The costs: forming and solving with the $n\times n$ Hessian (expensive for large $n$), and it heads for any critical point — including saddles — unless $H$ has the right definiteness. Quasi-Newton methods (e.g. BFGS) build an approximate Hessian from successive gradients, and are the usual compromise in engineering optimization.

12. The material derivative

So far $f$ depended on fixed coordinates. In a moving fluid we often care how a property $\phi$ (temperature, density, velocity) changes for a fluid particle as it travels. This rate is the material derivative, also called the substantial or total derivative, $D\phi/Dt$.

Two viewpoints.

  • Eulerian: stand on a bridge and watch the river through a fixed window $(x,y,z)$. The fields are $\phi(x,y,z,t)$, and $\partial\phi/\partial t$ is the local rate of change at that fixed point.
  • Lagrangian: ride a boat (a fluid particle) and record what you experience. The rate of change you feel is $D\phi/Dt$.

The material derivative converts between the two: it gives the Lagrangian rate using the Eulerian fields we actually measure or compute.

Derivation: it is just the chain rule. A particle’s position is $(x(t),y(t),z(t))$, moving with the flow velocity $\vec u=u\hat i+v\hat j+w\hat k$, so $dx/dt=u$, $dy/dt=v$, $dz/dt=w$. Then

\[\frac{D\phi}{Dt}=\frac{d}{dt}\phi\big(x(t),y(t),z(t),t\big) =\frac{\partial\phi}{\partial t}+\frac{\partial\phi}{\partial x}\frac{dx}{dt}+\frac{\partial\phi}{\partial y}\frac{dy}{dt}+\frac{\partial\phi}{\partial z}\frac{dz}{dt},\]

that is,

\[\underbrace{\frac{D\phi}{Dt}}_{\text{total}}=\underbrace{\frac{\partial\phi}{\partial t}}_{\text{local}}+\underbrace{u\frac{\partial\phi}{\partial x}+v\frac{\partial\phi}{\partial y}+w\frac{\partial\phi}{\partial z}}_{\text{convective}} =\frac{\partial\phi}{\partial t}+(\vec u\cdot\nabla)\phi .\]

Here $\vec u\cdot\nabla=u\,\partial/\partial x+v\,\partial/\partial y+w\,\partial/\partial z$ is a scalar operator. The convective term $(\vec u\cdot\nabla)\phi=\vec u\cdot\nabla\phi$ is the change due to the bulk motion carrying the particle to where $\phi$ is different. It is $\lvert\vec u\rvert$ times the directional derivative of §2 along the flow direction.

Term Nonzero when Example
Local the field changes in time at a fixed point (unsteady) the whole river warms up during the day
Convective the particle moves through a non-uniform field water flows from a shaded pool into a sunlit stretch

Example: steady flow through a nozzle. In a converging pipe (section A wide, section B narrow) with steady flow, $\partial\vec u/\partial t=\vec0$: at every fixed point the velocity never changes. Yet each particle speeds up from A to B, because it moves into a region of higher velocity. That acceleration is purely convective. Steady flow does not mean zero acceleration.

When $\phi$ is a vector: acceleration. Applying $D/Dt$ to each component of the velocity $\vec u=u\hat i+v\hat j+w\hat k$ gives the acceleration of a fluid particle, the $\vec a$ in Newton’s second law for fluids:

\[\vec a=\frac{D\vec u}{Dt}=\frac{\partial\vec u}{\partial t}+(\vec u\cdot\nabla)\vec u,\] \[\begin{aligned} a_x&=\frac{Du}{Dt}=\frac{\partial u}{\partial t}+u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}+w\frac{\partial u}{\partial z},\\ a_y&=\frac{Dv}{Dt}=\frac{\partial v}{\partial t}+u\frac{\partial v}{\partial x}+v\frac{\partial v}{\partial y}+w\frac{\partial v}{\partial z},\\ a_z&=\frac{Dw}{Dt}=\frac{\partial w}{\partial t}+u\frac{\partial w}{\partial x}+v\frac{\partial w}{\partial y}+w\frac{\partial w}{\partial z}. \end{aligned}\]

The convective part is the Jacobian of §4 acting on the velocity: $(\vec u\cdot\nabla)\vec u=J\vec u$ with $J_{ij}=\partial u_i/\partial x_j$. It is nonlinear in $\vec u$ (velocity times velocity gradient), which is the root of much of the difficulty of fluid mechanics, including turbulence.

Worked example. A 2-D, unsteady, incompressible flow has streamwise and cross-stream velocity

\[u(x,y,t)=\frac{Ax}{1+Bt},\qquad v(x,y,t)=\frac{-Ay}{1+Bt},\qquad A=2\ \text{s}^{-1},\quad B=0.5\ \text{s}^{-1}.\]

At $t=2$ s, find the local, convective and total acceleration, in general and at $(x,y)=(2,\ 1.5)$ m. Since the flow is 2-D, $w=0$ and $\partial/\partial z=0$, so the $w\,\partial/\partial z$ terms drop out.

Check incompressibility first: $\partial u/\partial x+\partial v/\partial y=\frac{A}{1+Bt}-\frac{A}{1+Bt}=0$ ✓. This is a stagnation-point flow (streamlines $xy=$ const, fluid arriving along $y$ and leaving along $x$) that weakens over time. We first get the fields in $x,y$, then evaluate at the point. At $t=2$ s, $1+Bt=2$, $A^2=4$ s⁻², $AB=1$ s⁻².

1. Local acceleration $\partial\vec u/\partial t$:

\[\frac{\partial u}{\partial t}=-\frac{ABx}{(1+Bt)^2}=-\frac{x}{4},\qquad \frac{\partial v}{\partial t}=+\frac{ABy}{(1+Bt)^2}=+\frac{y}{4}.\]

Negative in $x$ for $x>0$: at a fixed point the flow is slowing down as time passes.

2. Convective acceleration $(\vec u\cdot\nabla)\vec u$, using $\partial u/\partial x=A/(1+Bt)$, $\partial u/\partial y=0$, $\partial v/\partial x=0$, $\partial v/\partial y=-A/(1+Bt)$:

\[u\frac{\partial u}{\partial x}+v\frac{\partial u}{\partial y}=\frac{A^2x}{(1+Bt)^2}=x,\qquad u\frac{\partial v}{\partial x}+v\frac{\partial v}{\partial y}=\frac{A^2y}{(1+Bt)^2}=y .\]

Positive: particles speed up as they move away from the stagnation point along $x$, and the $y$-velocity (directed toward the axis) shrinks in magnitude as they approach it.

3. Total acceleration $D\vec u/Dt$ = local + convective:

\[a_x=\frac{A(A-B)\,x}{(1+Bt)^2}=0.75\,x,\qquad a_y=\frac{A(A+B)\,y}{(1+Bt)^2}=1.25\,y\qquad(\text{m/s}^2,\ x,y\ \text{in m}).\]

At the point $(x,y)=(2,\ 1.5)$ m, $t=2$ s:

Acceleration $x$-component $y$-component
Local $-\dfrac{2\times2\times0.5}{(1+0.5\times2)^2}=-\dfrac{2}{4}=-0.5$ $\dfrac{2\times1.5\times0.5}{(1+0.5\times2)^2}=0.375$
Convective $2\times\Big(\dfrac{2}{1+0.5\times2}\Big)^2=2$ $1.5\times\Big(\dfrac{2}{1+0.5\times2}\Big)^2=1.5$
Total $-0.5+2=1.5$ $0.375+1.5=1.875$
\[\vec a_\text{local}=(-0.5\,\hat i+0.375\,\hat j)\ \text{m/s}^2,\quad \vec a_\text{conv}=(2\,\hat i+1.5\,\hat j)\ \text{m/s}^2,\quad \vec a_\text{total}=(1.5\,\hat i+1.875\,\hat j)\ \text{m/s}^2,\]

with $\lvert\vec a_\text{total}\rvert=\sqrt{1.5^2+1.875^2}=2.40$ m/s². The general fields agree: $0.75\times2=1.5$ and $1.25\times1.5=1.875$. Here the convective part dominates — most of what the particle feels comes from moving through the non-uniform flow, not from the flow changing in time.

In the figure, the gray curves are streamlines ($xy=$ const). At $(2,1.5)$ the velocity points away from the stagnation point along the streamline; the local acceleration (blue) is small and points against the flow (the flow is weakening in time), while the convective part (orange) dominates, so the total (red) is close to it.

{"data":[{"type":"scatter","x":[-3.5,-3.457,-3.414,-3.372,-3.329,-3.286,-3.243,-3.201,-3.158,-3.115,-3.072,-3.029,-2.987,-2.944,-2.901,-2.858,-2.815,-2.773,-2.73,-2.687,-2.644,-2.602,-2.559,-2.516,-2.473,-2.43,-2.388,-2.345,-2.302,-2.259,-2.216,-2.174,-2.131,-2.088,-2.045,-2.003,-1.96,-1.917,-1.874,-1.831,-1.789,-1.746,-1.703,-1.66,-1.617,-1.575,-1.532,-1.489,-1.446,-1.404,-1.361,-1.318,-1.275,-1.232,-1.19,-1.147],"y":[1.143,1.157,1.171,1.186,1.202,1.217,1.233,1.25,1.267,1.284,1.302,1.32,1.339,1.359,1.379,1.399,1.421,1.443,1.465,1.489,1.513,1.538,1.563,1.59,1.617,1.646,1.675,1.706,1.738,1.771,1.805,1.84,1.877,1.916,1.956,1.997,2.041,2.087,2.134,2.184,2.236,2.291,2.349,2.409,2.473,2.54,2.611,2.686,2.766,2.85,2.94,3.035,3.137,3.246,3.362,3.488],"mode":"lines","line":{"color":"gray","width":1},"showlegend":true,"hoverinfo":"skip","name":"streamlines xy = const"},{"type":"scatter","x":[3.5,3.457,3.414,3.372,3.329,3.286,3.243,3.201,3.158,3.115,3.072,3.029,2.987,2.944,2.901,2.858,2.815,2.773,2.73,2.687,2.644,2.602,2.559,2.516,2.473,2.43,2.388,2.345,2.302,2.259,2.216,2.174,2.131,2.088,2.045,2.003,1.96,1.917,1.874,1.831,1.789,1.746,1.703,1.66,1.617,1.575,1.532,1.489,1.446,1.404,1.361,1.318,1.275,1.232,1.19,1.147],"y":[-1.143,-1.157,-1.171,-1.186,-1.202,-1.217,-1.233,-1.25,-1.267,-1.284,-1.302,-1.32,-1.339,-1.359,-1.379,-1.399,-1.421,-1.443,-1.465,-1.489,-1.513,-1.538,-1.563,-1.59,-1.617,-1.646,-1.675,-1.706,-1.738,-1.771,-1.805,-1.84,-1.877,-1.916,-1.956,-1.997,-2.041,-2.087,-2.134,-2.184,-2.236,-2.291,-2.349,-2.409,-2.473,-2.54,-2.611,-2.686,-2.766,-2.85,-2.94,-3.035,-3.137,-3.246,-3.362,-3.488],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[-3.5,-3.457,-3.414,-3.372,-3.329,-3.286,-3.243,-3.201,-3.158,-3.115,-3.072,-3.029,-2.987,-2.944,-2.901,-2.858,-2.815,-2.773,-2.73,-2.687,-2.644,-2.602,-2.559,-2.516,-2.473,-2.43,-2.388,-2.345,-2.302,-2.259,-2.216,-2.174,-2.131,-2.088,-2.045,-2.003,-1.96,-1.917,-1.874,-1.831,-1.789,-1.746,-1.703,-1.66,-1.617,-1.575,-1.532,-1.489,-1.446,-1.404,-1.361,-1.318,-1.275,-1.232,-1.19,-1.147,-1.104,-1.061,-1.018,-0.976,-0.933,-0.89,-0.847,-0.805,-0.762,-0.719,-0.676,-0.633,-0.591],"y":[0.571,0.579,0.586,0.593,0.601,0.609,0.617,0.625,0.633,0.642,0.651,0.66,0.67,0.679,0.689,0.7,0.71,0.721,0.733,0.744,0.756,0.769,0.782,0.795,0.809,0.823,0.838,0.853,0.869,0.885,0.902,0.92,0.939,0.958,0.978,0.999,1.021,1.043,1.067,1.092,1.118,1.146,1.174,1.205,1.237,1.27,1.306,1.343,1.383,1.425,1.47,1.517,1.568,1.623,1.681,1.744,1.812,1.885,1.964,2.05,2.144,2.247,2.36,2.486,2.625,2.782,2.958,3.157,3.386],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[3.5,3.457,3.414,3.372,3.329,3.286,3.243,3.201,3.158,3.115,3.072,3.029,2.987,2.944,2.901,2.858,2.815,2.773,2.73,2.687,2.644,2.602,2.559,2.516,2.473,2.43,2.388,2.345,2.302,2.259,2.216,2.174,2.131,2.088,2.045,2.003,1.96,1.917,1.874,1.831,1.789,1.746,1.703,1.66,1.617,1.575,1.532,1.489,1.446,1.404,1.361,1.318,1.275,1.232,1.19,1.147,1.104,1.061,1.018,0.976,0.933,0.89,0.847,0.805,0.762,0.719,0.676,0.633,0.591],"y":[-0.571,-0.579,-0.586,-0.593,-0.601,-0.609,-0.617,-0.625,-0.633,-0.642,-0.651,-0.66,-0.67,-0.679,-0.689,-0.7,-0.71,-0.721,-0.733,-0.744,-0.756,-0.769,-0.782,-0.795,-0.809,-0.823,-0.838,-0.853,-0.869,-0.885,-0.902,-0.92,-0.939,-0.958,-0.978,-0.999,-1.021,-1.043,-1.067,-1.092,-1.118,-1.146,-1.174,-1.205,-1.237,-1.27,-1.306,-1.343,-1.383,-1.425,-1.47,-1.517,-1.568,-1.623,-1.681,-1.744,-1.812,-1.885,-1.964,-2.05,-2.144,-2.247,-2.36,-2.486,-2.625,-2.782,-2.958,-3.157,-3.386],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[-3.5,-3.457,-3.414,-3.372,-3.329,-3.286,-3.243,-3.201,-3.158,-3.115,-3.072,-3.029,-2.987,-2.944,-2.901,-2.858,-2.815,-2.773,-2.73,-2.687,-2.644,-2.602,-2.559,-2.516,-2.473,-2.43,-2.388,-2.345,-2.302,-2.259,-2.216,-2.174,-2.131,-2.088,-2.045,-2.003,-1.96,-1.917,-1.874,-1.831,-1.789,-1.746,-1.703,-1.66,-1.617,-1.575,-1.532,-1.489,-1.446,-1.404,-1.361,-1.318,-1.275,-1.232,-1.19,-1.147,-1.104,-1.061,-1.018,-0.976,-0.933,-0.89,-0.847,-0.805,-0.762,-0.719,-0.676,-0.633,-0.591,-0.548,-0.505,-0.462,-0.419,-0.377,-0.334,-0.291],"y":[0.286,0.289,0.293,0.297,0.3,0.304,0.308,0.312,0.317,0.321,0.326,0.33,0.335,0.34,0.345,0.35,0.355,0.361,0.366,0.372,0.378,0.384,0.391,0.397,0.404,0.411,0.419,0.426,0.434,0.443,0.451,0.46,0.469,0.479,0.489,0.499,0.51,0.522,0.534,0.546,0.559,0.573,0.587,0.602,0.618,0.635,0.653,0.672,0.691,0.712,0.735,0.759,0.784,0.811,0.841,0.872,0.906,0.942,0.982,1.025,1.072,1.123,1.18,1.243,1.313,1.391,1.479,1.579,1.693,1.825,1.98,2.163,2.384,2.655,2.995,3.435],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[3.5,3.457,3.414,3.372,3.329,3.286,3.243,3.201,3.158,3.115,3.072,3.029,2.987,2.944,2.901,2.858,2.815,2.773,2.73,2.687,2.644,2.602,2.559,2.516,2.473,2.43,2.388,2.345,2.302,2.259,2.216,2.174,2.131,2.088,2.045,2.003,1.96,1.917,1.874,1.831,1.789,1.746,1.703,1.66,1.617,1.575,1.532,1.489,1.446,1.404,1.361,1.318,1.275,1.232,1.19,1.147,1.104,1.061,1.018,0.976,0.933,0.89,0.847,0.805,0.762,0.719,0.676,0.633,0.591,0.548,0.505,0.462,0.419,0.377,0.334,0.291],"y":[-0.286,-0.289,-0.293,-0.297,-0.3,-0.304,-0.308,-0.312,-0.317,-0.321,-0.326,-0.33,-0.335,-0.34,-0.345,-0.35,-0.355,-0.361,-0.366,-0.372,-0.378,-0.384,-0.391,-0.397,-0.404,-0.411,-0.419,-0.426,-0.434,-0.443,-0.451,-0.46,-0.469,-0.479,-0.489,-0.499,-0.51,-0.522,-0.534,-0.546,-0.559,-0.573,-0.587,-0.602,-0.618,-0.635,-0.653,-0.672,-0.691,-0.712,-0.735,-0.759,-0.784,-0.811,-0.841,-0.872,-0.906,-0.942,-0.982,-1.025,-1.072,-1.123,-1.18,-1.243,-1.313,-1.391,-1.479,-1.579,-1.693,-1.825,-1.98,-2.163,-2.384,-2.655,-2.995,-3.435],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[-3.5,-3.457,-3.414,-3.372,-3.329,-3.286,-3.243,-3.201,-3.158,-3.115,-3.072,-3.029,-2.987,-2.944,-2.901,-2.858,-2.815,-2.773,-2.73,-2.687,-2.644,-2.602,-2.559,-2.516,-2.473,-2.43,-2.388,-2.345,-2.302,-2.259,-2.216,-2.174,-2.131,-2.088,-2.045,-2.003,-1.96,-1.917,-1.874,-1.831,-1.789,-1.746,-1.703,-1.66,-1.617,-1.575,-1.532,-1.489,-1.446,-1.404,-1.361,-1.318,-1.275,-1.232,-1.19,-1.147,-1.104,-1.061,-1.018,-0.976,-0.933,-0.89,-0.847,-0.805,-0.762,-0.719,-0.676,-0.633,-0.591,-0.548,-0.505,-0.462,-0.419,-0.377,-0.334,-0.291,-0.248,-0.206,-0.163],"y":[0.143,0.145,0.146,0.148,0.15,0.152,0.154,0.156,0.158,0.161,0.163,0.165,0.167,0.17,0.172,0.175,0.178,0.18,0.183,0.186,0.189,0.192,0.195,0.199,0.202,0.206,0.209,0.213,0.217,0.221,0.226,0.23,0.235,0.239,0.244,0.25,0.255,0.261,0.267,0.273,0.28,0.286,0.294,0.301,0.309,0.318,0.326,0.336,0.346,0.356,0.367,0.379,0.392,0.406,0.42,0.436,0.453,0.471,0.491,0.512,0.536,0.562,0.59,0.621,0.656,0.695,0.739,0.789,0.847,0.913,0.99,1.082,1.192,1.327,1.497,1.717,2.013,2.432,3.072],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[3.5,3.457,3.414,3.372,3.329,3.286,3.243,3.201,3.158,3.115,3.072,3.029,2.987,2.944,2.901,2.858,2.815,2.773,2.73,2.687,2.644,2.602,2.559,2.516,2.473,2.43,2.388,2.345,2.302,2.259,2.216,2.174,2.131,2.088,2.045,2.003,1.96,1.917,1.874,1.831,1.789,1.746,1.703,1.66,1.617,1.575,1.532,1.489,1.446,1.404,1.361,1.318,1.275,1.232,1.19,1.147,1.104,1.061,1.018,0.976,0.933,0.89,0.847,0.805,0.762,0.719,0.676,0.633,0.591,0.548,0.505,0.462,0.419,0.377,0.334,0.291,0.248,0.206,0.163],"y":[-0.143,-0.145,-0.146,-0.148,-0.15,-0.152,-0.154,-0.156,-0.158,-0.161,-0.163,-0.165,-0.167,-0.17,-0.172,-0.175,-0.178,-0.18,-0.183,-0.186,-0.189,-0.192,-0.195,-0.199,-0.202,-0.206,-0.209,-0.213,-0.217,-0.221,-0.226,-0.23,-0.235,-0.239,-0.244,-0.25,-0.255,-0.261,-0.267,-0.273,-0.28,-0.286,-0.294,-0.301,-0.309,-0.318,-0.326,-0.336,-0.346,-0.356,-0.367,-0.379,-0.392,-0.406,-0.42,-0.436,-0.453,-0.471,-0.491,-0.512,-0.536,-0.562,-0.59,-0.621,-0.656,-0.695,-0.739,-0.789,-0.847,-0.913,-0.99,-1.082,-1.192,-1.327,-1.497,-1.717,-2.013,-2.432,-3.072],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[0.163,0.206,0.248,0.291,0.334,0.377,0.419,0.462,0.505,0.548,0.591,0.633,0.676,0.719,0.762,0.805,0.847,0.89,0.933,0.976,1.018,1.061,1.104,1.147,1.19,1.232,1.275,1.318,1.361,1.404,1.446,1.489,1.532,1.575,1.617,1.66,1.703,1.746,1.789,1.831,1.874,1.917,1.96,2.003,2.045,2.088,2.131,2.174,2.216,2.259,2.302,2.345,2.388,2.43,2.473,2.516,2.559,2.602,2.644,2.687,2.73,2.773,2.815,2.858,2.901,2.944,2.987,3.029,3.072,3.115,3.158,3.201,3.243,3.286,3.329,3.372,3.414,3.457,3.5],"y":[3.072,2.432,2.013,1.717,1.497,1.327,1.192,1.082,0.99,0.913,0.847,0.789,0.739,0.695,0.656,0.621,0.59,0.562,0.536,0.512,0.491,0.471,0.453,0.436,0.42,0.406,0.392,0.379,0.367,0.356,0.346,0.336,0.326,0.318,0.309,0.301,0.294,0.286,0.28,0.273,0.267,0.261,0.255,0.25,0.244,0.239,0.235,0.23,0.226,0.221,0.217,0.213,0.209,0.206,0.202,0.199,0.195,0.192,0.189,0.186,0.183,0.18,0.178,0.175,0.172,0.17,0.167,0.165,0.163,0.161,0.158,0.156,0.154,0.152,0.15,0.148,0.146,0.145,0.143],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[-0.163,-0.206,-0.248,-0.291,-0.334,-0.377,-0.419,-0.462,-0.505,-0.548,-0.591,-0.633,-0.676,-0.719,-0.762,-0.805,-0.847,-0.89,-0.933,-0.976,-1.018,-1.061,-1.104,-1.147,-1.19,-1.232,-1.275,-1.318,-1.361,-1.404,-1.446,-1.489,-1.532,-1.575,-1.617,-1.66,-1.703,-1.746,-1.789,-1.831,-1.874,-1.917,-1.96,-2.003,-2.045,-2.088,-2.131,-2.174,-2.216,-2.259,-2.302,-2.345,-2.388,-2.43,-2.473,-2.516,-2.559,-2.602,-2.644,-2.687,-2.73,-2.773,-2.815,-2.858,-2.901,-2.944,-2.987,-3.029,-3.072,-3.115,-3.158,-3.201,-3.243,-3.286,-3.329,-3.372,-3.414,-3.457,-3.5],"y":[-3.072,-2.432,-2.013,-1.717,-1.497,-1.327,-1.192,-1.082,-0.99,-0.913,-0.847,-0.789,-0.739,-0.695,-0.656,-0.621,-0.59,-0.562,-0.536,-0.512,-0.491,-0.471,-0.453,-0.436,-0.42,-0.406,-0.392,-0.379,-0.367,-0.356,-0.346,-0.336,-0.326,-0.318,-0.309,-0.301,-0.294,-0.286,-0.28,-0.273,-0.267,-0.261,-0.255,-0.25,-0.244,-0.239,-0.235,-0.23,-0.226,-0.221,-0.217,-0.213,-0.209,-0.206,-0.202,-0.199,-0.195,-0.192,-0.189,-0.186,-0.183,-0.18,-0.178,-0.175,-0.172,-0.17,-0.167,-0.165,-0.163,-0.161,-0.158,-0.156,-0.154,-0.152,-0.15,-0.148,-0.146,-0.145,-0.143],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[0.291,0.334,0.377,0.419,0.462,0.505,0.548,0.591,0.633,0.676,0.719,0.762,0.805,0.847,0.89,0.933,0.976,1.018,1.061,1.104,1.147,1.19,1.232,1.275,1.318,1.361,1.404,1.446,1.489,1.532,1.575,1.617,1.66,1.703,1.746,1.789,1.831,1.874,1.917,1.96,2.003,2.045,2.088,2.131,2.174,2.216,2.259,2.302,2.345,2.388,2.43,2.473,2.516,2.559,2.602,2.644,2.687,2.73,2.773,2.815,2.858,2.901,2.944,2.987,3.029,3.072,3.115,3.158,3.201,3.243,3.286,3.329,3.372,3.414,3.457,3.5],"y":[3.435,2.995,2.655,2.384,2.163,1.98,1.825,1.693,1.579,1.479,1.391,1.313,1.243,1.18,1.123,1.072,1.025,0.982,0.942,0.906,0.872,0.841,0.811,0.784,0.759,0.735,0.712,0.691,0.672,0.653,0.635,0.618,0.602,0.587,0.573,0.559,0.546,0.534,0.522,0.51,0.499,0.489,0.479,0.469,0.46,0.451,0.443,0.434,0.426,0.419,0.411,0.404,0.397,0.391,0.384,0.378,0.372,0.366,0.361,0.355,0.35,0.345,0.34,0.335,0.33,0.326,0.321,0.317,0.312,0.308,0.304,0.3,0.297,0.293,0.289,0.286],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[-0.291,-0.334,-0.377,-0.419,-0.462,-0.505,-0.548,-0.591,-0.633,-0.676,-0.719,-0.762,-0.805,-0.847,-0.89,-0.933,-0.976,-1.018,-1.061,-1.104,-1.147,-1.19,-1.232,-1.275,-1.318,-1.361,-1.404,-1.446,-1.489,-1.532,-1.575,-1.617,-1.66,-1.703,-1.746,-1.789,-1.831,-1.874,-1.917,-1.96,-2.003,-2.045,-2.088,-2.131,-2.174,-2.216,-2.259,-2.302,-2.345,-2.388,-2.43,-2.473,-2.516,-2.559,-2.602,-2.644,-2.687,-2.73,-2.773,-2.815,-2.858,-2.901,-2.944,-2.987,-3.029,-3.072,-3.115,-3.158,-3.201,-3.243,-3.286,-3.329,-3.372,-3.414,-3.457,-3.5],"y":[-3.435,-2.995,-2.655,-2.384,-2.163,-1.98,-1.825,-1.693,-1.579,-1.479,-1.391,-1.313,-1.243,-1.18,-1.123,-1.072,-1.025,-0.982,-0.942,-0.906,-0.872,-0.841,-0.811,-0.784,-0.759,-0.735,-0.712,-0.691,-0.672,-0.653,-0.635,-0.618,-0.602,-0.587,-0.573,-0.559,-0.546,-0.534,-0.522,-0.51,-0.499,-0.489,-0.479,-0.469,-0.46,-0.451,-0.443,-0.434,-0.426,-0.419,-0.411,-0.404,-0.397,-0.391,-0.384,-0.378,-0.372,-0.366,-0.361,-0.355,-0.35,-0.345,-0.34,-0.335,-0.33,-0.326,-0.321,-0.317,-0.312,-0.308,-0.304,-0.3,-0.297,-0.293,-0.289,-0.286],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[0.591,0.633,0.676,0.719,0.762,0.805,0.847,0.89,0.933,0.976,1.018,1.061,1.104,1.147,1.19,1.232,1.275,1.318,1.361,1.404,1.446,1.489,1.532,1.575,1.617,1.66,1.703,1.746,1.789,1.831,1.874,1.917,1.96,2.003,2.045,2.088,2.131,2.174,2.216,2.259,2.302,2.345,2.388,2.43,2.473,2.516,2.559,2.602,2.644,2.687,2.73,2.773,2.815,2.858,2.901,2.944,2.987,3.029,3.072,3.115,3.158,3.201,3.243,3.286,3.329,3.372,3.414,3.457,3.5],"y":[3.386,3.157,2.958,2.782,2.625,2.486,2.36,2.247,2.144,2.05,1.964,1.885,1.812,1.744,1.681,1.623,1.568,1.517,1.47,1.425,1.383,1.343,1.306,1.27,1.237,1.205,1.174,1.146,1.118,1.092,1.067,1.043,1.021,0.999,0.978,0.958,0.939,0.92,0.902,0.885,0.869,0.853,0.838,0.823,0.809,0.795,0.782,0.769,0.756,0.744,0.733,0.721,0.71,0.7,0.689,0.679,0.67,0.66,0.651,0.642,0.633,0.625,0.617,0.609,0.601,0.593,0.586,0.579,0.571],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[-0.591,-0.633,-0.676,-0.719,-0.762,-0.805,-0.847,-0.89,-0.933,-0.976,-1.018,-1.061,-1.104,-1.147,-1.19,-1.232,-1.275,-1.318,-1.361,-1.404,-1.446,-1.489,-1.532,-1.575,-1.617,-1.66,-1.703,-1.746,-1.789,-1.831,-1.874,-1.917,-1.96,-2.003,-2.045,-2.088,-2.131,-2.174,-2.216,-2.259,-2.302,-2.345,-2.388,-2.43,-2.473,-2.516,-2.559,-2.602,-2.644,-2.687,-2.73,-2.773,-2.815,-2.858,-2.901,-2.944,-2.987,-3.029,-3.072,-3.115,-3.158,-3.201,-3.243,-3.286,-3.329,-3.372,-3.414,-3.457,-3.5],"y":[-3.386,-3.157,-2.958,-2.782,-2.625,-2.486,-2.36,-2.247,-2.144,-2.05,-1.964,-1.885,-1.812,-1.744,-1.681,-1.623,-1.568,-1.517,-1.47,-1.425,-1.383,-1.343,-1.306,-1.27,-1.237,-1.205,-1.174,-1.146,-1.118,-1.092,-1.067,-1.043,-1.021,-0.999,-0.978,-0.958,-0.939,-0.92,-0.902,-0.885,-0.869,-0.853,-0.838,-0.823,-0.809,-0.795,-0.782,-0.769,-0.756,-0.744,-0.733,-0.721,-0.71,-0.7,-0.689,-0.679,-0.67,-0.66,-0.651,-0.642,-0.633,-0.625,-0.617,-0.609,-0.601,-0.593,-0.586,-0.579,-0.571],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[1.147,1.19,1.232,1.275,1.318,1.361,1.404,1.446,1.489,1.532,1.575,1.617,1.66,1.703,1.746,1.789,1.831,1.874,1.917,1.96,2.003,2.045,2.088,2.131,2.174,2.216,2.259,2.302,2.345,2.388,2.43,2.473,2.516,2.559,2.602,2.644,2.687,2.73,2.773,2.815,2.858,2.901,2.944,2.987,3.029,3.072,3.115,3.158,3.201,3.243,3.286,3.329,3.372,3.414,3.457,3.5],"y":[3.488,3.362,3.246,3.137,3.035,2.94,2.85,2.766,2.686,2.611,2.54,2.473,2.409,2.349,2.291,2.236,2.184,2.134,2.087,2.041,1.997,1.956,1.916,1.877,1.84,1.805,1.771,1.738,1.706,1.675,1.646,1.617,1.59,1.563,1.538,1.513,1.489,1.465,1.443,1.421,1.399,1.379,1.359,1.339,1.32,1.302,1.284,1.267,1.25,1.233,1.217,1.202,1.186,1.171,1.157,1.143],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[-1.147,-1.19,-1.232,-1.275,-1.318,-1.361,-1.404,-1.446,-1.489,-1.532,-1.575,-1.617,-1.66,-1.703,-1.746,-1.789,-1.831,-1.874,-1.917,-1.96,-2.003,-2.045,-2.088,-2.131,-2.174,-2.216,-2.259,-2.302,-2.345,-2.388,-2.43,-2.473,-2.516,-2.559,-2.602,-2.644,-2.687,-2.73,-2.773,-2.815,-2.858,-2.901,-2.944,-2.987,-3.029,-3.072,-3.115,-3.158,-3.201,-3.243,-3.286,-3.329,-3.372,-3.414,-3.457,-3.5],"y":[-3.488,-3.362,-3.246,-3.137,-3.035,-2.94,-2.85,-2.766,-2.686,-2.611,-2.54,-2.473,-2.409,-2.349,-2.291,-2.236,-2.184,-2.134,-2.087,-2.041,-1.997,-1.956,-1.916,-1.877,-1.84,-1.805,-1.771,-1.738,-1.706,-1.675,-1.646,-1.617,-1.59,-1.563,-1.538,-1.513,-1.489,-1.465,-1.443,-1.421,-1.399,-1.379,-1.359,-1.339,-1.32,-1.302,-1.284,-1.267,-1.25,-1.233,-1.217,-1.202,-1.186,-1.171,-1.157,-1.143],"mode":"lines","line":{"color":"gray","width":1},"showlegend":false,"hoverinfo":"skip"},{"type":"scatter","x":[2,0],"y":[1.5,0],"mode":"markers+text","text":["(2, 1.5)","stagnation point"],"textposition":["bottom left","top right"],"marker":{"size":9,"color":"black"},"showlegend":false}],"layout":{"title":{"text":"Stagnation-point flow at t = 2 s: vectors at (2, 1.5) m (scaled \u00d70.8)"},"xaxis":{"title":{"text":"x (m)"},"range":[-0.5,5],"constrain":"domain"},"yaxis":{"title":{"text":"y (m)"},"range":[-0.5,3.5],"scaleanchor":"x","constrain":"domain"},"height":600,"annotations":[{"x":3.6,"y":0.2999999999999998,"ax":2,"ay":1.5,"xref":"x","yref":"y","axref":"x","ayref":"y","showarrow":true,"arrowhead":3,"arrowwidth":3,"arrowcolor":"gray","text":""},{"x":3.7,"y":0.2999999999999998,"xref":"x","yref":"y","showarrow":false,"text":"velocity (2, \u22121.5) m/s","font":{"color":"gray"},"xanchor":"left","yanchor":"middle"},{"x":1.6,"y":1.8,"ax":2,"ay":1.5,"xref":"x","yref":"y","axref":"x","ayref":"y","showarrow":true,"arrowhead":3,"arrowwidth":3,"arrowcolor":"royalblue","text":""},{"x":1.5,"y":1.85,"xref":"x","yref":"y","showarrow":false,"text":"local (\u22120.5, 0.375)","font":{"color":"royalblue"},"xanchor":"right","yanchor":"bottom"},{"x":3.6,"y":2.7,"ax":2,"ay":1.5,"xref":"x","yref":"y","axref":"x","ayref":"y","showarrow":true,"arrowhead":3,"arrowwidth":3,"arrowcolor":"darkorange","text":""},{"x":3.7,"y":2.7,"xref":"x","yref":"y","showarrow":false,"text":"convective (2, 1.5)","font":{"color":"darkorange"},"xanchor":"left","yanchor":"middle"},{"x":3.2,"y":3.0,"ax":2,"ay":1.5,"xref":"x","yref":"y","axref":"x","ayref":"y","showarrow":true,"arrowhead":3,"arrowwidth":3,"arrowcolor":"crimson","text":""},{"x":3.2,"y":3.1,"xref":"x","yref":"y","showarrow":false,"text":"total (1.5, 1.875) m/s\u00b2","font":{"color":"crimson"},"xanchor":"center","yanchor":"bottom"}]}}

Lagrangian check. Follow one particle instead: $dx/dt=Ax/(1+Bt)$ integrates to $x(t)=x_0(1+Bt)^{A/B}$. Differentiating twice gives

\[\ddot x=x_0\frac{A}{B}\Big(\frac{A}{B}-1\Big)B^2(1+Bt)^{A/B-2}=\frac{A(A-B)}{(1+Bt)^2}\,x,\]

exactly $a_x$ above (and similarly $a_y$ with exponent $-A/B$). The Eulerian formula $D/Dt$ and riding with the particle agree, as they must.

Recap

Topic Core idea
Derivative $\phi’(x)=dy/dx$: scalar slope of a single-variable function.
Partial derivative Slope along one coordinate, others held fixed.
Gradient $\nabla f=[\partial f/\partial x,\ \partial f/\partial y,\ \partial f/\partial z]^T$: vector of steepest ascent, magnitude = steepest slope.
Directional derivative $D_{\hat u}f=\nabla f\cdot\hat u=\lvert\nabla f\rvert\cos\theta$, with $\lvert\hat u\rvert=1$.
Extremes Max $+\lvert\nabla f\rvert$ at $\theta=0$; zero along contours; min $-\lvert\nabla f\rvert$ at $\theta=\pi$.
Ski hill at $(10,50)$ $\nabla f=(-1,-1)$, ascent $\hat u=-(\hat i+\hat j)/\sqrt2$, steepest descent slope $-\sqrt2$.
Jacobian $J_{ij}=\partial v_i/\partial x_j$: rows are the gradients of each component of $\vec v$.
Taylor (multivariable) $f\approx f_0+\nabla f^T\Delta\vec x+\tfrac12\Delta\vec x^TH\Delta\vec x$, $H_{ij}=\partial^2f/\partial x_i\partial x_j$.
Optimality $\nabla f=\vec0$ is necessary, not sufficient.
Gradient descent $\vec x_{k+1}=\vec x_k-\alpha\nabla f$; any $\vec p$ with $\nabla f\cdot\vec p<0$ is a descent direction.
Hessian test All $\lambda>0$: min; all $\lambda<0$: max; mixed: saddle; a zero: inconclusive.
Newton $H\Delta\vec x=-\nabla f$: uses curvature; fast near the optimum.
2-D test $D=f_{xx}f_{yy}-f_{xy}^2$: $D>0,f_{xx}>0$ min; $D>0,f_{xx}<0$ max; $D<0$ saddle; $D=0$ inconclusive.
Why it works $\Delta f\approx\frac{1}{2f_{xx}}[(f_{xx}h+f_{xy}k)^2+Dk^2]$ (completing the square).
Material derivative $D\phi/Dt=\partial\phi/\partial t+(\vec u\cdot\nabla)\phi$: local + convective.
Fluid acceleration $\vec a=\partial\vec u/\partial t+(\vec u\cdot\nabla)\vec u$; nonzero even in steady flow.

Check our understanding

True or False

  1. The gradient of a scalar function is a vector.
  2. The directional derivative is a vector.
  3. $D_{\hat u}f=\nabla f\cdot\vec v$ gives the right slope for any direction vector $\vec v$, unit or not.
  4. The gradient is perpendicular to the contour lines of $f$.
  5. The largest directional derivative at a point equals $\lvert\nabla f\rvert$.
  6. Moving perpendicular to the gradient leaves $f$ unchanged to first order.
  7. On the ski hill, the steepest-ascent direction at $(10,50)$ points straight at the summit.
  8. A point where $\nabla f=\vec0$ is always a minimum or a maximum.
  9. Gradient descent, $\vec x_{k+1}=\vec x_k-\alpha\nabla f$, is used to find a maximum.
  10. The multivariable Taylor series has a factor $\tfrac12$ in front of the Hessian term.
  11. A Hessian with eigenvalues $-36$ and $-12$ at a critical point means a local maximum.
  12. A local maximum found with the Hessian test is also the global maximum.
  13. The Jacobian of $\vec v=(3x^2y,\ 3y^3,\ 7xz)$ has $9y^2$ in row 2, column 2.
  14. If $D=\det H>0$ at a critical point, it must be a maximum or a minimum.
  15. If $D=0$, the critical point is a saddle.
  16. At an extremum, $f_{xx}$ and $f_{yy}$ always have the same sign.
  17. In steady flow the acceleration of every fluid particle is zero.
  18. The convective term $(\vec u\cdot\nabla)\phi$ is zero when $\phi$ is uniform in space.
View Answer Key
  1. True.
  2. False. It is a scalar: the projection of $\nabla f$ onto $\hat u$.
  3. False. $\vec v$ must be normalized; otherwise the result is scaled by $\lvert\vec v\rvert$.
  4. True. Along a contour $f$ is constant, so $D_{\hat u}f=0$, i.e. $\nabla f\perp\hat u$.
  5. True. Reached at $\theta=0$.
  6. True. $\cos90^\circ=0$.
  7. False. It is $33.7^\circ$ off, because the hill is not circular.
  8. False. It can also be a saddle point, e.g. $f=x^2-y^2$ at the origin.
  9. False. It finds a minimum; use $+\alpha\nabla f$ (ascent) or minimize $-f$ for a maximum.
  10. True. It matches $f’‘/2!$ in one variable.
  11. True. Negative definite Hessian, dome shape — $(4,4)$ for $f=12xy-x^3-y^3$.
  12. False. The test is local; $f=12xy-x^3-y^3$ has a local max of 64 at $(4,4)$ but $f(-10,0)=1000$.
  13. True. $\partial(3y^3)/\partial y=9y^2$.
  14. True. Which one is set by the sign of $f_{xx}$.
  15. False. The test is inconclusive; $x^4+y^4$, $-(x^4+y^4)$ and $x^4-y^4$ all have $D=0$ at the origin.
  16. True. $D>0$ requires $f_{xx}f_{yy}>f_{xy}^2\ge0$.
  17. False. Only the local part $\partial\vec u/\partial t$ vanishes; e.g. a nozzle accelerates fluid convectively.
  18. True. Then $\nabla\phi=\vec0$.

Practice question

Q1. On the same hill, you stand at $(20,20)$. Find the steepest-descent direction, its slope, and the slope if you instead ski due east.

View Answer

$\nabla f(20,20)=(-0.1\cdot20,\ -0.02\cdot20)=(-2,-0.4)$, $\lvert\nabla f\rvert=\sqrt{4+0.16}=2.04$.

Steepest descent: $\hat s=-\nabla f/\lvert\nabla f\rvert=(2,0.4)/2.04=(0.981,0.196)$, mostly east. Slope $=-2.04$.

Due east, $\hat u=(1,0)$: $D_{\hat u}f=-2$, almost as steep, because east is only $11.3^\circ$ from the fall line.