Generalized forces in Richard Fitzpatrick's Newtonian Dynamics In Richard Fitzpatrick's Newtonian Dynamics, page 128, generalized forces are defined as
\begin{equation} \tag{9.6}
  Q_i = \sum_{j=1}^{\mathcal{F}} f_j \cdot \frac{\partial x_j}{\partial q_i}.
\end{equation}
Here, $q_i$ are generalized coordinates, $x_j$ are Cartesian coordinates, and $f_j$ are the Cartesian components of forces acting on particles.
He proceeds to say that in conservative systems
\begin{equation} \tag{9.7}
  f_j = - \frac{\partial U}{\partial x_j}
\end{equation}
and concludes that
\begin{equation} \tag{9.8}
  Q_i = -\frac{\partial U}{\partial q_i}.
\end{equation}

I can see how the $\partial x_j$ cancel each other out, but what happened to the sum from equation 9.6? Shouldn't there be a constant factor of $\mathcal{F}$ in equation 9.8?
 A: $$Q_i = \sum_{j=1}^{\mathcal{F}} f_j \cdot \frac{\partial x_j}{\partial q_i}$$
$$\implies Q_i = -\sum_{j=1}^{\mathcal{F}} \frac{\partial U}{\partial x_j} \cdot \frac{\partial x_j}{\partial q_i}$$
$$\implies Q_i = -\sum_{j=1}^{\mathcal{F}} \frac{\partial U}{\partial x_j} \cdot \frac{\partial x_j}{\partial q_i}$$
$$\implies Q_i = - \frac{\partial U}{\partial x_1} \cdot \frac{\partial x_1}{\partial q_i} - \frac{\partial U}{\partial x_2} \cdot \frac{\partial x_2}{\partial q_i} - \frac{\partial U}{\partial x_3} \cdot \frac{\partial x_3}{\partial q_i} -\ldots   $$
$$\implies Q_i = - \frac{\partial U}{\partial q_i}$$
Note that, for any $j$, $$\frac{\partial U}{\partial x_j} \cdot \frac{\partial x_j}{\partial q_i}\not =\frac{\partial U}{\partial q_i}$$
According to multivariate calculus, the $x_i$'s represent the components of U along those directions and hence the sum is the contribution of those components of U in n-dimensional space.
A: The numerator and denominator in partial derivatives don't cancel out simply. Keep that in your mind!
You should recall the chain rule in partial derivatives.
The formal answer to you question may be:
If $U=U(x_1,\cdots,x_f)$, and each $x_f$ is a function of generalized coordinates $(q_1,\cdots,q_g)$, the potential could be expressed as follows
$$U=U[x_1(q_1,\cdots,q_g),\cdots,x_f(q_1,\cdots,q_g)]$$
then
$$\frac{\partial U}{\partial q_i}=\frac{\partial U}{\partial x_1}\frac{\partial x_1}{\partial q_i}+\cdots+\frac{\partial U}{\partial x_f}\frac{\partial x_f}{\partial q_i}$$
More detailedly, the total derivative of $U$ is 
$$d U=\frac{\partial U}{\partial x_1}dx_1+\cdots+\frac{\partial U}{\partial x_f}dx_f$$
so you must consider every $x_i$ when you want to differentiate $U$ with $q_i$ as other $q$ except $q_i$ fixed.
At the end of the answer, I recommend to use Jacobian in the partial derivatives when you have to cope with so many coordiantes. It will be clearer. 
