# Coincidence of directional derivatives and derivatives along paths?

$\newcommand{\R}{\mathbb{R}}$ $\newcommand{\al}{\alpha}$

Let $\Phi:\R^2 \to \R$ be a function which has partial derivatives at the point $(x_0,y_0)$. Let $\al:I \to \R^2$ be a path satisfying:

$\al(0)=(x_0,y_0),\dot \al(0)=v=(v_1,v_2)\neq (0,0)$.

Assume $\Phi \circ \al$ is differentiable at $t=0$ and the directional derivative of $\Phi$ at direction $v$ ($d_v \Phi(x_0,y_0)$) exists.

Is it true that $(\Phi \circ \al)'(0)=d_v \Phi(x_0,y_0)$?

Update:

As noted by user251257, if $\Phi$ is Lipschitz then both derivatives agree. So, in order to find a counter-example (where they differ) we need to search for non-Lipschitz functions, which still has partial derivatives at the point $(x_0,y_0)$.

This is not trivial, since a function with bounded partial derivatives is Lipschitz (as proved here). So, our search is narrowed down to functions which do not have partial derivatives in a neighbourhood of $(x_0,y_0)$, or that there partial derivatives are unbounded in some neighbourhood of it.

Note:

In general, it can happen that either one of $(\Phi \circ \al)'(0),d_v \Phi(x_0,y_0)$ exists without the other.

Example 1: $d_v \Phi(x_0,y_0)$ exists ,$(\Phi \circ \al)'(0)$ does not. (essentially taken from here)

$(x_0,y_0)=(0,0), \Phi(x,y) = \begin{cases} \frac{x^2y}{x^4 +y^2}, & \text{if$(x,y) \neq 0$}\\ 0, & \text{if$(x,y) = (0,0)$} \\ \end{cases}, y(x)=x^2$

$\Phi$ has directional derivatives at every direction at $(0,0)$, but for $\al(x)=(x,x^2)=(x,y(x))$ we get: $F(x)=\Phi \circ \al(x)=\begin{cases} \frac{1}{2}, & \text{if$(x,y) \neq 0$}\\ 0, & \text{if$(x,y) = (0,0)$} \\ \end{cases}$ is not differentiable at $x_0=0$.

Example 2: $(\Phi \circ \al)'(0)$ exists ,$d_v \Phi(x_0,y_0)$ does not.

Update: this exmaple is wrong! I am not sure yet if a suitable example exists

Take $(x_0,y_0)=(0,0),\al(t)=(t,t^3+t),\Phi(x,y)=\sqrt{|xy|}$, $\Phi$ has partial derivatives ($\Phi_x(0,0)=\Phi_y(0,0)=0)$. $\Phi(\al(t))=\sqrt{t^4+t^2}$,so $(\Phi \circ \al)'(0)=1$. However, the directional derivative at direction $v=(1,1)$ does not exist.

• So you want to know if $\frac{d}{dt}\Phi(\alpha(0) + t \dot\alpha(0))|_{t=0} = \frac{d}{dt}\Phi(\alpha(t))|_{t=0}$? – user251257 Feb 27 '16 at 13:52
• @user251257 Yes, exactly. – Asaf Shachar Feb 27 '16 at 14:39
• I'm pretty sure that this is true for all paths exactly when $\Phi$ is differentiable. (This is more or less the definition.) Unless you consider a function which are differentiable along some paths and not along others (like the two examples). – tomasz Feb 27 '16 at 16:29
• @tomasz: If $\Phi$ is differentiable this is indeed immediate. If it is not differentiable, I want to know, if for every path along $\Phi$ is differentiable, the derivative must be equal to the directional derivative, i.e to the derivative along the linear path. – Asaf Shachar Feb 27 '16 at 19:00

If $\Phi$ is Lipschitz continuous on a neighborhood of $\alpha(0)$, then both derivatives do agree.
Consider following example: \begin{align} \Phi(x,y) &= \sqrt{xy}, \\ \alpha(t) &= (t(1-t), t^2). \end{align} Then, we have $\Phi(\alpha(t)) = t\sqrt{1-t}$. On the other hand we have $\alpha'(0) = (1,0)$ and $\Phi(\alpha(0) + t\alpha'(0)) = \Phi(t, 0) = 0$. So both derivatives differ.
• Your example is interesting. I think I have learned something from it. Thanks. However, your function has a directional derivative in only one direction, $(0,1)$ (up to scaling) except zero. I am interested to know if this situation is possible for a function which has directional derivatives at two different directions. (That's why I specified the function must have partial derivatives). – Asaf Shachar Feb 28 '16 at 8:45
• @AsafShachar: Ah. I missed that $\Phi$ should have partial derivatives. I will improve the answer later – user251257 Feb 28 '16 at 14:36