Notation problem in integration: write $dx$ or ${\mathrm{d}}x$?

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!


Solution 1:

$$\int f(x) dx$$ is just fine, though some people, as a matter of preference, write $$\int f(x) \mathrm{d}x$$ (perhaps to indicate that we are not taking the product of $d$ and $x$.) Just as there are folks, like me, who like to insert space between the function and $dx$: E.g. $$\int f(x)\,dx$$

But rest assured that the appearance of the integral sign makes the use of plain-old $dx$ pretty self-evident.

Solution 2:

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.