I am looking for a function $f:[a, +\infty)\to\mathbb{R}$ with $a\in\mathbb{R}$ such that $f(x)$ satisfies all the following conditions:
- $f(x)$ is Riemann Integrable on $[a,m]$ for all $m>a$;
- $\lim_{x\to +\infty}f(x)$ does not exist;
- $f(x)$ is an unbounded function on $[b, +\infty)$ for all $b>a$;
- $\int_{a}^{+\infty}f(x)dx\in\mathbb{R}$.
Here's my attempt:
Let
$f(x)=\begin{cases}n&\mbox{ if }x\in \mathbb{N}\\ 0&\mbox{ otherwise}\end{cases}$
and $[a, +\infty)=[1, +\infty)$
$f(x)$ is Riemann integrable over $[1, m]\mbox{ for all }m>1$, because is a continuous function with a finite number of discontinuities;
$\lim_{x\to +\infty}f(x)$ does not exists, in fact I can consider two sequences $(x_n)_{n\in\mathbb{N}}$ and $(y_n)_{n\in\mathbb{N}}$ such that
$\forall n\in\mathbb{N}, \ x_n\in\mathbb{N}\mbox{ and }\lim_{n\to +\infty}x_n=+\infty$
$\forall n\in\mathbb{N}, \ y_n\notin\mathbb{N}\mbox{ and }\lim_{n\to +\infty}y_n=+\infty$
and I can prove that $\lim_{n\to +\infty}f(x_n)=+\infty\mbox{ but }\lim_{n\to +\infty}f(y_n)=0$.
- $f(x)$ is unbounded over $[b,+\infty)\mbox{ for all }b>1$, in fact $\lim_{n\to +\infty}f(x_n)=+\infty$.
- Now I think, but it's just a congecture, that $\int_{1}^{+\infty}f(x)dx=0$, is this true? How can I explain this?
Thank you.