# 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!

• @John I disagree. The question is about mathematical notation and has nothing to do with the site itself. Aug 21 '14 at 18:01
• Some people have a preference to use an upright roman $\mathrm{d}$ as opposed to an italics $d$. This is done to emphasis the fact that $\mathrm{d}$ is an operator (differential). Aug 21 '14 at 18:04
• A possibly interesting consequence of using $\mathrm d$ is that there is less confusion if you decide to use $d$ as a variable: $\int f(d)\mathrm{d}d$. Aug 21 '14 at 18:05
• @alexqwx Gotcha. I'll delete my comments.
– John
Aug 21 '14 at 18:11
• @alexqwx: I've thought about using it. For example in geometric problems where your variable might be interpreted as some kind of a distance, it seems natural to denote it by $d$ and then the need to differentiate it might arise. But yes, the idea is a bit silly, so I usually change notation at that point. Aug 21 '14 at 18:18

$$\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.
• Is writing $$\int f(x) dx$$ rather than $$\int f(x) \mathrm{d}x$$ as erroneous as writing $cos$ instead of $\cos$ (or is it simply a matter of personal preference?)? And out of curiosity, why do you leave a space between the integrand and the $dx$? Aug 21 '14 at 18:04
• The font for the d is a matter of personal choice, though it might be helpful to use the Roman d if there happens to be a parameter $d$ somewhere nearby. The space can be helpful if the $f(x)$ is replaced by something else, especially if it doesn't end with a parenthesis: $\int abcdxdx$ would be really bad compared to $\int abcdx\; {\rm d}x$. Aug 21 '14 at 18:12
• According to ISO standards, the differential operator must be typeset in roman (\mathrm) and have spacing like an operator on the left side with no spacing on the right side. The form f\, \mathrm dx is the proper one. This rule is often neglected but it is still the ISO standard. Aug 21 '14 at 18:36
• @DavidK My entire PhD thesis included $\frac{dy}{dx}$ and $\int f(x)\,dx$. Every paper that was published as a result changed all of the $d$ to $\mathrm{d}$. Aug 21 '14 at 19:49
• I have the same preference as amWhy has (I also use the space). I had thought that the upright $\mathrm d$ was mainly used by physicists/engineers and mathematicians preferred italic $d$, but maybe I'm wrong here. Aug 21 '14 at 19:59
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. • I can confirm on the ISO standard aspect: in a free preview of NEN-ISO 80000-2:2009 which seems to be the Dutch approved verbatim copy of ISO 80000-2:2009, near the beginning of section 3, it says: "Well-defined operators are also printed in Roman (upright) style, e.g.$\textrm{div}$,$\unicode{x3B4}$in$\unicode{x3B4} x$and each$\textrm d$in$\textrm d f / \textrm d x$." Note that the delta character here is Unicode codepoint U+03B4, not U+1D6FF. Aug 21 '14 at 21:13 • Apologies, that comment did not come out right because of the font. I used the correct Unicode codepoint, but apparently to show U+03B4 properly 'upright' in at least my browser, I need to use the Times font, as in \unicode[Times]{0x3B4}:$\unicode[Times]{0x3B4} x$. Aug 22 '14 at 6:07 • Typesetting standards should, if at all, be formulated by the mathematical community as a whole, and not by some self-appointed black box named ISO. E.g., in the sheet quoted by Marnix Klooster, they advocate writing$\sin n\pi$which no mathematician would do. Aug 22 '14 at 8:10 • @ChristianBlatter: What's wrong with$\sin n\pi$? I'm no mathematician, and I don't see anything wrong with it. May 15 '15 at 21:00 • @celtschk In the ISO preview, the symbol$\pi$is shown in upright form rather than in italics. But MathJax apparently does not even make it possible at this time to show an upright$\pi$in a math formula (which just goes to show how much the ISO recommendation has influenced mathematical writing), so I can't show in this comment how the$\pi$in the previous comment was supposed to look. May 15 '15 at 21:56 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. • When I define$f(x):={1\over1+x^2}$then$f$has become a name. Should I then write${\rm f}$instead of$f\,$? – Could you give some reference for this "underlying rule"? Aug 21 '14 at 19:36 • This is interesting. I found myself nodding along until the function part. Cambridge University use bold characters for functions, e.g.$\mathrm{f}(x) = x^2$. According to their typesetting, functions like$\mathrm{f}$,$\cos$,$\ln$- as well as operators - ought to be in roman. Aug 21 '14 at 19:43 • @ChristianBlatter What you say is in agreement with the Cambridge typesetting standard. Functions are in Roman. They also write the imaginary unit as$\mathrm{i}$. Aug 21 '14 at 19:45 • And in Cambridge is there a difference between a specific function$\mathrm{f}(x) = x$and a variable of function type, "let$f\$ be a continuous function"? Aug 21 '14 at 21:12