The potential energy U between two molecules as a function of the distance X between them has been shown in the figure. The two molecules are
Attracted when x lies between B and C and are repelled when x lies between A and B
F=−(dUdx) ⇒F= - slope of U−x graph.
In the region BC slope of the graph is positive ⇒ Force is negative ⇒ attraction.
In the region AB slope of the graph is negative ⇒ Force is positive ⇒ repulsion.