Gradient vector, higher derivatives, …
$$
Review
For a function of several variables, we have defined the directional derivative in the direction of a unit vector \(\mathbf{u}\) as
\[f_{\mathbf{u}}(a_1, a_2, \dots, a_n) = \lim_{h \to 0} \frac{f(x_1 + hu_1, x_2 + hu_2, \dots, x_n+hu_n) - f(x_1, x_2, \dots, x_n)}{h}\]
We then defined partial derivatives of \(f\) as directional derivatives in the direction of one of the standard basis vectors, that is unit vectors in the directions of the coordinate axes.
In two dimensions, these are the vectors \(\mathbf{i}\) and \(\mathbf{j}\), leading to the partial derivative with respect to \(x\):
\[\frac{\partial f}{\partial x}(x,y) = f_x(x,y) = f_{\mathbf{i}}(x,y) = D_{\mathbf{i}} f(x,y)\]
and
\[\frac{\partial f}{\partial y}(x,y) = f_y(x,y) = f_{\mathbf{j}}(x,y) = D_{\mathbf{j}} f(x,y)\]
In three dimensions we also add the partial derivative with respect to \(z\), corresponding to the vector \(\mathbf{k}\).
We also learned what it means for a function of several variables to be differentiable: It is not enough to just have all the partial derivatives. A function \(f:\mathbb{R}^n \to \mathbb{R}\) is differentiable at a point \(A = (a_1, a_2, \dots, a_n)\) if it can be well approximated near \(A\) by a linear function \(L:\mathbb{R}^n \to \mathbb{R}\). Formally. \(f\) is differentiable at \(A\) if there exists a linear function \(L\) such that
\[\lim_{(x_1,x_2,\dots, x_n)\to (a_1,a_2,\dots,a_n)}\frac{f(x_1,x_2,\dots,x_n) - L(x_1,x_2,\dots,x_n)}{\left\lvert\left\langle x_1,x_2,\dots,x_n\right\rangle - \left\langle a_1,a_2,\dots,a_n\right\rangle \right\rvert} = 0\]
In two variables, it simply means that the surface graph of the function has a tangent plane.
For example, the following surface graph shows a function that has all directional derivatives at the origin, but is not differentiable there:
Finally, we learned that for a differentiable function, the gradient vector defined as
\[\mathbf{\nabla}f(x_1,x_2,\dots,x_n) = \left\langle \frac{\partial f}{\partial x_1}(x_1, x_2,\dots,x_n), \frac{\partial f}{\partial x_2}(x_1, x_2,\dots,x_n), \dots, \frac{\partial f}{\partial x_n}(x_1, x_2,\dots,x_n) \right\rangle\]
is very useful. For example, if \(f\) is a differentiable function at \(A\), then for any unit vector \(\mathbf{u}\) the directional derivative of \(f\) at \(A\) in the direction \(\mathbf{u}\) can be calculated as
\[D_\mathbf{u} f(a_1,a_2,\dots,a_n) = \mathbf{\nabla}f(a_1,a_2,\dots,a_n)\cdot \mathbf{u}.\]
The next video talks a bit more about the gradient vector: