# Establishing when a certain function is Riemann-/Lebesgue integrable

I happened upon the following integration exercise. I don't know if it would count as standard in measure theory, but it seems interesting, and I am wondering how best to approach it.

Let $r \in \mathbb{R}$. For which values of $r$ is the following function from $(0,1] \rightarrow \mathbb{R}$ (1) Riemann integrable in the improper sense or (2) Lebesgue integrable:

$$y^r \sin(1/y).$$

For (1), I was thinking that an effective argument will require integration by parts and L'Hopital's Rule in tandem, but I am a little rusty in using these tools (it's embarassing!); perhaps the Riemann-Lebesgue lemma will factor in too. Unfortunately, I don't have such a "knee-jerk response" in mind for (2), since Lebesgue integration is something new that I haven't fully grappled with yet. Any assistance a visitor to the site cares to give would be appreciated! Thanks.

-
I don't see why the Riemann-Lebesgue lemma should factor in. What do you mean specifically? (Especially since the RL lemma is a statement where the hypothesis requires the function to be integrable.) – Willie Wong Mar 2 '12 at 9:17

Since $|y^r\sin(1/y)|\le y^r$, the integral is absolutely Riemann integrable if $r>-1$ (in the improper sense if $-1<r<0$ ). For these values of $r$, it is also Lebesgue integrable.
To see what happens when $r\le-1$, it is convenient to make the change of variable $y=1/t$, which transforms the integral into $$\int_1^\infty t^{-(r+2)}\sin t\,dt.$$ This is integrable in the improper Riemann sense if and only if $-2<r\le-1$, and is not Lebesgue integrable for any $r\le-1$.
Thank you very much for responding, and your answer is quite nice! I will make sure I really understand certain details to tackle similar problems down the road. Just for clarification, by "For these values of $r$,..." you are referring to $r > -1$ and not the parenthetical item? – Alexandre Mar 2 '12 at 9:30
Just to note that the comparison test is valid because $y^r\sin(1/y)$ is continuous, and hence by Lebesgue's criterion is Riemann integrable on $[-\epsilon,1]$ for all $\epsilon > 0$. The comparison test guarantees that in the limit $\epsilon \to 0$ converges. – Willie Wong Mar 2 '12 at 10:06
@ Alexandre Yes, I refere to $r>-1$. – Julián Aguirre Mar 2 '12 at 13:28