I am writing about first-order and second-order quantities. Should I put one hyphen, as in
"first and second-order",
or two, as in
"first- and second-order".
Or should I do something else?
The Guardian and Observer Style Guide offers and explanation on when to use the hyphen and when not to. If I can simplify it here (I assume anyone can read it for themselves at the link), they say hyphens tend to add clutter to the text and they are unnecessary where the meaning would be clear either way.
(That being said, I have the habit of using them for compound adjectives like the ones you gave in your examples.)
They do give an example where (they say) hyphens should be used with short compound adjectives (e.g., "one-tonne"). It's not clear to me why, unless there is some possible ambiguity that can arise. The give an example of this sort of ambiguity in the following quoted headline:
which is also unfortunately formatted, so as to compound its lack of clarity.
To summarize with respect to your specific question, either way is acceptable, but according to the style guide cited above, no hyphens would be preferable.