# How to compute work needed to build a configuration of charges

Suppose an alignment of four charges in the vertices of a square. The first pair on one diagonal has positive charge and the other negative charge, all charges are of the same absolute value. length of a is specified. How do you compute the Work necessary to assemble this configuration if all the charges are infinitely distant in the beginning. I presume you integrate the Force somehow. Also, don't you need to expend energy every second to stop the charges from approaching each other? If there is an explained solution on the internet, link will be greatly appreciated. Thanks in advance.

• If we can find an example on the internet, so can you. Googling your title I got your Qn as #1 and the following as #2 : physicspages.com/2011/10/23/work-and-energy-point-charges – sammy gerbil Jul 4 '16 at 21:21
• I realized it had to be somewhere on the web, I just did not really know what keywords to look for, since I do not study physics in English. There are no articles explaining this well enough in Czech. But yes, I understand the down-voting. – user122712 Jul 7 '16 at 13:55

You can compute the integrals $W=\int\vec F\cdot d\vec r=q\int E\cdot d\vec r$ for each charge $q$ you bring from infinity, where $\vec E$ is the electric field generated by the other charges present and then add them all together. On the other hand, since electrostatic fields are conservative the work done is independent of the path, so it is conservative and you can assign a potential energy to it, $U=qV=-W$, where $V$ is the potential generated by the others charges. You just sum all the potential energies among the pairs of charges and you get the work done.