Does this limit due to the improper integral exist? Let $g: (a,b) \rightarrow \mathbb{R}^+$ be continuous such that for all $a<c<b$ we have $\int_c^b g(x) dx = \infty$ and $f: (a,b) \rightarrow \mathbb{R}^+$ be continuous too such that $\int_a^b f(x)g(x) dx < \infty.$
Now I was wondering if this means that $\lim_{x \rightarrow b} f(x) = 0$?
You may use the type of integral that suits you best.
If anything is unclear, please let me know.
 A: I also invert the roles of $a$ and $b$ and let $(a,b)=(0,1)$ and $g(x)=\frac{1}{x}$; for $n\ge 5$ consider all subintervals of $(0,1)$ of the form $(\frac{1}{n+1},\frac{1}{n})$; inside each such interval choose a subinterval $(a_n,b_n)$ of length $\frac{1}{2^n}$ (which is possible since $n^2+n\le 2^n$). Now consider the function $c$ defined on $(0,1)$ by setting $c(x)=1$ if $x\in (a_n,b_n)$ for some $n\ge 5$ and $c(x)=0$ otherwise. Now $c(x)\ge 0$ and $\int_0^1c(x)g(x)dx\le \sum\frac{n+1}{2^n}<\infty$. However, $c$ is not continuous; so replace it by a continuous function $f$ satisfying $0\le f\le c$ which can be defined, for example by setting $f(a_n)=0=f(b_n)$, $f(\frac{a_n+b_n}{2})=1$ and interpolating linearly between $f(a_n)$, $f(\frac{a_n+b_n}{2})$ and $f(b_n)$ for all $n\ge 5$ and setting $f(x)=0$ if $x$ is outside the $(a_n,b_n)$. Then $f$ is also continuous and has the properties needed to be a counterexample.
Edit: by setting $f(\frac{a_n+b_n}{2})=n$ for all $n$ in question and defining anything else in the same fashion one can even achieve that $f$ is unbounded (e.g. $\limsup_{x\to 0+} f(x)=\infty$) but still satisfies $\int_0^1 f(x)g(x)dx<\infty$.
