# integration by parts of $x f(x)f'(x)$

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).

-
My guess is from splitting up the integral after integration by parts. You should be able to add $\int xf(x)f'(x)dx$ to both sides. – Mike Apr 1 '12 at 21:58
@Mike: I think this is Sri Pot's idea, no? – daniel Apr 1 '12 at 22:16
Looks to be. I don't believe his answer was there when I posted though. – Mike Apr 1 '12 at 23:06

## 4 Answers

Let $I$ equal your original integral. Then when you substitute $u,v,$ and $dv$ you get a $-I$ on the right hand side! When you bring the $-I$ to the left hand side , we have $2I$. From there onwards you know what to do...

-
Both the answers are fine and I am accepting this because it's a technique I like...and I can't accept both. Thanks! – daniel Apr 1 '12 at 22:01

$\dfrac{f(x)^2}{2}$ is the antiderivative of $f'(x)f(x)$.

If $dv=f'(x)f(x)\;dx$ then $v= \dfrac{f(x)^2}{2}$.

-
Your answer appeared later than Julius' and Sri Pot's. Now I see that the computer says you (and Ray) entered your answers earlier. Does this happen often? I try to accept the first best answer (if I recognize it), but this had not happened to me before. – daniel Apr 1 '12 at 22:20
I haven't noticed it happening. – Michael Hardy Apr 1 '12 at 22:29

$$u=x\quad v=\frac{f(x)^2}{2}$$

-

The problem with your idea is that
$$v \;du=f(x)\left(xf'(x)+f(x)\right)\;dx=\left(xf(x)f'(x)+f(x)^2\right)\;dx$$

Try the simpler $u=\dfrac {f(x)^2}2$ and $v=x$.

-
Do we disagree? The first term on the right side of vdu goes to zero by the given, doesn't it? – daniel Apr 1 '12 at 22:13
@daniel: Let's do the complete derivation : $I=\int u\;dv= [x f(x)^2]-\int v\;du=[x f(x)^2]-\int \left(xf(x)f'(x)+f(x)^2\right)\;dx=-I-\int f(x)^2\;dx$. So that Sri Pot's answer is correct. The other change of variable proposed is simpler and more direct (and more important much less confusing!). – Raymond Manzoni Apr 1 '12 at 22:32
Agree totally--yours, Julius', Michael's are the most straightforward. Just wanted make sure my acceptance of Sri Pot's idea was not improvident. As I mentioned above, two answers appeared before yours, but yours was marked as earlier. I can't explain this...I will have to pause before accepting. – daniel Apr 1 '12 at 22:44
@daniel: no problem Daniel and Sri Pot's answer was the best concerning your specific change of variable (anyway my answer was the third only...). Cheers, – Raymond Manzoni Apr 1 '12 at 22:54