2.8.3 Potential Energy of a Dipole in an External Field
The work done by an external torque, turning the dipole slowly without angular acceleration, is stored as the potential energy of the system.
There is a freedom in choosing the angle where the potential energy U is taken to be zero. A natural choice is to take theta nought equal to pi by 2.
The potential energy of a dipole moment p in a uniform electric field E is minus p dot E, that is, minus p E cos theta.
At theta nought equal to pi by 2, the work done against the external field in bringing plus q and minus q are equal and opposite and cancel out.
When the field turns, the dipoles lose potential energy in aligning along its new direction. This energy is released by the substance in the form of heat.