D'Alembert's Principle: Where does $-Q_j$ come from? This is a follow-up question to D'Alembert's Principle and the term containing the reversed effective force.
From the second term of Eq. (1.45)
$$\begin{align*}
\sum_i{\dot{\mathbf{p}}_i \cdot \delta{\mathbf{r}_i}} &=
\sum_i{m_i\ddot{\mathbf{r}}_i \cdot \frac{\partial\mathbf{r}_i}{\partial q_j} \delta q_j}.
\end{align*}$$
Starting from Eq. (1.50), I was able to follow that
$$\begin{align*}
\sum_i{m_i\ddot{\mathbf{r}}_i \cdot \frac{\partial\mathbf{r}_i}{\partial q_j}} &=
\sum_i{\left[ \frac{d}{dt} \left( m_i\mathbf{v}_i \cdot \frac{\partial\mathbf{v}_i}{\partial\dot{q}_j} \right) - m_i\mathbf{v}_i \cdot \frac{\partial\mathbf{v}_i}{\partial q_j} \right]}.
\end{align*}$$
Goldstein substituted the above equation to (1.45) by saying:

... and the second term on the left-hand side of Eq. (1.45) can be expanded to...

By "second term", I understood it to be the very first expression I mentioned above. Therefore this is how I understood Goldstein's writing:
$$\begin{align*}
\sum_i{\dot{\mathbf{p}}_i \cdot \delta{\mathbf{r}_i}} &=
\sum_i{m_i\ddot{\mathbf{r}}_i \cdot \frac{\partial\mathbf{r}_i}{\partial q_j} \delta q_j}\\
&\stackrel{\color{red}{??}}{=} \sum_i\left[ \frac{d}{dt}\left[ \frac{\partial}{\partial\dot{q}_j} \left( \frac{1}{2}\sum_i{m_iv_i^2} \right) \right] - \frac{\partial}{\partial q_j} \left( \frac{1}{2}\sum_i{m_iv_i^2} \right) \color{red}{- Q_j} \right]\delta q_j\\
&= \sum_i{\left[ \frac{d}{dt} \left( \frac{\partial T}{\partial\dot{q}_j} \right) - \frac{\partial T}{\partial q_j} \color{red}{-Q_j} \right] \delta q_j}
\end{align*}$$
I was able to follow
$$\begin{align*}
T &= \sum_i{m_i\mathbf{v}_i} \cdot \partial\mathbf{v}_i\\ 
T &=\frac{1}{2} \sum_i{m_iv_i^2}
\end{align*}$$
But I am at a loss: Where does $\color{red}{-Q_j}$ come from?
 A: General explanation. Similar to Newton's 2nd law, the D'Alembert's principle has both a dynamical and a kinetic term,
$$ 
\sum_i (\mathbf{F}^{(a)}_i - \dot{\mathbf{p}}_i) \cdot \delta \mathbf{r}_i~=~0. \tag{1.45}
$$
On one hand, the dynamical term 
$$\sum_i \mathbf{F}^{(a)}_i \cdot \delta \mathbf{r}_i = \sum_j Q_j \delta q_j \tag{1.48}$$
contains the generalized force
$$Q_j=\sum_i\mathbf{F}^{(a)}_i\cdot \frac{\partial \mathbf{r}_i}{\partial q_j}.\tag{1.49}$$ 
On the other hand, the kinetic term 
$$\dot{\mathbf{p}}_i \cdot \delta \mathbf{r}_i~=~ \sum_j{\left[ \frac{d}{dt} \left( \frac{\partial T}{\partial\dot{q}_j} \right) - \frac{\partial T}{\partial q_j} \right] \delta q_j} $$
contains the kinetic energy $T =\frac{1}{2} \sum_i{m_iv_i^2}$.
Specific explanation. It is true that the third edition of Goldstein wrongly says 

[...] and the $\color{red}{\it second~term}$ on the left-hand side of Eq. (1.45) can be expanded into
$$ \sum_i\left[ \frac{d}{dt}\left[ \frac{\partial}{\partial\dot{q}_j} \left( \sum_i{\frac{1}{2}m_iv_i^2} \right) \right] - \frac{\partial}{\partial q_j} \left( \sum_i{\frac{1}{2}m_iv_i^2} \right) - Q_j \right]\delta q_j. \tag{1.51b} $$

It should have read

[...] and $\color{red}{\it minus}$ the left-hand side of Eq. (1.45) can be expanded into
$$ \sum_i\left[ \frac{d}{dt}\left[ \frac{\partial}{\partial\dot{q}_j} \left( \sum_i{\frac{1}{2}m_iv_i^2} \right) \right] - \frac{\partial}{\partial q_j} \left( \sum_i{\frac{1}{2}m_iv_i^2} \right) - Q_j \right]\delta q_j. \tag{1.51b} $$

The second edition does not have the $-Q_j$ term, so an unfortunate mistake was introduced during the update to the third edition. This is not the first time that I have noticed that the second edition is often more carefully written than the third edition in what concerns old material. (The third edition contains a new chapter 11 about classical chaos.)
References:


*

*H. Goldstein, Classical Mechanics; Chapter 1. 

A: You've misinterpreted what Goldstein states:

and the second term on the left-hand side of Eq. (1.45) can be expanded into

To save confusion for some, it could be better expressed as:

and the second term on the left-hand side of Eq. (1.45) can be expanded, so that Eq. (1.45) becomes>

It looks repetitive, so the authors probably stuck with the current form, relying on the understanding of the student to see what is obviously meant. The relevant equations are
$$\sum_i (\mathbf{F}^{(a)}_i - \dot{\mathbf{p}}_i) \cdot \delta \mathbf{r}_i~=~0. \qquad (1.45)$$ 
$$\sum_i{\mathbf{F}_i \cdot \delta{\mathbf{r}_i}} = \sum_{i,j}{\mathbf{F}_i \cdot \frac{\partial\mathbf{r}_i}{\partial q_j} \delta q_j = \sum_{j}{Q}_j \delta q_j}\qquad (1.48)$$
The second term in equation (1.45) is therefore expanded as in (1.48) and then combined with the expansion for the first term $\mathbf{\dot p}_i\cdot\delta\mathbf{r}_i$ elsewhere
,  to give
$$\sum_j\left[ \frac{d}{dt}\left[ \frac{\partial}{\partial\dot{q}_j} \left( \sum_i{\frac{1}{2}m_iv_i^2} \right) \right] - \frac{\partial}{\partial q_j} \left( \sum_i{\frac{1}{2}m_iv_i^2} \right) - Q_j \right]\delta q_j$$
Note (1.45) is multiplied by -1 so the signs in the expression derived elsewhere for $\mathbf{\dot p}_i\cdot\delta\mathbf{r}_i$ remain the same, hence the $-Q_j$ term rather than $Q_j$. The outer summation is over $j$ and not $i$ as you've put down.
There's a link for correctons to this book if you're convinced you're right, http://astro.physics.sc.edu/goldstein/ although in this case it looks as if it's a misinterpretation on your part.
A: It should be 
$$\begin{align*}
\sum_i{ (\dot{\mathbf{p}}_i-\mathbf{F}_i) \cdot \delta{\mathbf{r}_i}} &=
\sum_{i,j}{(m_i\ddot{\mathbf{r}}_i-\mathbf{F}_i) \cdot \frac{\partial\mathbf{r}_i}{\partial q_j} \delta q_j}\\

&= \sum_{i,j}\left[ \frac{d}{dt}\left[ \frac{\partial}{\partial\dot{q}_j} \left( \frac{1}{2}\sum_i{m_iv_i^2} \right) \right] - \frac{\partial}{\partial q_j} \left( \frac{1}{2}\sum_i{m_iv_i^2} \right) - Q_j \right]\delta q_j\\

&= \sum_{i,j}{\left[ \frac{d}{dt} \left( \frac{\partial T}{\partial\dot{q}_j} \right) - \frac{\partial T}{\partial q_j} -Q_j \right] \delta q_j}
\end{align*}$$
So read it again.
