The electric potential energy of a system of point charges is the work done to assemble the system of charges from infinity. It is given by the formula:
\[
U = \sum_{i<j} \frac{k_e q_i q_j}{r_{ij}},
\]
where:
- \( U \) is the total electric potential energy of the system,
- \( k_e = 9 \times 10^9 \, \text{N} \cdot \text{m}^2/\text{C}^2 \) is Coulomb's constant,
- \( q_i \) and \( q_j \) are the charges,
- \( r_{ij} \) is the distance between charges \( i \) and \( j \).
In the given figure, we have a system of four point charges arranged at the corners of a square. The charges are:
- \( +q \) at \( (0,0) \),
- \( -q \) at \( (a,0) \),
- \( -q \) at \( (a,a) \),
- \( +q \) at \( (0,a) \).
The distances between each pair of charges are either \( a \) (side of the square) or \( \sqrt{2}a \) (diagonal of the square).
Step 1: Calculate the potential energy due to the interactions between charges on adjacent sides (distance \( a \)):
- Interaction between \( +q \) and \( -q \) at \( (0,0) \) and \( (a,0) \):
\[
U_1 = \frac{k_e (+q)(-q)}{a} = -\frac{k_e q^2}{a}.
\]
- Interaction between \( -q \) and \( +q \) at \( (a,0) \) and \( (a,a) \):
\[
U_2 = \frac{k_e (-q)(+q)}{a} = -\frac{k_e q^2}{a}.
\]
- Interaction between \( +q \) and \( -q \) at \( (a,a) \) and \( (0,a) \):
\[
U_3 = \frac{k_e (+q)(-q)}{a} = -\frac{k_e q^2}{a}.
\]
- Interaction between \( -q \) and \( +q \) at \( (0,a) \) and \( (0,0) \):
\[
U_4 = \frac{k_e (-q)(+q)}{a} = -\frac{k_e q^2}{a}.
\]
Thus, the total potential energy due to adjacent charges is:
\[
U_{\text{adj}} = 4 \left( -\frac{k_e q^2}{a} \right) = -\frac{4 k_e q^2}{a}.
\]
Step 2: Calculate the potential energy due to the interactions between charges on the diagonals (distance \( \sqrt{2}a \)):
- Interaction between \( +q \) at \( (0,0) \) and \( -q \) at \( (a,a) \):
\[
U_5 = \frac{k_e (+q)(-q)}{\sqrt{2}a} = -\frac{k_e q^2}{\sqrt{2}a}.
\]
- Interaction between \( -q \) at \( (a,0) \) and \( +q \) at \( (0,a) \):
\[
U_6 = \frac{k_e (-q)(+q)}{\sqrt{2}a} = -\frac{k_e q^2}{\sqrt{2}a}.
\]
Thus, the total potential energy due to diagonal charges is:
\[
U_{\text{diag}} = 2 \left( -\frac{k_e q^2}{\sqrt{2}a} \right) = -\frac{2 k_e q^2}{\sqrt{2}a}.
\]
Step 3: Total electric potential energy of the system:
Now, the total electric potential energy of the system is the sum of the contributions from adjacent and diagonal interactions:
\[
U_{\text{total}} = U_{\text{adj}} + U_{\text{diag}} = -\frac{4 k_e q^2}{a} - \frac{2 k_e q^2}{\sqrt{2}a}.
\]
Thus, the total electric potential energy of the system is:
\[
U_{\text{total}} = -\frac{4 k_e q^2}{a} - \frac{2 k_e q^2}{\sqrt{2}a}.
\]
This is the total electric potential energy of the system of point charges arranged in a square.