Example of a function $f$ such that $f\cdot r\in L^2$ and $f'\cdot r\in L^2$ but $f'\cdot r^2\not\in L^2$ Let $\newcommand{\R}{\mathbb R}\R_+\overset{\text{Def.}}=[0,\infty[$. I am looking for an explicit example of a smooth function $f:\R_+\to\R$ such that all of the following hold:

*

*$f(r)\cdot r\in L^2(\R_+)$;

*$f'(r)\cdot r \in L^2(\R_+)$;

*$f'(r)\cdot r^2\color{red}{\not\in} L^2(\mathbb R_+)$.

I have tried an Ansatz of the type $f(r)=(r+1)^{a}$ for some $a\in\mathbb R\setminus\{0\}$, however, in that case, if $f(r)\cdot r\in L^2(\R_+)$, then $a<-2$ and $$f'(r)\cdot r^2 = a (r+1)^{a-1}\cdot r^2,$$
which is contained in $L^2(\R_+)$.

Hint: Consider interpolating between $0$ and $r^a\sin(r^b)$, some appropriate $a,b$ and appropriate subdomains of $\mathbb{R}_+$.
