# Derivation of Potential Energy for Multi-Particle Systems

AcidRainLiTE
I am reading 'Classical Dynamics: A Contemporary Approach' by J. Jose, and I am confused about a step in the author's development of potential energy for a system of many particles.

He begins by writing down a term equivalent to the total change in kinetic energy of the system:

$$\sum_i \int_{x_{i0}}^{x_{if}}\left( \bf{F_i} + \sum_j{\bf{F_{ij}}}\right) \cdot d\bf{x_i}$$

where Fi is the net external force acting on particle i and Fij is internal force exerted by particle j on particle i.

He examines this integral in two parts: that due to the external forces and that due to the internal forces. After dealing with the first term (external forces), he then says that if the order of summation and integration over i is changed, the second term becomes

$$\int_{x_{i0}}^{x_{if}} \sum_{i,j}{\bf{F_{ij}}} \cdot d\bf{x_i}.$$

It looks like he brought the summation over i inside the integral, but this does not make any sense because the index i still persists in the bounds of the integral (which is outside the summation). Or to put it another way, in the original integral (with the summation over i outside the integral), the bounds are different in each integral in the summation, so you cannot just combine all the integrals into a single integral. What am I missing here?