Counterexamples about the differentiability of several variables

160 Views Asked by At

I've learned about differentiability of several variables.

If $f(x,y)$ is differentiable then we can use chain rule on it. But I suspect the converse of this proposition is not right. So, is there a function $f(x,y)$, such that the partial derivatives $\frac{\partial f}{\partial x}(0,0),\frac{\partial f}{\partial y}(0,0)$ exist, and for every functions $x(t)$ and $y(t)$ differentiable at $0$ satisfying $(x,y)(0)=(0,0)$, the chain rule $$\frac{df(x(t),y(t))}{dt}(0)=\frac{\partial f}{\partial x}(0,0)\frac{dx}{dt}(0)+\frac{\partial f}{\partial y}(0,0)\frac{dy}{dt}(0)$$ holds, but $f$ is not differentiable at $(0,0)$? I'm curious about the counterexamples.

2

There are 2 best solutions below

10
On

Chain rule for functions from multiple variables generally doesn't work in case of only existence of corresponding partial derivatives.

Let's consider example $$f(x,y)=\begin{cases} \frac{x^2y}{x^2+y^2}, &x^2+y^2>0 \\ 0, &(x,y)=(0,0) \end{cases}$$ For this function exists partial derivatives everywhere including point $(0,0)$, where $f'_x(0,0)=f'_y(0,0)=0$. By the way, exactly here partial derivatives are discontinuous.

If we consider simple functions $x(t)=y(t)=t$ and admit, that chain rule works, then we should have $$\frac{df}{dt}=f'_xx'_t+f'_yy'_t=0$$ in point $t=0$.

But if we really substitute $x,y$ in $f$, then we obtain $$f(x(t),y(t))=\frac{t^2\cdot t}{t^2+t^2}=\frac{1}{2}t$$ which gives derivative everywhere $\frac{1}{2}$ i.e. in point $t=0$ also.

Addition. I explained partly in comment below, why I hope that brought answer is useful. And I, also, am adding following example:

Let's consider $$g(t)=\begin{cases}\frac{1}{t}, & t\ne 0 \\ 0, & t=0 \end{cases}$$ and $$f(x,y)=\begin{cases} \frac{1}{x^2+y^2}, &x^2+y^2>0 \\ 0, &(x,y)=(0,0) \end{cases}$$ Obviously both are not differentiable in $0$ and $(0,0)$, but composition $g(f(x,y))=x^2+y^2$ is differentiable and partial derivative for $g\circ f$ can be obtained by chain rule - here it works.

Perhaps this does not exactly answer the horror that the question has become, but both of my examples, I hope, serve the main thing that, in my opinion, the querent wanted - to understand the chain rule.

0
On

"If $f(x,y)$ is differentiable then we can use chain rule on it. But I suspect the converse of this proposition is not right": surprisingly, your guess is wrong, i.e. the converse is right. More formally:

Theorem. Let $f(x,y)$ be a function, and $a,b\in\Bbb R$. If, for every differentiable functions $x(t)$ and $y(t)$ satisfying $x(0)=y(0)=0$, $$\frac{df(x(t),y(t))}{dt}(0)=ax'(0)+by'(0)$$ holds, then $f$ is differentiable at $(0,0)$ (and of course, $df_{(0,0)}(h,k)=ah+bk$).

Proof (by contraposition). Assume $$\frac{\partial f}{\partial x}(0,0)=a,\quad \frac{\partial f}{\partial y}(0,0)=b,$$ but $f$ is not differentiable at $(0,0)$, i.e. $\frac{f(h,k)-f(0,0)-ah-bk}{\|(h,k)\|}\not\to0$ as $(h,k)\to(0,0)$, and let us construct a pair $(x,y)$ of differentiable functions such that $x(0)=y(0)=0$ and $\frac{f(x(t),y(t))-f(0,0)}t\not\to ax'(0)+by'(0)$ as $t\to0$.

Since $\frac{f(h,k)-f(0,0)-ah-bk}{\|(h,k)\|}\not\to0$ as $(h,k)\to(0,0)$, there exist an $\epsilon>0$ and a sequence $x_n+iy_n=r_ne^{i\theta_n}\to0$ such that $$|f(x_n,y_n)-f(0,0)-ax_n-by_n|\ge\epsilon r_n.$$ Wlog (extracting a subsequence), we can even assume that the positive sequence $(r_n)$ is decreasing, and that the sequence $(\theta_n)$ in $[0,2\pi]$ converges monotonically to some $\theta_\infty$.

Then, there exists a differentiable and monotonic function $(0,\infty)\to[0,2\pi],r\mapsto\theta(r)$, such that $\theta(r_n)=\theta_n$ ($\forall n\in\Bbb N$). The pair of functions $(x,y):[0,\infty)\to\Bbb R^2$, defined by $x(r)+iy(r)=re^{i\theta(r)}$ ($\forall r>0$) and $x(0)=y(0)=0$, is then differentiable, including at $0$, with $x'(0)+iy'(0)=e^{i\theta_\infty}$.

However, $\frac{f(x(r),y(r))-f(0,0)}r\not\to a\cos\theta_\infty+b\sin\theta_\infty$ as $r\to0$, since $$\left|\frac{f(x(r_n),y(r_n))-f(0,0)}{r_n}-a\cos\theta_n+b\sin\theta_n\right|=\frac{|f(x_n,y_n)-f(0,0)-ax_n-by_n|}{r_n}\ge\epsilon.$$