Good example of a non-continuous function all of whose partial derivatives exist - MathOverflow most recent 30 from http://mathoverflow.net2013-05-20T06:39:29Zhttp://mathoverflow.net/feeds/question/19303http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://mathoverflow.net/questions/19303/good-example-of-a-non-continuous-function-all-of-whose-partial-derivatives-existGood example of a non-continuous function all of whose partial derivatives existDyke Acland 2010-03-25T13:38:41Z2010-06-08T01:45:44Z
<p>What's a good example to illustrate the fact that a function all of whose partial derivatives exist may not be continuous?</p>
http://mathoverflow.net/questions/19303/good-example-of-a-non-continuous-function-all-of-whose-partial-derivatives-exist/19304#19304Answer by Thomas Kragh for Good example of a non-continuous function all of whose partial derivatives existThomas Kragh2010-03-25T13:45:41Z2010-03-25T13:45:41Z<p>The standard example I have seen is: $f(x,y)=\frac{2xy}{x^2+y^2}$.</p>
http://mathoverflow.net/questions/19303/good-example-of-a-non-continuous-function-all-of-whose-partial-derivatives-exist/19470#19470Answer by gowers for Good example of a non-continuous function all of whose partial derivatives existgowers2010-03-26T22:25:49Z2010-03-26T22:38:16Z<p>I feel it's more informative to have the thought process that leads to the example rather than just be told some magic formula that works, however simple that formula might be.</p>
<p>Here is a way of explaining it. We'll decide that our function is going to be discontinuous at (0,0). In order to ensure that the partial derivatives there are defined we'll try the simplest thing and make the function zero on the two axes. How can we make sure that it is discontinuous at (0,0)? Well, a simple way might be to make the function equal to 1 on the line x=y. (If you object that that step was unmotivated, then read on -- it will become clear that I could have chosen pretty well <em>any</em> function and the argument still works.) How are we going to make sure that the function has partial derivatives everywhere? We could do it by trying to give it a nice formula everywhere. We care particularly about how the function behaves when you keep x or y constant, so let's see what happens if we try to choose the nicest possible dependence on y for each fixed x. If we do that then we'll be tempted to make the function linear. Since f(x,0)=0 and f(x,x)=1, this would tell us to choose f(x,y)=y/x.</p>
<p>Unfortunately, that doesn't work: we also need the function to tend to zero for fixed y as x tends to zero. But at least this has given us the idea that we would like to write f as a quotient. What properties would we need of g and h if we tried f(x,y)=g(x,y)/h(x,y)? We would want g(x,0)=g(0,y)=0, g(x,x)=h(x,x), and h(x,y) is never 0 (except that we don't mind what happens at (0,0). We also want g and h to be nice so that the partial derivatives will obviously exist. The simplest function that vanishes only if (x,y)=(0,0) is $x^2+y^2$. The simplest function that vanishes when x=0 or y=0 but not when $x=y\ne 0$ is $xy$. Multiply that by 2 to get 1 down the line x=y and there we are.</p>
<p>Now suppose we had wanted the value to be, say, $e^{1/x}$ at (x,x), so that the function is wildly unbounded near (0,0). Then we could just multiply the previous function by $\exp((2/(x^2+y^2))^{1/2})$.</p>
<p>The main point I want to make is that we could just as easily have chosen many other functions. For example, $\sin(x)\sin(y)/(x^4+y^4)$ vanishes on the axes and clearly does not tend to zero down the line x=y (in fact it tends to infinity).</p>
http://mathoverflow.net/questions/19303/good-example-of-a-non-continuous-function-all-of-whose-partial-derivatives-exist/27403#27403Answer by Marco for Good example of a non-continuous function all of whose partial derivatives existMarco2010-06-07T23:14:55Z2010-06-07T23:14:55Z<p>Consider $f(x,y)=1$ on the set $\lbrace{(x,y):y=x^2}\rbrace\backslash\lbrace(0,0)\rbrace$ and $f(x,y)=0$ on any other point.</p>
http://mathoverflow.net/questions/19303/good-example-of-a-non-continuous-function-all-of-whose-partial-derivatives-exist/27417#27417Answer by Will Jagy for Good example of a non-continuous function all of whose partial derivatives existWill Jagy2010-06-08T01:31:16Z2010-06-08T01:45:44Z<p>I was travelling when this came up.</p>
<p>With the same results as Georges Elencwajg's comment and Marco's recent answer, take
$$ f(x,y) = \frac{2 x^2 y}{x^4 + y^2} $$ and set to $0$ at the origin $(0,0).$ Along any line through the origin $ x = a t, \; y = b t$ the limit is 0, as
$$ | f(a t, b t) | \leq a^2 | t / b | . $$ However, along the parabola $y = x^2$ the value is 1, and along the parabola $y = - x^2$ the value is $-1.$</p>
<p>To get "directional derivative" 0 in every direction through the origin switch to
$$ g(x,y) = \frac{2 x^3 y}{x^6 + y^2} $$ as
$$ | g(a t, b t) | \; \leq \; t^2 \; | a^3 / b | $$ when $b \neq 0,$ but then if $y = \pm x^3$...the directional derivative generalizes to the Gateaux derivative in other settings.</p>