Continuity of improper integral with a continuous integrand. I am a newbie in analysis and am trying to wrap my head around some continuity/compactness/finiteness concepts.
Let $f(x,y):\mathbb{R}^2\mapsto\mathbb{R}$ be a continuous function in both $x$ and $y$ and define 
$$
F(x) = \int_0^{\infty}f(x,y)dy.
$$
Assume that $F(x)<\infty$ for all $x>0$. Can I show that $F(x)$ is continuous for $x>0$? 
(The original question is different (see details below), but this is the most important part of the proof (thanks to the hint given by Brian))
Given a compact set $\mathcal{X}$ and suppose $0$ is not a member of $\mathcal{X}$. Can I show $\sup_{x\in\mathcal{X}} F(x) <\infty $?
Here are what I tried so far:


*

*Since $\mathcal{X}$ is compact so $\sup_{x\in\mathcal{X}} F(x) = \max_{x\in\mathcal{X}} F(x)$. Moreover, since $F(x)<\infty$ for any $x>0$ and $0\notin \mathcal{X}$, then $\max_{x\in\mathcal{X}} F(x)<\infty$. 
(This proof seems okay to me. But the continuity of $f(x,y)$ is not used anywhere, which makes me a little puzzled).

*Since $f(x,y)$ is continuous function and $F(x)<\infty$ for all $x>0$, then $F(x)$ is a continuous function for any $x>0$ (is this true?). Since $\mathcal{X}$ is compact so $\sup_{x\in\mathcal{X}} F(x) = \max_{x\in\mathcal{X}} F(x)$. The maximization is finite because it is the maximum of a continuous function in a compact set. (This proof does use all given conditions, but the first assessment is not clear to me. Any reference to existing theorem is appreciated.)
Any help is highly appreciated! 
 A: This fails in general. For example, define
$$f(x,y) =\begin{cases}  0, & x\le 1\\ = \frac{1}{1+(y-1/(x-1))^2}, & x>1 \end{cases}$$
Then $f$ is continuous on $\mathbb R^2,$ but $\lim_{x\to 1^+}F(x) = \pi,$ while $F(1) = 0.$
A: I think you need the extra assumption that the integral is uniformly convergent. Altough I do not have a counterexample, the following argument seems to show where this is needed: 
For if we write $\vert F(x)-F(z)\vert \leq \vert \int_0^{M}(f(x,y)-f(z,y))dy\vert +\vert \int_M^{\infty }(f(x,y)-f(z,y))dy\vert$ and let $\epsilon >0$ and then choose $\delta_1 >0$ so that $\vert f(x,y)-f(z,y)\vert <\epsilon $ whenever $d((x,y),(z,y))<\delta_1 .\ $ 
Then in this case, 
$\tag 1\vert \int_0^{M}(f(x,y)-f(z,y))dy\vert\leq M\epsilon$.
Now, $\vert \int_M^{\infty }(f(x,y)-f(z,y))dy\vert \leq \vert \int_M^{\infty }f(x,y)\vert +\vert \int _M^{\infty }f(z,y)dy\vert$.
If the convergence of the integral is uniform we may choose
choose $M$ such that $\tag2\vert \int_M^{\infty }f(x,y)dy\vert<\epsilon $ and $\tag3\vert \int _M^{\infty }f(z,y)dy\vert<\epsilon$.
Take $\delta =\delta_1/2$ and combine $1)$, $2)$, and $3)$ to finish the proof.
If the convergence is not uniform then I do not see how to get $\vert \int_M^{\infty }(f(x,y)-f(z,y))dy\vert< \epsilon $
A: For part 1, only continuous functions are guaranteed to attain their maximum on compact sets.
