The defining property of a conductor is that charges within it are free to move in the presence of any applied electric field. In principle, we could determine the equilibrium configuration of charges in a conductor by integrating the equations of motion of all the particles as they move under their combined electric fields. However, this is quite computationally expensive, and inefficient, since we only care about the final configuration, now how the charges got there.
We expect that the charges will redistribute themselves in such a way
that no electric field exists within the conductor. Another way to
say this is that the charges will move so as to minimize the total
electrostatic potential of the system, subject to the constraint that
the charges are confined to the conductor. We have restated the
problem in terms of a variational principle -- the charges
distribute themselves so as to minimize some quantity, subject to some
constraint. In fact, the variational principle that the system
minimizes the total electrostatic potential energy in some volume
In two dimensions, the total potential is
Note that the above approach is still very inefficient. You can probably think of several simple modifications that will make the program run much faster!
2015-02-17