# A weak definition of multiple differentiability of a function of several variables

Several times I faced the following

Definition 1: A function $$f: \mathbb{R^n}\mapsto \mathbb{R}$$ is called $$k$$ times differentiable at $$x_0$$ iff all the partial derivatives of $$f$$ of order $$k-1$$ are differentiable at $$x_0$$.

Besides this definition, more popular is the other

Definition 2: A function $$f: \mathbb{R^n}\mapsto \mathbb{R}$$ is called $$k$$ times differentiable at $$x_0$$ iff $$f$$ is $$k-1$$ times differentiable in a neighborhood of $$x_0$$ and all the partial derivatives of $$f$$ of order $$k-1$$ are differentiable at $$x_0$$.

It's obvious, that in case $$n=1$$ these two definitions coincide. Besides that, it can be shown that Def. 2 coincides with general Frechet $$k$$-times differentiability and obviously it's not weaker than Def 1. On the other hand, it can be shown that Def. 1 is sufficient to prove general Young's theorem. In this regard, the following question arose:

1. Does anyone know an example of a function (say 2 times differentiable of 2 variables) which satisfies the Def. 1, but not the Def. 2? I have some ideas of constructing such an example with the use of Sobolev mollifications, but it's quite complicated and ugly ….

2. If such an example exists, is Taylor theorem with Peano remainder valid for the functions which satisfy the Def. 1?

• In MathJax, one should use *stars* stars, not $\textit{math-mode fakery}$ $\textit{math-mode fakery}$, for italics. I have edited accordingly. – LSpice Jan 27 at 3:07
• And one should also pay due attention to Markdown. I have edited accordingly. – Andrej Bauer Jan 27 at 14:43

Here is an example (with $$k=2$$) of a function satisfying Def. 1 but not Def. 2. With $$r:=\sqrt{x^2+y^2}$$, let $$g(x,y):=xy/r\in[-r,r]$$ if $$r\ne0$$, with $$g(0,0):=0$$. Everywhere here, $$x$$ and $$y$$ are any real numbers. Then $$g$$ is differentiable everywhere except at $$(0,0)$$ (and continuous everywhere), but $$g$$ has both partial derivatives everywhere: $$\text{g'_x(x,y)=y^3/r^3\in[-1,1] and g'_y(x,y)=x^3/r^3\in[-1,1] if r\ne0, }$$ and $$g'_x(0,0)=g'_y(0,0)=0$$.

Let $$f(x,y):=\sum_1^\infty\frac{r^3}{j^2}\,g(x-1/j,y).$$ Then $$f$$ is not differentiable at any of the points $$(1/j,0)$$ (and hence is not differentiable in any neighborhood of $$(0,0)$$), so that $$f$$ does not satisfy Def. 2.

However, by dominated convergence, $$f$$ has both partial derivatives everywhere, and (as $$r\to0$$) $$f'_x(x,y)=\sum_1^\infty\frac{r^3}{j^2}\,g'_x(x-1/j,y)+\sum_1^\infty\frac{3rx}{j^2}\,g(x-1/j,y)\\ =O(r^2)=o(r),$$ $$f'_y(x,y)=\sum_1^\infty\frac{r^3}{j^2}\,g'_y(x-1/j,y)+\sum_1^\infty\frac{3ry}{j^2}\,g(x-1/j,y)\\ =O(r^2)=o(r).$$ So, $$f'_x$$ and $$f'_y$$ are both differentiable at $$(0,0)$$. Thus, $$f$$ satisfies Def. 1.

• Ahaha, this is the same example I was thinking of, but with $x-1/2^j$ :) First I wanted to set these functions in balls of radius $1/2^{j+3}$, extend by 0 out of these sequence of balls, then mollify this function in some kind of Sobolev manner, then multiply by $x^3+y^3$ instead of $r^3$.) But then I quickly realized, that Sobolev mollification gives me a discontinuous function, so I started thinking about the series with $1/j^2$. Guess you were faster.) Thanks, Iosif!! Remark: a typo - $3r^2x$ and $3r^2y$... – Alexander Jan 27 at 16:55
• @Alexander : Yes, this kind of reasoning seems a natural one to try. As for the possible typos, I think they are not typos: $(r^3)'_x=3r^2(x/r)=3rx$. (You can also check the dimensions: if $x$ and $y$ are measured in inches, then $r^3$ is measured in inches cubed, and hence $(r^3)'_x$ must be in inches squared. – Iosif Pinelis Jan 27 at 18:50
• Yep, sure, sorry, here come x and y instead of what I wanted to be r .) – Alexander Jan 27 at 21:59

Now I got the answer to the second part of my own question: let $$f(x,y)$$ be twice differentiable at $$(0,0)$$ by Definition 1. Then $$f(x,y)=P(x,y)+o(r^2)$$, where $$P(x,y)=f(0,0)+f_x(0,0)x+f_y(0,0)y+\frac{1}{2}f_{xx}(0,0)x^2+f_{xy}(0,0)xy+\frac{1}{2}f_{yy}(0,0)y^2$$.

Really, denote $$g(x,y):=f(x,y)-P(x,y)$$. Then $$g(x,y)=[g(x,y)-g(0,y)]+[g(0,y)-g(0,0)]$$. We have $$g(x,y)-g(0,y) = g_x(\xi_1,y)x=[f_x(\xi_1,y)-f_x(0,0)-f_{xx}(0,0)\xi_1-f_{xy}(0,0)y]x=o(\|(\xi_1,y)\|)x=o(r^2),$$ where $$\xi_1=\xi_1(x,y)\in(0,x)$$. Similarly, $$g(0,y)-g(0,0)=g_y(0,\xi_2)=o(\|(0,\xi_2)\|)y=o(r^2).$$ So the classical Taylor theorem assumptions can be weakened in finite-dimensional case!?? Anyone saw this somewhere??