Step 1: Understanding the Concept:
When an electric dipole is placed in a uniform electric field, it possesses potential energy due to its orientation. Work must be done by an external force to rotate the dipole against the torque exerted by the electric field.
Step 2: Key Formula or Approach:
The potential energy ($U$) of a dipole in an electric field is given by:
\[ U = -pE \cos\theta \]
The work done ($W$) is the change in potential energy:
\[ W = \Delta U = U_{final} - U_{initial} \]
Step 3: Detailed Explanation:
1. Initial Potential Energy ($U_1$): At $\theta_1 = 0^\circ$,
\[ U_1 = -pE \cos(0^\circ) = -pE(1) = -pE \]
2. Final Potential Energy ($U_2$): At $\theta_2 = 180^\circ$,
\[ U_2 = -pE \cos(180^\circ) = -pE(-1) = +pE \]
3. Work Done ($W$):
\[ W = U_2 - U_1 = pE - (-pE) = 2pE \]
Step 4: Final Answer
The work done in rotating the dipole is $2pE$.