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:


*

*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 ….

*If such an example exists, is Taylor theorem with Peano remainder valid for the functions which satisfy the Def. 1?
 A: 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.
A: 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?? 
