Why is the external torque not taken as -$pE\sin\theta$ in the derivation of the Potential energy due to an external field So in the derivation of the Potential energy of a dipole due to an external field, we consider a dipole with charges $q_1= +q$ and $q_2= –q$ placed in a uniform external electric field. We know that in a uniform electric field, the dipole experiences no net force but it experiences a torque $τ$ given by
$$\vecτ = \vec p×\vec E$$
which will tend to rotate it. Now here's the tricky part. Suppose an external torque $τ
_{ext}$ is applied in such a manner that it just neutralises this torque and rotates it in the plane of paper from angle $θ_0$ to angle $θ_1$ at an infinitesimal angular speed and without angular acceleration. The amount of work done by the external torque
$$W= \int \:τ\left(\theta \right)d\theta =\int \:\left(pEsin\theta \right)d\theta $$
$$W=pE\left(cos\theta_0 -cos\theta_1 \right)$$
if $\theta_0=\pi/2$ then and $\theta_1=\theta$
$$W=-pEcos\theta$$
My concern is if the torque due to an external electric field (the conservative force) is given by $\:pEsin\theta \:$, and if an external torque is applied to neutralise this torque, shouldn't its value be $-\:pEsin\theta \:$ in the derivation. I know the final answer is correct but I am also sure my 2 assumptions that (1) the external torque is negative of the conservative force and that (2) potential energy is work done by the external force in setting up a configuration (in this case rotating the dipole) are both correct. I think rotational dynamics is where I got something wrong
 A: Yes you are absolutely right in stating that the external torque $τ_{ext}$ will have a sign opposite to that of the torque exerted by the electric field. However note that the expresion $$τ = 2aqEsin\theta = pEsin\theta$$ is only indicative of the magnitude of the torque applied by the field on the dipole. Consider the conventional diagram accompanying such derivations (for simplicity we take d = 2a):

It is clear that the torque due to the field causes a clockwise rotation of the dipole, which by definition is taken as negative. Alternatively you can use the standard definition for external torque: $$ \vec τ = \vec r× \vec F $$ taking the origin as the midpoint of the line joining the two charges to obtain $$ \vec τ = 2(-asin\theta .qE)\hat k$$
From here on as $τ_{ext} = -τ$, the negative signs cancel and the derivation follows suit.
Also as a sidenote, it is never a good idea to mention the absolute value of the potential energy of any system. The absolute value is physically meaningless, as only the change in potential energy is physically meaningful. Hence, try not to use the assumption that the intial angle is at 90 degrees and instead just use: $$ΔU_{E} = pE\left(cos\theta_0 -cos\theta_1 \right)$$
Hope this helps.
