Wikipedia:Reference desk/Archives/Mathematics/2016 June 9

= June 9 =

Differentiable multivariate function with discontinuous partial derivatives
As far as I know, having continuous partial derivatives is strictly a stronger condition than differentiability. Does anyone have a simple example of a function of more than one real variable that is differentiable, but whose partial derivatives are discontinuous somewhere?--Jasper Deng (talk) 10:07, 9 June 2016 (UTC)


 * Not at all sure of myself on this, but I start from the second (univariate) example in Smoothness:


 * The function


 * $$f(x) = \begin{cases}x^2\sin{(\tfrac{1}{x})} & \mbox{if }x \neq 0, \\ 0 &\mbox{if }x = 0\end{cases}$$


 * is differentiable, with derivative


 * $$f'(x) = \begin{cases}-\mathord{\cos(\tfrac{1}{x})} + 2x\sin(\tfrac{1}{x}) & \mbox{if }x \neq 0, \\ 0 &\mbox{if }x = 0.\end{cases}$$


 * Because cos(1/x) oscillates as x → 0, f ’(x) is not continuous at zero. Therefore, this function is differentiable but not of class C1.


 * If you multiply the function f by y to get g(x, y) and treat y times the f ′(x)  expression as the partial of g with respect to x, does that give you what you're looking for? Here the partial of g  wrt y equals the above expression for f (x).Loraof (talk) 14:27, 9 June 2016 (UTC)
 * The question is if that resulting function is differentiable, which is stronger than the existence of the partial derivatives.--Jasper Deng (talk) 19:48, 9 June 2016 (UTC)


 * No, the resulting function, the partial derivative, is not. As the quote from the article says, f ′(x) (hence partial g partial x) is not continuous at zero, so it is not differentiable there. Loraof (talk) 20:38, 9 June 2016 (UTC)
 * But like I said, that is not strictly necessary for differentiability of the multivariable function (in general; to be clear I'm talking about g(x, y) = yf(x))... so the example as-is still may or may not be differentiable.--Jasper Deng (talk) 20:42, 9 June 2016 (UTC)


 * f′, and thus gx, is not even defined at x=0, since as the quote says cos(1/x) oscillates as x→0. If it's not defined there, it can't be differentiable there. Loraof (talk) 21:52, 9 June 2016 (UTC)
 * The quote says that f' is 0 at x = 0. It has no limit as it approaches 0, but is certainly defined there.--Jasper Deng (talk) 22:06, 9 June 2016 (UTC)


 * Right, sorry, it is defined at 0. But since it doesn't approach that value as x→0, it's not continuous at 0 (which is what your original question asked about). So it can't be differentiable at 0, since a derivative of gx at 0 is defined as the limit of [gx(0 + h) – gx(0)] / h, as h goes to 0, and that limit does not exist because the numerator oscillates. Loraof (talk) 03:01, 10 June 2016 (UTC)
 * Huh? I sense you're talking about a different difference quotient. You surely mean $$\lim_{h\to 0} \frac{g(0 + h, y) - g(0, y)}{h}$$, right? That certainly exists with value 0 by what the quote says. The original function $$f(x) = x^2 \sin(1/x)$$ has limit 0 as x approaches zero (since it is bounded above in absolute value by $$x^2$$, which has limit 0), so defining it to be equal to 0 at 0 makes it continuous. The derivative $$f'(x) = \frac{\partial g}{\partial x}/y$$ might not be continuous but it certainly is well defined there. Therefore, f is differentiable (everywhere) as a function of a single variable. But is g? It's not continuously differentiable because the partial derivative with respect to x isn't continuous. But it nonetheless could still be differentiable in the sense of having a total derivative.--Jasper Deng (talk) 03:16, 10 June 2016 (UTC)