50
$\begingroup$

From reading answers here, I've noticed that some people write integrals as $\int dx \; f(x)$, while other people write them as $\int f(x)\;dx$.

I realize that there is no mathematical difference between the two notation forms, but was wondering why some people choose the first method over the second. Is there some place in higher maths that it becomes beneficial to write the differential first?

(I, personally, have always used the second method, just because I was taught that way...)

$\endgroup$
9
  • $\begingroup$ For the first time, I saw this way of using notation in @Ron Gordon's neat answers. I asked him. He noted that, it was used in Optic problems. :-) $\endgroup$
    – Mikasa
    May 10, 2013 at 13:29
  • 4
    $\begingroup$ You all have given great answers before I could chime in - and thank you @BabakS.! It makes me feel great that there are great answers to this question that are not mine. If I had a dollar (rupee, pound, ruble, euro) for every time I answered this on M.SE, I'd be able to quit my job and really spend some serious time on M.SE. $\endgroup$
    – Ron Gordon
    May 10, 2013 at 13:42
  • 1
    $\begingroup$ @GEdgar my post isn't meant to complain... but simply seeking understanding on why certain people write it that way. I'm always looking for ways to improve my own math ability, including ways to reduce mistakes; if writing differentials that way serves as a reminder to prevent mistakes (especially in higher math, as it's easier to mess up the more complex problems get), then I would certainly try that style. $\endgroup$
    – apnorton
    May 10, 2013 at 15:54
  • 3
    $\begingroup$ @GEdgar: well, you didn't have to bold the "higher maths" bit to stress my mathematical inferiority ;-) Seriously, I do think about diff forms, etc., and I don't use this notation in those cases in which it makes no sense. $\endgroup$
    – Ron Gordon
    May 10, 2013 at 21:55
  • 1
    $\begingroup$ Related question on Phys.SE: physics.stackexchange.com/q/200378/2451 $\endgroup$
    – Qmechanic
    Jul 1, 2016 at 8:29

4 Answers 4

47
$\begingroup$

When you have a lot of integrals, particularly with limits, it can be very helpful at times to be able to tell at a glance which integral is over which variable.

$$\int_0^1 \int_2^3 f(x,y) \; \mathrm d x \mathrm d y$$

This is not particularly readable or clear, especially when $f$ is lengthy and there are more nested integrals etc. I could also imagine it being misinterpreted.

By contrast,

$$\int_0^1\mathrm d y \int_2^3 \mathrm d x \; f(x,y)$$

makes it very clear what is going on. The only price you pay is possible ambiguity about where the integral ends, but this is easier to make clear with formatting and less of an issue anyway.


Edit: It also just occurred to me that the second notation ties in better with the syntax of an operator. That is, if one thinks of $\int_0^1 \mathrm d x$ as being an operator, taking a function to its integral, it's more natural to have the whole operator together in one lump. Think of how one changes $$\frac {\partial f}{\partial x}\to \frac{\partial}{\partial x} f$$

$\endgroup$
7
  • 3
    $\begingroup$ (+1) There is no ambiguity so long as you provide consistent notation all along - i.e., you don't use variables of integration outside the integral, etc. $\endgroup$
    – Ron Gordon
    May 10, 2013 at 13:40
  • 5
    $\begingroup$ This ambiguity isn't mathematical but in human reading - it might make it harder to parse the above if one doesn't initially spot the $y$ lurking deep within $f$, as one might assume the $y$ integral factorized off, as the notation is suggestive. Similarly if one just wrote $f$ with no arguments. As I say, it's less of an issue though! $\endgroup$ May 10, 2013 at 13:46
  • 7
    $\begingroup$ BTW bullseye for the operator observation. This is very much used in Physics, ESP quantum mechanics and, yes, optics. $\endgroup$
    – Ron Gordon
    May 10, 2013 at 21:58
  • 1
    $\begingroup$ Good god, I swear that iOS put that there. Yes, we telepaths use this notation too. $\endgroup$
    – Ron Gordon
    May 10, 2013 at 22:16
  • 1
    $\begingroup$ Tbh, I have more difficulty reading the second notation at glance. $\endgroup$
    – Galen
    Nov 1, 2021 at 0:54
11
$\begingroup$

In my opinion, the symbol $\int \mathrm{d}x\, f(x)$ is simply bad notation. On the contrary, when dealing with (at least) double integrals, the advantage of $$\int_{a}^b \mathrm{d}x \int_{c}^{d} \mathrm{d}y\, f(x,y)$$ is that it perfectly fits into the stategy of Fubini's theorem. Imagine that you are computing a double integral: you say "Ok, now I fix the $x$ variable and integrate with respect to the $y$ variable." It is natural to write down $x$ first.

This said, I think that $$\int_{a}^{b} \left( \int_{c}^{d} f(x,y)\, \mathrm{d}y \right) \mathrm{d}x$$ should be used in printed papers and books.

$\endgroup$
7
  • 6
    $\begingroup$ No, I think it is bad. It is misleading, first of all. $\endgroup$
    – Siminore
    May 10, 2013 at 14:58
  • 6
    $\begingroup$ You haven't explained why it's "bad" or "misleading". I'm curious why you feel this. $\endgroup$ May 10, 2013 at 15:26
  • 5
    $\begingroup$ Because another popular notation is $\int_\Omega d\mu = \int_\Omega \chi_\Omega \, d\mu=\mu(\Omega)$, so that $\int_a^b dx = b-a$. $\endgroup$
    – Siminore
    May 11, 2013 at 10:28
  • 27
    $\begingroup$ If I write $\int_a^b dx \int_c^d f(x,y)\, dy$, I might understand $(b-a) \int_c^d f(x,y)\, dy$... $\endgroup$
    – Siminore
    May 14, 2013 at 16:55
  • 10
    $\begingroup$ Late comment: the product-of-integrals interpretation of that expression would mean that $x$ appears outside of the integral in which $x$ is being integrated. $\endgroup$
    – anon
    Aug 19, 2013 at 12:35
3
$\begingroup$

Writing the thing with a differential first its useful in some contexts, by example in measure theory when $K:\mathcal{X}\times \mathcal{F} \to \mathbb{R}$ is a transition kernel, that is when $(\Omega ,\mathcal{F})$ is a measurable space and the map $A\mapsto K(x,A)$ is a measure for every $x\in \mathcal{X}$ and $x\mapsto K(x,A)$ is measurable for every $A\in \mathcal{F}$, then its common to define $$ Kf(x):=\int f(\omega )K(x,d\omega) $$ where above the "differential" notation says what is the measure of integration. Thus its more useful to write the integrals with the measure before the function to have the same order as in the LHS, so it becomes a useful mnemothecnic rule to write $$ Kf(x)=\int K(x,d\omega)f(\omega ) $$ Similarly, if $\mu$ is a measure we can define the measure $$ \mu K(A):=\int K(x,A)\mu(dx) $$ where again its more useful to write the measure before the kernel in the integral, that is $\int \mu(dx)K(x,A)$ instead. Thus from here its easy to remember what means things like $MK$, where $M$ is another transition kernel, or $\mu Kf$, that is $$ MK(x,A)=\int M(x,d\omega)K(\omega ,A),\quad \mu K f=\int \mu(dx)K(x,d\omega)f(\omega ) $$ I saw this use in the book on probability theory of Erhan Çinlar.


Also a justification for the use in more classical contexts, as a Riemann integral, is that the integration of continuous functions is a linear map, such that we can define $$ Tf:=\int_{a}^b f(x) dx $$ But then in some sense it seems more cleaner to write $$ Tf=\int_{a}^b dx\, f(x) $$ so in some sense $\int_{a}^b dx\,\cdot\, $ represents the linear map $T$.

$\endgroup$
2
$\begingroup$

Apart from the idea that $\int_a^b$ should be next to the $\mathrm{d}x$ to make clear we mean $\int_{x=a}^{x=b}$, or the fact that $\int_a^b\mathrm{d}x$ is a linear operator that deserves a symbol, there are some ways such placement protects us from our own mistakes:

  • One advantage of writing $\mathrm{d}x$ first is you won't forget it, which we mustn't do if we have to juggle multiple variables, e.g. due to a substitution. Sometimes, you have to include quite a few terms or factors in the integrand.

  • If you're handwriting an integral (which may sound antiquated, but every lecture attendee knows it isn't), writing $\mathrm{d}x$ second carries the further risk of running out of room. You could avoid that by not writing the $\mathrm{d}x$ until you're done, but then you might forget it.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .