A discontinuous function with smooth sections

308 Views Asked by At

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?

2

There are 2 best solutions below

1
On

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.

1
On

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$.