When is it prudent to argue against a suggested revision to a journal paper?
From what I know (I am a mathematician with some publishing experience), it is perfectly okay to argue against a referee's demand, as soon as 


you do it politely, and you explain your arguments in a non-conflictual way;
you are ready to delay the final acceptance of your paper;
you are ready to either ultimately  accept the demand if the referee does not change her mind and the editor backs her up, or to get your paper ultimately rejected.


In the case you describe, I do not think that explaining your point of view would have turn the editor's mind right away. In a similar situation (a referee asked for some terminology to be changed into something more standard), with my coauthor we argued with success (our argument was that to date, no terminology existed for what we discussed, let alone standard terminology).

Added in edit: I forgot an important point; in many situation, including yours, you can find a middle ground that may be considered an acceptable answer to her query by the referee, and that avoid departing too much from your initial intention. For example, in your case, you can propose to add a precise reference giving the derivation.