Integration by parts to derive $d\langle x \rangle / dt$ I am reading "Introduction to Quantum Mechanics" by David Griffiths and I am having trouble understanding part of a derivation of $\frac{d\langle x\rangle }{dt}$ in section 1.5 - Momentum - of the text.
The Author gives EQN 1.29 as 
$$
\frac{d\langle x\rangle }{dt} =  \frac{i \hbar}{2m} \int _{-\infty} ^{\infty} x \frac{\partial }{\partial x} \left[ \frac{\partial \Psi}{\partial x}\Psi^* - \frac{\partial \Psi^*}{\partial x}\Psi \right] dx
$$
He then does integration by parts, saying as a foot note,

Under the integral sign, then, you can peel a derivative off one factor in a product, and slap it onto the other one - it'll cost you a minus sign, and you pick up  boundary term.

and gets EQN 1.30:
$$
\frac{d\langle x\rangle }{dt} = -\frac{i\hbar}{2m} \int _{-\infty} ^{\infty} \left( \Psi^* \frac{\partial \Psi}{\partial x} - \frac{\partial \Psi^* }{\partial x}\Psi \right) dx
$$
He repeats an integration by parts to derive 1.31:
$$
\frac{d\langle x\rangle }{dt} = -\frac{i\hbar}{m} \int _{-\infty} ^{\infty} \Psi^* \frac{\partial \Psi}{\partial x} dx
$$
I am not sure how this is integration by parts. In all the integration by parts I have ever done, two terms have been yielded. He mentions a second term saying:

I used the fact that $\frac{\partial x}{\partial x} = 1$, and threw away the boundary term, on the ground that $\Psi$ goes to zero at $\pm$ infinity.

I saw this equation posted on Stack Exchange for a similar question:
$$
\int\left(\frac{\partial}{\partial x}f(x)\right)\ g(x)\ \text dx=\int\ f(x)\left(-\frac{\partial}{\partial x}g(x)\right)\ \text dx,
$$
in How to prove dp/dt = -dV/dx? Quantum mechanics
Is this true generally? How is this integration by parts? Why can we throw away the other term? How does integration by parts lead to 1.31?
 A: Perhaps its a little clearer if you shorten the contents of the brackets (and lets drop the constants too):
$$\frac{d\langle x\rangle }{dt} \propto \int _{-\infty} ^{\infty} x \frac{\partial }{\partial x} \left[ \ldots\right] dx$$
$$ = \int _{-\infty} ^{\infty} \frac{\partial }{\partial x} \left(x \left[ \ldots\right] \right)dx  - \int _{-\infty} ^{\infty} \frac{\partial x}{\partial x}  \left[ \ldots\right] dx$$
The first term is the boundary term, which as you discussed with ACuriousMind, goes to zero. More importantly, the derivative on $[\ldots]$ has shifted to $x$ on the second term
Where of course $\frac{\partial x}{\partial x} = 1$
And hence the result:
$$\frac{d\langle x\rangle }{dt} = -\frac{i\hbar}{2m} \int _{-\infty} ^{\infty} \left( \Psi^* \frac{\partial \Psi}{\partial x} - \frac{\partial \Psi^* }{\partial x}\Psi \right) dx$$
Edit:
To the last question: No, that statement is not true in general. Only sometimes are we allowed to throw away the boundary term (it depends on the physical situation, not the maths).
Do you remember how integration by parts comes about? From the product rule:
$$
\frac{d(fg)}{dx} = \frac{df}{dx}g + f\frac{dg}{dx}
$$
Then rearrange:
$$\frac{df}{dx}g = \frac{dfg}{dx} - f\frac{dg}{dx}$$
Then integrate both sides:
$$\int_{x_0}^{x_1}\frac{df}{dx} g dx = \int_{x_0}^{x_1}\frac{d(fg)}{dx}dx - \int_{x_0}^{x_1} f\frac{dg}{dx}dx$$
Where the derivative and the integral on the first term of the RHS cancel to become
$$\int_{x_0}^{x_1}\frac{df}{dx} g dx = fg |_{x_0}^{x_1}- \int_{x_0}^{x_1} f\frac{dg}{dx}dx$$
What we're saying is that we know $fg$ at $x_0$ and $x_1$ (ie the boundaries) is zero, so we drop that term. Then the net result is we've switched the derivative from f to g, at the expense of a sign change.
A: The derivative of $x f(x)$ is $x f'(x) + f(x)$, and here you're integrating $k \int_{-\infty}^\infty dx ~ x ~ f'(x)$ for some constant $k$, and some complicated function $f$. When you integrate this by parts, you raise $f' dx$ and lower $x$ to find:$$k \int_{-\infty}^\infty dx ~ x ~ f'(x) = k \left[x ~f(x)\right]_{-\infty}^{~\infty} - k \int_{-\infty}^\infty dx ~ f(x).$$Griffiths is merely adding that he expects $f(x)$ to go to zero faster than $1/x$, since that would tend to make the system hard to normalize. So the first term tends to zero at both boundaries and you're just left with the second term.
