TITLE: Notation problem in integration: write $dx$ or ${\mathrm{d}}x$?
QUESTION [12 upvotes]: I have a question. When I write the integral of a generic function $f(x)$, do I have to write $$\int f(x) \color{red}dx$$ or $$\int f(x) \color{red}{\mathrm{d}}x \quad ?$$ Why?
Thank you!

REPLY [10 votes]: As pointed out in another answer, 
the notation $\int \ldots\mathrm dx$ is consistent with the typesetting of other
mathematical symbols, since $\mathrm d$ is the name of a specific operator.
There is also an ISO standard governing these things, which purportedly
specifies $\int \ldots\mathrm dx$ as the correct notation,
but a copy of the latest standard, which apparently is
ISO 80000-2:2009, costs $158$ Swiss francs (about US\$$173$ according
to today's exchange rate) and I don't have ready access to one as far as I know.
So it would seem that technically, you should write $\int \ldots\mathrm dx$,
but hundreds of years of convention, countless textbooks and reference books,
and millions of people who have been accustomed to seeing $\int \ldots dx$
for most of their lives (and who have never even considered that there was likely
an ISO standard governing the notation, as I had not until today)
all say that as a practical matter you do not have to write $\int \ldots\mathrm dx$.
If you do write $\int \ldots\mathrm dx$ and someone complains that it should
have been $\int \ldots dx$, however, now you have the resources to back up your choice.