This is related to Baby Rudin, Chapter 6, Exercise 7
Suppose $f$ is a real function on $(0, 1]$ and $f \in \mathscr{R}$ on $[c, 1]$ for every $c>0$. Define \begin{equation}\label{7.0} \int_0^1 f(x)\, dx = \lim_{c \to 0} \int_{c}^1 f(x) \,dx \end{equation} if this limit exists (and is finite). Construct a function $f$ such that the above limit exists, although it fails to exist with $|f|$ in place of $f$.
There are a couple of answers to this question online and they all seem to be related to series. Is it possible to come up with a simple example that does not involve the concept of series? If so, can someone please also provide an explanation as to how their proposed example satisfies the question statement.
The integrand should be highly oscillating.
Try
$$f(u)=\frac{\sin(1/u)}{u}$$ over the interval $[0,1]$. The change of variables
$$u=1/x$$
will give you a well known improper integral that converges conditionally ( converges as an improper Riemann integral, but the the integrand with absolute value is not integrable).