Example of a multivariable nondifferentiable function with directional derivatives.

230 Views Asked by At

Please give an example of a continuous function $f:\mathbb{R}^2\rightarrow \mathbb{R}$ all of whose directional derivatives exist, so for every $\mathbf{v}\in\mathbb{R}^2$ $$df_{\mathbf{x}}(\mathbf{v})=\lim\limits_{t\to 0}\frac{f(\mathbf{x}+t\mathbf{v})-f(\mathbf{x})}{t}$$ exists, however $f$ is not differentiable, say at $(0,0)$.

2

There are 2 best solutions below

0
On

For instance, $$f(x,y)=\begin{cases}\sqrt{x^2+y^2}\exp\frac{x^4}{(y-3x^2)(y-x^2)}&\text{if }x>0\wedge x^2<y<3x^2\\ 0&\text{otherwise}\end{cases}$$

This function is continuous, because in the aforementioned domain $0\le \exp\frac{x^4}{(y-3x^2)(y-x^2)}\le e^{-1}$.

The region $\{f\ne 0\}$ intersects each line through the origin outside of a neighbourhood of $(0,0)$, so $\partial_vf(0)=0$ for all $v$. However, $\limsup_{(x,y)\to0}\frac{f(x,y)}{\sqrt{x^2+y^2}}\ge \lim_{x\to 0}\exp\frac{x^4}{(2x^2-3x^2)(2x^2-x^2)}=e^{-1}$ .

0
On

When $f((r\cos\ t,r\sin\ t)) = r \sin\ (2t)$ where $r>0$ and $0\leq t<2\pi$ and $f(0,0)=0$, then $$ df\ (\cos\ t,\sin\ t)=\lim_r\ \frac{ f((r\cos\ t,r\sin\ t)) -0 }{r} =\sin\ (2t) $$

Hence all directional derivatives exist. Here assume that $f$ is differentiable So $$ df\ -(\cos\ t,\sin\ t) =df\ (\cos\ (\pi +t),\sin\ (\pi+t)) =\sin\ (2t)=df\ (\cos\ t,\sin\ t)$$

which is a contradiction. Hence $f$ is not differentiable.