In the multivariable calculus course I took the directional derivative of a multivariable function $f(x,y)$ at $(a,b)$ in the direction of the vector $\vec{s}$ was defined as the following: $$f_s(a,b) = \vec{\nabla f} \cdot \vec{u_s}$$

where $\vec{u_s}$ is the unit vector in the same direction of $\vec{s}$. Now I have come across the following definition:

$$\frac{d}{d\alpha} f(\vec{v} + \alpha\vec{s})$$ evaluated at $\alpha = 0$ $(\vec{v}$ is supposed to be the vector at which the derivative is evaluated). I am struggling to see why the two definition are equal.

  • $\begingroup$ Try using the chain rule to evaluate $\frac{d}{d\alpha}f(\vec v + \alpha \vec s)$ at $\alpha = 0$. $\endgroup$ – littleO Oct 6 '20 at 0:57

The definitions are not equivalent. As far as I know, the usual definition is the second one:

Definition: The directional derivative of $f$ at $p$ in the direction of the unit vector $\vec{s}$ is the derivative at $0$ of the function $\varphi(t)=f(p+t\vec{s})$

The first "definition" in the question is actually a property that is not equivalent to the definition. It is true for example if $f$ is differentiable at $p$:

Theorem: If $f$ is differentiable at $p$, then $f$ has directional derivatives at $p$ in every direction $\vec{s}$ and $f_{\vec{s}}(p)=\nabla f(p)\cdot \vec{s}$.

The proof is simply a consequence of the Chain Rule for differentiable functions. If $f$ has all partial derivatives (hence has a gradient) but is not differentiable, things get messy. The RHS is defined but it is possible that the LHS does not exist for some direction $\vec{s}$. Worse, it is possible that $f_{\vec{s}}(p)$ exists but is not equal to $\nabla f(p)\cdot \vec{s}$!

Some interesting examples (at $p=(0,0)$):

  1. $f(x,y)=0$ if $x=0$ or $y=0$, and $f(x,y)=1$ otherwise.
  2. $f(x,y)=\frac{y^2}{x}$ if $x\neq 0$ and $f(0,y)=0$.

Those examples are classic Calculus/analysis textbooks material. In some contexts (differential geometry?), we don't care about these kinds of pathological examples and consider only differentiable functions, so the formula is always true.


By the chain rule you have \begin{align*} \frac{d}{d\alpha}f(v+\alpha s)_{|\alpha=0} &=\nabla f(v+\alpha s_{|\alpha=0})\cdot \frac{d}{d\alpha}(v+\alpha s)_{|\alpha=0}\\ &=\nabla f(v)\cdot s \end{align*} which should solve your problem.

On the other hand observe that $\frac{d}{d\alpha}f(v+\alpha s)_{|\alpha=0}$ is the directional derivative of $f$ in the direction of the vector $s$ evalued at point $v$, that is $\partial_sf(v)$.

This leads to the well known formula in multivariable calculus: $$ \nabla f(v)\cdot s=\partial_sf(v)\;. $$ Here $f:U\to\Bbb R$ where $U$ is open in $\Bbb R^n$; note the switching role the elements of $\Bbb R^n$ have: both vectors and points, according on what needed (namely: both $v$ and $s$ are element of $\Bbb R^n$, but $v$ is seen as a point, while $s$ as vector, since we are moving in its direction to reach the derivative).

  • $\begingroup$ But the Chain Rule is not true if the functions are not differentiable. $\endgroup$ – Taladris Oct 6 '20 at 1:01
  • $\begingroup$ I am pretty sure that a person in trouble with multivariable class doesn't concieve anything which is not differentiable. Otherwise it would have been stated explicitly. $\endgroup$ – Joe Oct 6 '20 at 1:06
  • $\begingroup$ And you solve the OP's struggle by giving him information that are factually wrong? That costs nothing to be precise and saying that it works when $f$ is differentiable, but things get more complicated in other contexts. $\endgroup$ – Taladris Oct 6 '20 at 1:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.