Attractive and Repulsive Forces

This is a picture of the Practice Exam Solutions.

How do I know that this Force is repulsive? If I solve for the force: $$F=-\frac{\delta U(r)}{\delta r}=-\frac{\delta}{\delta r}\frac{a}{r^2}=-a\frac{\delta}{\delta r}r^{-2}=-a(-2)[r^{-3}]=\frac{2a}{r^3}$$

The force looks attractive because as the two particles get closer, the force becomes stronger (similar to gravity):$$F \propto \frac{1}{r^3}$$

But the correct answer is repulsive. Can somebody tell me how I can determine an attractive from repulsive force?

Given $U(r)=\frac{a}{r^2}$ we see that for fixed $a \gt 0$, the only way to decrease $U$ is to increase $r$ (that's why the sign of $a$ is important here!), so a state where the two masses are further apart has less energy and is therefore preferred, leading to the interpretation of a repulsive potential.
If you insist on interpreting the force, just think of one of the masses as fixed and as $r$ pointing in the direction of the other mass. Since you correctly get that $$F \propto \frac{1}{r^3}$$ you see that there is no relative sign, therefore the force is pointing towards the same direction as $r$, which also means that the other mass will move away from the first one. So, also here we get that the force is repulsive.
• @JessL Yeah, like I said, I find it easier just to check how I can make $U$ as small as possible, since the interpretation of $F$ always needs some sense of direction. – Wojciech Morawiec Mar 19 '17 at 2:04
By looking at the sign of $U(r)$. If infinite is taken as the reference point, the force is attractive if $U(r)<0$ and repulsive if $U(r)>0$
Actually the correct conclusion depends on the magnitude and direction of the force. Your expression $F=2a/r^3$ should really be $$\vec F=\frac{2a}{r^3}\hat r$$ showing the force points away from any one mass, and hence is repulsive.