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

1.3k Views Asked by At

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!

4

There are 4 best solutions below

9
On

$$\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.

7
On

The underlying rule (which is often violated) is that variables should be in italic, but names should not. In ${\rm d}x$, $x$ is a variable which could be exchanged with any other letter, but ${\rm d}$ is the name of the differential operator and cannot be exchanged with any other letter.

For the same reason, a general function $f$ is in italic, but the particular functions $\sin$, $\cos$, $\log$ are not. Similarly, numerals are names of particular numbers, and are therefore not italicized.

7
On

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.


Update for $2023$: For some time now, I personally have been writing $\int \ldots \mathrm dx$ in my posts here. Also $\dfrac{\mathrm d}{\mathrm dx}.$ But I will sometimes use the older notation when responding to someone who seems to prefer it.

1
On

From ISO 80000-2:2019(E) (second edition, 2019-08, p. 1):

Variables such as $x$, $y$, etc., and running numbers, such as $i$ in $\sum_{i}x$ are printed in italic type. Parameters, such as $a$, $b$, etc., which may be considered as constant in a particular context, are printed in italic type. The same applies to functions in general, e.g. $f$, $g$.

An explicitly defined function not depending on the context is, however, printed in upright type, e.g. $\sin$, $\exp$, $\ln$, $\Gamma$. Mathematical constants, the values of which never change, are printed in upright type, e.g. $\mathrm{e}=2,718\,281\,828\,\dots$; π $=3,141\,592\,\dots$; $\mathrm{i}^{2}=-1$. Well-defined operators are also printed in upright type, e.g. $\mathbf{div}$, δ in δ$x$ and each $\mathrm{d}$ in $\mathrm{d}f/\mathrm{d}x$.

So, if we've set $e=10$, then $e\mathrm e =27.182\,818\,\dots$.

If we've set $i=2$, then $(i \mathrm i)^2 =-4$.

If we're using $d$ as a variable, then $\int d \,\mathrm d d = d^2/2+C$.


A comment to an answer here asks,

When I define $f(x):=\frac{1}{1+x^2}$ then $f$ has become a name. Should I then write $\mathrm f$ instead of $f$?

My answer based on (my interpretation of) the above ISO convention: No, because the function $f$ can vary depending on the context.

(As noted in the comments there, Cambridge deviates from the ISO convention and sets functions $\mathrm f$, $\mathrm g$ in upright Roman. But not in bold as claimed in one comment.)