Step 1: Use potential energy of a dipole.
The potential energy of a dipole making angle \(\theta\) with a uniform field is \(U(\theta) = -pE\cos\theta\). The energy required to rotate it equals the change in potential energy, \(W = U(\theta_2) - U(\theta_1)\).
Step 2: Compute the dipole moment.
With \(q = 1\times10^{-5}\) C and arm \(2a = 0.02\) m,
\(p = q(2a) = 1\times10^{-5} \times 0.02 = 2\times10^{-7}\) C·m.
Step 3: Energy at each position.
At \(\theta_1 = 0^\circ\): \(U_1 = -pE\cos 0^\circ = -pE\).
At \(\theta_2 = 180^\circ\): \(U_2 = -pE\cos 180^\circ = +pE\).
Step 4: Change in energy.
\(W = U_2 - U_1 = pE - (-pE) = 2pE\).
\(W = 2 \times (2\times10^{-7}) \times (1\times10^{5})\).
Step 5: Evaluate.
\(W = 2 \times 2\times10^{-2} = 4\times10^{-2}\) J.
\[\boxed{W = 0.04\ \text{J}}\]