Potential energy & entropy of three particles Let me first say that I am not a physicist, but I am trying to make a simulation on my computer and I have the following question.

Let's consider that we have three free charges that somehow can change their charge in time.
$$
Q_1(t) = \sin(\omega t) \\
Q_2(t) = \begin{cases}1 & \mod(t,2)=1 \\ -1 & \mod(t,2)=0\end{cases} \\
Q_3(t) = 2\cos(2\omega t)
$$
where $t$ is the time measured in seconds. We say that all particles have same mass $m$. We also consider gravitational potential energy to be negligible.
I am trying to find 


*

*potential energy in time

*entropy variation in time


I understand that this might not be solvable analytically, but as I said, I am trying to simulate this on a computer. I have the forces over time, but I really don't want to integrate them spatially to find the potential energy, as in my simulations, the particles can count thousands. Could you point me out an easier way, or a simplification that I could try? 
About the entropy, do you think this has no sense as the system if far away from equilibrium, or for any other reason? If you think this is a valid thing to measure, could you tell me any ideas on how to do it?
 A: Correct me if I am wrong, but a potential energy can only be determined for a conservative force field, which means that the force can only depend on position. So, because the charges vary with time you can not determine the potential energy.
If the velocity is small compared to the oscillation, such that the displacement during the common period of the charges is small compared to their distances to each, you could use the time average of the forces to get some sort of effective potential. This effective potential between $Q_1$ and $Q_3$ will always be zero. With $Q_2$ it is a bit unclear, since with the current definition for it is undefined for the most part. If you meant $Q_2$ to be a square wave then there could be a potential depending of $\omega$.
I am not sure what you want with entropy, since from the equation you gave you can formulate a differential equation, which will have a deterministic solution.
A: I'll make this an answer, even though it is more of a drawn out comment.
As I mentioned as a comment, computing the potential energy is trivial. If you want speed, you'll probably want to look at fast methods for long-range interactions. The link takes you to state-of-the-art libraries and methods, but any introductory book on computational statistical mechanics (or molecular dynamics) will explain Ewald sums. This is to say that I don't think you will be able to analytically calculate the stuff you want, but these methods should cope well with thousands of particles (or maybe hundreds if you want real-time performance). 
The entropy is tricky for several reasons. First of all, it is difficult to compute in general from simulations. Also, I don't know if you even can in general compute absolute entropies. So what we are left is the relative entropy between two states. What are the two states? Herein lies the next problem: entropy is an equilibrium quantity. So, say you want to compare the entropies between t = 1 and t = 2. This is to say that you want systems that are equilibriated with the charges that would occur at t = 1, and t = 2. To this effect you can do, for example, thermodynamic integration. This is an expensive computation.
A: The entropy can be written as (discrete form)$$S=\sum_i p_ilog(p_i)$$
So you must identify what the uncertainty in your problem comes from, you would think that you have (in principle) exact deterministic equations for the evolution of these particles, so there is no uncertainty with respect to that.
If you have unknown initial conditions then you could certainly then compute entropies because the exact relations for the trajectories would be propagating the uncertain initial conditions. Then maybe you could infer what the charge distribution looks like at some moment in time or something, that distribution would have an entropy associated with it.
