### Applet: Non-differentiable function with partial derivatives

#### Applet loading

The partial derivatives of this function $f(x,y)$ are zero at the origin, $\pdiff{f}{x}(0,0)=\pdiff{f}{y}(0,0)=0$. Therefore, the only possibility for a tangent plane would be a horizontal plane. However, since the slopes of this function coming to the origin along different directions are not zero, a horizontal plane cannot be tangent. We conclude that no tangent plane exists at the origin and this function is not differentiable there.

The function is \begin{align*} f(x,y) = \begin{cases} \displaystyle \frac{x^2y}{x^2+y^2} & \text{if } (x,y) \ne (0,0)\\ 0 & \text{if } (x,y) = (0.0). \end{cases} \end{align*} We show that the above claim that the partial derivatives are zero at the origin is indeed true. Since this function is defined in a piecewise fashion around the origin, we have to use the limit definition of the partial derivatives, \begin{align*} \pdiff{f}{x}(0,0) &= \lim_{h \rightarrow 0} \frac{f(0+h,0)-f(0,0)}{h}\\ \pdiff{f}{y}(0,0) &= \lim_{h \rightarrow 0} \frac{f(0,0+h)-f(0,0)}{h}. \end{align*}

Since $f(0,0)=0$, $f(0+h,0)=f(h,0) = 0$, and $f(0,0+h)=f(0,h)=0$, we calculate that \begin{align*} \pdiff{f}{x}(0,0) &= \lim_{h \rightarrow 0} \frac{f(0+h,0)-f(0,0)}{h}\\ &= \lim_{h \rightarrow 0} \frac{0- 0}{h} = \lim_{h \rightarrow 0} 0 =0,\\ \pdiff{f}{y}(0,0) &= \lim_{h \rightarrow 0} \frac{f(0,0+h)-f(0,0)}{h}\\ &= \lim_{h \rightarrow 0} \frac{0- 0}{h} = \lim_{h \rightarrow 0} 0 =0. \end{align*}#### Applet links

This applet is found in the pages

- Subtleties of differentiability in higher dimensions
- Non-differentiable functions must have discontinuous partial derivatives

#### General information about three.js applets

The applet was made using three.js and requires Javascript as well as a browser that supports WebGL. For most three.js applets, you can drag with the mouse to rotate the view, drag with the right button to pan, and zoom in/out with the mouse wheel. Many applets contain points that you can drag to change values of variables.