The problem could be related to a few things, such as numerical stability and the presence of multiple local minima.
For numerical stability, you didn't tell us the typical ranges of your variables. But for very large or small values, 1/x and -x behave very differently. I expect that your solution might be a large or small number.
For multiple local minima, the fmincon algorithm can take different paths dependinig on many problem inputs, and both results can be true local minima and yet differ.
Without more information, these general optimization characteristics are the best I can offer.
MATLAB mathematical toolbox documentation