The interaction potential energy (U) between two point dipoles p1 and p2 separated by a distance r is given by:
U=4πϵ0r31[p1⋅p2−3(p1⋅r^)(p2⋅r^)]
In the axial configuration where both dipoles are collinear and point along the line joining them (i.e., p1∥p2∥r):
p1⋅p2=p1p2, p1⋅r^=p1, p2⋅r^=p2
U=4πϵ0x31[p1p2−3(p1)(p2)]
U=−4πϵ0x32p1p2
F=−dxdU
F=−4πϵ0x46p1p2 (the −ve sign indicates attraction)