[Math] Can directional derivatives be written as linear combination of partial derivatives even if f is not differentiable

calculusmultivariable-calculuspartial derivative

Given $f:\mathbb{R}^n\to\mathbb{R}$ and $\{v_1,…,v_n\}$ linearly independent vectors such that $\frac{\partial f}{\partial v_i}$ exists.

I know if f is differentiable then $\frac{\partial f}{\partial v_i}$=$\nabla f\cdot v$ so the directional derivative of f can be expressed as a linear combination of the partial derivatives.

If f is not differentiable:

1) $\nabla f$ exists ?

2) If $\nabla f$ exists ,can we express the directional derivatives as a linear combination of the partial derivatives?

Best Answer

There are many examples of functions — even discontinuous functions — that have all partial derivatives but for which that linearity formula fails. You can find many of them littered around in questions on this site. But here are a few. Set $f(0,0) = 0$ and for $(x,y)\ne (0,0)$ take \begin{align*} f(x,y) &= \frac{xy}{x^2+y^2} \\ f(x,y) &= \frac{xy^2}{x^2+y^4} \\ f(x,y) &= \frac{xy^2}{x^2+y^2} \end{align*} Find the gradient vector (hint: they'll all be $0$) at the origin, and compute the various directional derivatives.