Examples of $\lim_{m \to \infty} \int_0^m f(x)dx$ exists but $\lim_{m \to \infty} \int_0^m |f(x)|dx$ doesn't exist？ 
I finally thought some examples for this, which is the following:
For the first one, can I use $f(x)=\sin x$?
For second one, can I use $f(x)=\frac{1}{\epsilon}$when $x \in (0, \frac{\epsilon}{2})$; $f(x)=-\frac{1}{\epsilon}$when $x \in (\frac{\epsilon}{2},\epsilon)$?
but I am not sure if it is right. Could someone kindly help me look at this? Thanks!
 A: for a.
since $\sum \dfrac{1}{k} \to \infty$ and $\sum\dfrac{1}{k}(-1)^k < \infty$, you can use piecewise constant function.
for b. I doubt if the function exists. since $\int_{N}^{\infty}|f| > |\int_{N}^{\infty} f|$, if integral of $|f|$ converges, then integral of $f$ must converge too.
A: No: for the first one, the integral
$$ \int_0^m \sin{x} \, dx = \cos{m}-1, $$
which does not tend to a limit as $m \to \infty$ for general $m$ (since the cosine oscillates without decreasing).
Consider instead something like
$$ f(x) = \begin{cases} \frac{(-1)^n}{n} & n-1 \leqslant x < n \end{cases}, $$
and then the integral becomes
$$ \int_0^m f(x) \, dx = \sum_{k=1}^{\lfloor m \rfloor} \frac{(-1)^k}{k} + (m-\lfloor m \rfloor) \frac{(-1)^m}{m}, $$
($\lfloor m \rfloor$ being the largest integer that does not exceed $m$) although I may have the top index slightly incorrect.
This works since the last term tends to zero, and the alternating harmonic series converges, but the harmonic series $\sum_{n=1}^{\infty} 1/n$ does not.
For the second, your answer should not depend on $\varepsilon$. Depending on how you have defined the nonexistence of limits, you can create a function so that the integral of the absolute value does not exist at all, so it can't have a limit. Substituting $y=1/x$ makes this easier to think about: then the integral is
$$ \int_{1/\varepsilon}^{\infty} f(1/y) \frac{dy}{y^2}, $$
for which a modification of the previous example will work.
