I am searching for $f : U\rightarrow \mathbb R $ defined in an open square $U$ in $\mathbb R^2$ so that $(0,0) \in U$, $f$ is not continuous at $(0,0)$, for each $x$ the function $y\mapsto f(x,y)$ is smooth ($C^\infty$) and for each $y$ the function $x \mapsto f(x,y)$ is smooth $(C^\infty$). If this is not the appropriate place for the question, please tell me where to ask for it?
- 53,687
-
My guess is that if you choose some function $\varphi$ such that $\varphi(x)=0$ for $x\le0$ and $\varphi(x)\ge1$ for $x\ge1$, which is also smooth (i.e., something similar to bump function the something like $$f(x,y)= \begin{cases} 0,&x,y\le0\ \varphi(\frac xy),& 0<x\le y\ \varphi(\frac yx),& 0<y\le x \end{cases}$$ might work. – Martin Sleziak Jun 02 '16 at 10:57
-
It is easy to find classical examples in classical undergraduate textbooks that work. Have you checked Principles of Mathematical Analysis by Rudin or, say, Advanced Calculus by Buck? Probably you can find it in Wikipedia as well, although I haven't checked. – user43208 Jun 02 '16 at 11:39
-
1This question seems related: Is there a discontinuous function on the plane having partial derivatives of all orders? (Although not the same. It also asks about mixed partial derivatives.) – Martin Sleziak Jun 04 '16 at 07:22
2 Answers
What about $f(x, y) = \frac{x y}{x^2 + y^2}$ if $(x, y) \neq (0, 0)$, and $f(0, 0) = 0$? It's clear that $x \mapsto f(x, y)$ is smooth if $y \neq 0$, and of course for $y = 0$ as well since $f(x, 0)$ is identically zero. By symmetry, $y \mapsto f(x, y)$ is smooth for each fixed $x$.
This function is discontinuous at $(0, 0)$ since the limit as $(x, y)$ approaches $(0, 0)$ along the line $y = x$ is $1/2$.
- 8,289
-
Another way to see that this function is not continuous (and also to get some intuition what this function looks like) is to notice that that $f(r\cos t,r\sin t)=\frac{\sin2t}2$. – Martin Sleziak Jun 17 '16 at 14:46
Let me elaborate a bit on the suggestion I made in the above comment.
Let $\varphi \colon \mathbb R\to\mathbb R$ be any smooth function such that $\varphi(x)=0$ for $x\le 0$ and $\varphi(x)=1$ for $x\ge1$. I.e., something similar to one half of bump function.
Let us define $$f(x,y)= \begin{cases} 0,&x,y\le0\\ \varphi(\frac xy),& 0<x\le y\\ \varphi(\frac yx),& 0<y\le x \end{cases}$$
In the other words, on each section we streched the function $\varphi$ in such way that the value $1$ is attained at $x=y$.
This function is not continuous, since $\varphi(0,0)=0$ and $\varphi(x,x)=1$ for any $x>0$.
The only points where the existence of partial derivatives is not clear are the points where $0<x=y$, since the function is defined differently on the opposite sides of the line $y=x$.
Let us have a look at partial derivative w.r.t. $x$. Clearly we have $$\frac{\partial^k \varphi(\frac xy)}{\partial x^k}=0$$ because of the properties of the function $\varphi$.
On the other hand we get $$\frac{\partial\varphi(\frac yx)}{\partial x} = -\varphi'(\frac yx) \frac y{x^2}$$ and for $y=x$ we get $\frac{\partial\varphi(\frac yx)}{\partial x} = 0$, since $\varphi'(1)=0$.
If we calculate higher derivatives using Leibniz rule we will have in each summand $k$-th derivative $\varphi^{(k)}(\frac yx)$ for some $k>0$. This implies that for $x=y$ the whole sum is equal to zero.
- 53,687
-
I will mention that the example $f(x,y)=\frac{xy}{x^2+y^2}$ from another answer is a least vaguely similar to this one in the sense that for $\varphi(t)=\frac{t}{1+t^2}$ we have $f(x,y)=\varphi(y/x)=\varphi(x/y)$ for $x,y>0$. To see this, it suffices to check that $\frac{xy}{x^2+y^2}=\frac{\frac yx}{1+\left(\frac yx\right)^2}=\frac{\frac xy}{1+\left(\frac xy\right)^2}$ – Martin Sleziak Jun 04 '16 at 05:32