This is a step in a proof I thought I understood.
Given that $\lim_{|x|\to \infty} |x\cdot f(x)| = 0$, show
\int_R x f(x) f'(x) \; dx = \left.x\cdot \frac{[f(x)]^2}{2}\right|_{-\infty}^\infty - \int_R \frac{[f(x)]^2}{2}\;dx = - \int_R \frac{[f(x)]^2}{2} \; dx
My best guess was to take
u = x f(x),\quad du = x f'(x)+ f(x),\quad dv = f'(x)dx,\quad v = f(x).
But then where does the factor of $1/2$ come from?
Thanks for hint(s).