Consider the following expressions:
a) $\;\dfrac{1}{x} - \dfrac{x}{x^2+1}$
b) $\;\dfrac{1}{x} + \dfrac{-x}{x^2+1}$
c) $\;\dfrac{1}{x} - \dfrac{x}{1 + x^2}$
d)$\;- \dfrac{x}{1 + x^2} + \dfrac{1}{x} $
They are all equivalent. In the book I'm reading, they are seemingly arbitrarily using all four forms above. As a programmer, it annoys me a lot because I think consistency is important and this book's authors are not being consistent.
So my question is if there are any math conventions which states which of the above four alternatives is the best to use? It there aren't and the answer is it depends, then what does it depend on?
Surely someone must have thought about this "problem" before?
E.g: No one would consider writing $x^2 + 1 + 2x^7 + x - x^3$. Instead, everyone thinks it should be $2x^7 - x^3 + x^2 + x + 1$. Why can't that thinking be applied to expressions other than polynomials?