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?