finding examples for a non negative and continuous function for which the infinite integral is finite but the limit at infinity doesn't exist Question:
a. Find an example for a non-negative and continuous function s.t. $\int _0^\infty f(x)dx$ is finite but the following limit doesn't exist: $\lim_{x\to \infty} f(x)$.
b. Is it possible that $\int _0^\infty f(x)dx$ is bounded but $f(x)$ is not bounded?
What we did with A:
We suggested the function $|sin(x^2)|$ which has periods that get smaller and smaller until they no longer imply on the sum. But since it's a trig function it doesn't have a determinate limit. Wolfram didn't have the integral value for that func, and we were wondering if it really converges and if it is really a good example.
What we did with B:
We thought about the function: $f(x)=  { x\in \Bbb N },{e^{-x} \notin \Bbb N }$ and we had a disagreement whether f(x) is integrable. I said no because similarly to Dirichlet function, one sum's limit will be 0 while the other one's will be infinite. My partner said that if I find a $\delta<1$ then the definition of Riemann's integral does hold and so this integral is equal to that of $f(x)=e^{-x}$ She was trying to say this functions integral will be 0, but still it won't be bounded. I disagreed. Who's right?
 A: For (b), and therefore (a), let $f(x)=0$ with the following exceptions. For  every positive integer $n$, $f(x)$ climbs linearly from $f(x)=0$ at $x=n-2^{-2n}$ to $f(x)=2^n$ at $x=n$, then falls linearly to $0$ at $x=n+2^{-2n}$. 
The area of the triangle "at" $n$ is $(2^{-2n})(2^n)$, that is, $2^{-n}$, and the sum of the areas of these triangles is $1$.
A: For A: The function $x \mapsto |\sin x^2|$ is not integrable. See Fresnel integrals are not Lebesgue integrable for example.
For B: Assuming that you meant $f(x) = \begin{cases} x, & x \in \mathbb{N} \\
e^{-x}, & x \notin \mathbb{N} \end{cases}$, then $f$ is not continuous, but it is integrable and unbounded. (And yes, the integral of $f$ is the same as the integral of $x \mapsto e^{-x}$.)
Here is a simple example that satisfies all requirements at the same time:
Let $\phi(x) = \max(0, 1-|x|)$. Let $f_n(x) = n\phi(n^3(x-n))$. Note that $\int f_n = \frac{1}{n^2}$.
Let $f=\sum_{n=2}^\infty f_n$. Note that $f(n) = n$ for all $n \ge 2$, $\int f = \sum_{n=2}^\infty \frac{1}{n^2}$, and $f(n+\frac{1}{2}) = 0$ for $n \ge 2$.
Hence $f$ is continuous, unbounded, integrable and has no limit as $x \to \infty$.
