TITLE: Function defined through integral not continuous
QUESTION [5 upvotes]: I came across a problem which I can't resolve. Let
$$
f(x,y) = \begin{cases} 
x^2 \sin(1/x)\,e^{-x^2 \lvert y \rvert} &\text{ if } x \neq 0 \\ 
0 &\text{ if } x = 0. \end{cases} 
$$
This function is continuous and $y \mapsto f(x,y)$ is integrable with
$$
g(x) := \int_\mathbb{R} f(x,y) \, dy 
= \begin{cases} 
2\sin(1/x) &\text{ if } x \neq 0 \\ 
0 &\text{ if } x=0. \end{cases}
$$
Now $g$ is not continuous in $0$. I would expect this to be the case however. It seems to me that if $(-\varepsilon,\varepsilon)$ is a neighbourhood of $x=0$, I would define
$h(y) = \varepsilon ^2 e^{-\varepsilon ^2 \lvert y \rvert}$
and I think here
$\lvert f(x,y) \rvert \leq h(y)$ for all
$x \in (-\varepsilon,\varepsilon)$ and all
$y \in \mathbb{R}$ and $h$ is integrable.
However, from dominated convergence, $g$ should be continuous if such $h(y)$ exists. I don't see where I miss something. Any help is appreciated.

REPLY [2 votes]: We clearly have that for all $(x,y)\in\Bbb{R}^2$,
\begin{align}
|f(x,y)|\leq x^2e^{-x^2|y|},
\end{align}
and if $|x|\leq \epsilon$ then we can bound this by $\epsilon^2e^{-x^2|y|}$. But, you can't get rid of the $x^2$ in the exponential; for that you need a positive lower bound on $|x|$ (due to the minus sign). So, I don't see why $h$ is a dominating function. In fact, assuming your calculation for $g$ is correct (feels like there are some factors of $\pi$ or $\sqrt{\pi}$ or $\frac{\pi}{2}$ missing) what this shows is there is no dominating integrable function for $f$ near $x=0$, because if there was, you could apply DCT to deduce $g$ is continuous.