I must construct a function $f: [0,\infty) \to \mathbb{R}$, but not Lebesgue-Integrable, but $f$ in $[0,c)$ is Riemann-integrable and $$\lim_{c \to \infty} \int_{0}^{c} f(x)dx$$ exists.
What I am thinking is: $f(x)=1/x$ on $\mathbb{R}$ and $f(x)=c, x=0$, which is measurable but it is not Lebesgue-Integrable because both sides of Lebesgue integral positive and negative must be finite.
Problem is that limit of this function doesn't exist since it is $\infty$, so it diverges and so it is not Riemann-Integrable.
What should I do? Thanks in advance!