This question already has an answer here:

I have seen something like this before: $\int \frac{dx}{(e+1)^2}$. This is apparently another way to write $\int \frac{1}{(e+1)^2}dx$.

However, considering this statement: $\int\frac{du}{(u-1)u^2} = \int du(\frac{1}{u-1}-\frac{1}{u}-\frac{1}{u^2})$. On the left side, $du$ is moved, If I had to evaluate an integral that is written in this way, how would I expand it into the usual $\int f(x)dx$ form?

(From the comments) Is this truly a product and if not why is it commutative?

marked as duplicate by GEdgar, Community Jun 29 '16 at 16:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 11
    Writing $dx$ or $du$ at the end is just convention. It is truly a product, so you can write it in whichever order you want. – Arthur Jun 28 '16 at 19:21
  • 5
    @TheBro21 yes. It is just that some people like to have the $du$ at the start. I think it is common in engineering or physics or somthing. – quid Jun 28 '16 at 19:26
  • 18
    @Arthur In the standard way that calculus is developed in Real Analysis courses, isn't $dx$ just a piece of notation? $dx$ is not a number, in the standard approach. So I don't think it's correct to say "it is truly a product". – littleO Jun 28 '16 at 19:26
  • 7
    Plus not all product are commutative. – quid Jun 28 '16 at 19:28
  • 17
    @TheBro21 it is rather misleading to think about this in terms it is a product and therefor you can change the order. For one thing $\int_{0}^1 \int_{0}^1 f(x,y) dx dy$ is not necessarily the same as $\int_{0}^1 \int_0^1 f(x,y) dy dx$ – quid Jun 28 '16 at 19:33

10 Answers 10

up vote 6 down vote accepted

The meaning is the same.

Placing dx at the beginning of the integral has advantages when you have nested integrals:

$$\int_{x_0}^{x_1} dx \int_{y_0}^{y_1} dy \int_{z_0}^{z_1} dz \; f(x,y,z)$$

Otherwise, you need lots of parentheses in order to know which variable is integrated in which interval, and becomes less legible:

$$\int_{x_0}^{x_1} \left( \int_{y_0}^{y_1} \left( \int_{z_0}^{z_1} f(x,y,z) \; dz\right) dy\right)dx$$

  • 5
    I do not agree that one needs the parenthesis. What is true is that it is harder to see at a glance which variable is integrated in which interval. The parenthesis are irrelevant to this though. – quid Jun 29 '16 at 0:11
  • 3
    @quid You can remove the parentheses and have the convention that the leftmost differential belongs to the rightmost interval, and so on. But it wouldn't be obvious. – Oriol Jun 29 '16 at 0:18
  • 2
    What you refer to as convention is the only way to parse the expression. It becomes more clear if one approaches it from the inside out. The innermost integral must correspond to the innermost differential, since you cannot have a different $d$ inside the integral. What's more with the notation you propose one may need extra parenthesis to indicate where the integral ends. But again I agree that there are advantage to your notation. – quid Jun 29 '16 at 7:43
  • 1
    @quid You don't need parentheses to indicate the end of a $\int dx\,f(x)$ style integral: It extends to the end of the term (all operations of multiplicative precedence and above, but not addition), the same as with $\sum_n f(n)$, which has no right bracket either. Note that as I mention in another comment, there is thus no difference in parenthesis usage either way, because both $\int f(x)+g(x)\,dx$ and $\int dx\,f(x)+g(x)$ is incorrect (well, the second is valid but has a free $x$ which is probably not what you want). – Mario Carneiro Jun 29 '16 at 21:16
  • 1
    @quid Yes, although I knew in advance the reaction I would have (just call the other guy misusing the notation, just as I did with the other answerer). But I will reduce the severity of my proscription from "incorrect" to "sloppy notation", because there is no real possibility of confusion in reasonable context. – Mario Carneiro Jun 29 '16 at 21:53

The notation $\int f(x) \, dx $ and $\int dx \; f(x)$ mean the exact same thing.

  • 7
    I would interpret $\int dx f(x)$ as $\left( \int dx \right) \cdot f(x)$. Maybe this differs from country to country? – Olba12 Jun 28 '16 at 22:49
  • 4
    @Olba12: Then $x$ is a bound variable on the left and a free variable on the right. (Also, then the integral is just 1, which nobody would write as $\int dx$.) – Deusovi Jun 28 '16 at 23:14
  • @Olba12 I find the notation slightly unusual too, but I am given to understand it is used in some applied areas. I linked a post on the question where this is discussed. – quid Jun 28 '16 at 23:31
  • @Deusovi $x$ is only bound if the integral is definite. – asmeurer Jun 28 '16 at 23:55
  • 1
    Actually, my best opinion is that this notation is trying to do something along the lines where $x$ is a specific object rather than a variable -- e.g. the sort of thing you'd see in differential geometry ($x$ is a coordinate function) or in commutative algebra ($x$ is a specific element of a polynomial ring). – Hurkyl Jun 29 '16 at 2:47

Others have explained the syntax and semantics of this notation, but no one seems to have addressed why it is a good thing to do...

The notation "$\dfrac{\mathrm{d}}{\mathrm{d}u}$" is used for the differentiation operator (a gadget which takes functions as input and produces functions as output). This is the "differentiate with respect to $u$ operator". Typical uses: \begin{align} \dfrac{\mathrm{d}}{\mathrm{d}x}&(x^2) = 2x \\ \dfrac{\mathrm{d}}{\mathrm{d}x}&\,x^2 = 2x \\ \dfrac{\mathrm{d}}{\mathrm{d}x}&\,f(x) = f'(x) \\ \dfrac{\mathrm{d}}{\mathrm{d}x}&\,f(u) = 0 \\ \dfrac{\mathrm{d}x^2}{\mathrm{d}x}& = 2x \text{.} \end{align} Except for the last example usage, these read left-to-right as "the derivative with respect to $x$ of ...". (This is unfortunate because the last form is the one that most visibly echoes a difference quotient.) So you know at the outset which variable is being varied. This has the downside of not unambiguously indicating where the argument to the operator ends (but only in the second, third, and fourth, and sadly most common, forms above).

The notation "$\int \mathrm{d}u$" is used for the antidifferentiation operator. (And the obvious extension is used for the integration operation.) This is the "antidifferentiate with respect to $u$ operator". Typical uses: \begin{align} \int \mathrm{d}x (2x) = x^2 + C \\ \int \mathrm{d}x 2x = x^2 + C \\ \int 2x \,\mathrm{d}x = x^2 + C \text{.} \end{align}

Similar comments apply as above: Except for the last example usage, these read as "the antiderivative with respect to $x$ of ...". That is, you know which variable is the variable of integration before you see any part of the argument of the operator. The second form has the same defect as the most common differentation form: it is unclear where the argument of the operator ends. The last form inserts the argument into the middle of the operator, so the entire argument is recited before one knows which operator is acting on it, but has the advantage of echoing the form of the Riemann sum (more relevant to integrals than to antiderivatives) and indicating where the argument ends.

You will also see this notation in iterated integrals. When this notation is used, it is to remind the reader that the integrals are iterated: $\int_a^b \mathrm{d}x \, \int_c^d \mathrm{d}y \ x + y^2$ says to pass $x+y^2$ through the "integrate with respect to $y$ on $[c,d]$" operation before passing the result through the "integrate with respect to $x$ on $[a,b]$" operation. (Note that the closedness and openness of the endpoints of those intervals is irrelevant.) This may seem pedantic until one learns that the value of an iterated integral can depend on the order in which the integrals are taken and the operator "$\int \int \mathrm{d}x \, \mathrm{d}y$" is only defined if it does not matter in which order the integration occurs.

Further, for iterated antiderivatives, the order seriously matters, as becomes evident in solving PDEs: \begin{align} \int \mathrm{d}x &\int \mathrm{d}y (x+y^2) \\ &= \int \mathrm{d}x (x y + \frac{y^3}{3} + C_1(x)) \\ &= \frac{x^2 y}{2} + \frac{x y^3}{3} + C_2(y) + \int \mathrm{d}x(C_1(x)) \text{,} \end{align} where $C_1(x)$ and $C_2(y)$ are arbitrary functions of $x$ and $y$, respectively. ($C_1$ comes in because $$\dfrac{\mathrm{d}}{\mathrm{d}y} \left( x y + \frac{y^3}{3} + C_1(x) \right) = x+y^2 + 0 = x+y^2 \text{.} $$ $C_2$ is an arbitrary function of $y$ for the analogous reason.) However, if we reverse the order of antidifferentiateion, the remaining integrated function depends only on $y$, not on $x$. Since not every arbitrary function is integrable, the two resulting solution sets need not be the same. Order seriously matters.

  • $\int_a^b \mathrm d x \int_c^d \mathrm d y\,x+y^2$ does not mean integrating $x+y^2$ over some intervals. By order of operations, the $y^2$ is not bound to the integrals in any way: multiplication goes before addition. – tomsmeding Jun 29 '16 at 10:00
  • 1
    @tomsmeding : And that's why the middle sample notations are lousy: There is no multiplication occurring here. These are implicit function invocations, so do not appear in the elementary order of operations. This follows the same syntactic rules as lambda functions: "the body of an abstraction extends as far right as possible". It would be great if everyone disambiguated this notation with parentheses, but the overwhelming majority do not. – Eric Towers Jun 29 '16 at 15:13
  • I desperately want to upvote this answer because you are mostly right; when the integration information is on the left, it's because we are viewing the integral as an operator. Your diversion into non-commutitivity is fairly unhelpful and incomplete though. Just say that operators don't generally commute and link to commutation. Neither integrals nor derivatives generally commute. A final small point: the biggest drawback of operator notation is that there is some ambiguity about where the integrand (or whatever is being differentiated) ends ( @tomsmeding ). Parentheses are our friends. – user121330 Jun 29 '16 at 15:47
  • @user121330 : I partially agree and partially disagree: I clearly recall when I was certain people claiming that integration and differentiation were being needlessly pedantic/cautious. Of course, now I know more and know that that this is the case. Given the nature of the question, I am relatively certain that the Questioner does not have the counterexamples that I have and producing transparent examples of noncommutativity (not depending on any properties of the functions) will help the Questioner believe that this Answer is not being needlessly pedantic/cautious. – Eric Towers Jun 29 '16 at 15:55
  • I'm not sure, @EricTowers, what you're getting at in your response. – user121330 Jun 29 '16 at 16:04

First, note that $$ \frac{1}{u-1}-\frac{1}{u}-\frac{1}{u^{2}}=\frac{1}{u-1}-\frac{u+1}{u^{2}}=\frac{1}{\left(u-1\right)u^{2}} $$ from which the equality follows: $$ \int du \left(\frac{1}{\left(u-1\right)u^2}\right)=\int du\left(\frac{1}{u-1}-\frac{1}{u}-\frac{1}{u^{2}}\right). $$ Note that $\int fdu$ and $\int du f$ mean the same thing.

  • 1
    As mentioned by other users, du can be written on the start or the end, so I assume I can consider the terms in brackets as the 1 function integrated – TheBro21 Jun 28 '16 at 19:24
  • 11
    although I don't really see how linearity has anything to do with it.. Instead of writing $du$ at the end we write it at the beginning, it's a convention – Ant Jun 28 '16 at 21:55

While, as other answers have noted, some authors write the differential (the $du$) next to the integral sign, I would recommend avoiding it. It's uncommon, meaning many people who see it will have the same confusion you did. But also, having the differential at the end of an integral is a notational convenience, as it shows the end of the integrand expression. This is useful, as the integral notation doesn't inherently have a closing delimiter, other than the differential.

For instance, one could easily mistake

$$\int du\left(\frac{1}{u-1}-\frac{1}{u}-\frac{1}{u^2}\right)$$


$$\left(\frac{1}{u-1}-\frac{1}{u}-\frac{1}{u^2}\right)\int 1\, du,$$

which is a completely different expression. By writing


it is clear what the integrand is. Indeed, even if the parentheses are omitted it is clear:


The exception is that for integrands that are a fraction with numerator 1, they are often written as $$\int\frac{dx}{f(x)}$$ instead of $$\int\frac{1}{f(x)}\,dx,$$ since the former is more compact, and the fraction bar delimits the entirety of the integral expression.

This is just another way of writing $\int \frac{1}{(u-1)u^2} \, du$.

In plain language, you can interpret the $\int$ and $\mathrm{d}$ as a verb or a command: "integrate" or "differentiate" (the following) and the $\mathrm{d}x$ as a complement to the verb: "with respect to variable $x$".

With $\dfrac{\mathrm{d}}{\mathrm{d}x}$, the verb and its complement are generally close by, and the fractional separation makes it quite obvious. Putting the $\mathrm{d}x$ at the end of the formula is like a sentence with the subject and the verb far away, giving a sense of surprise, yet not handy for the beginner. This sometimes happens with the German language for instance. Putting the $\mathrm{d}x$ close to the $\int$ sign may help the reader for long expressions.

  • 1
    I like this poetic explanation. – Karlo Jun 29 '16 at 9:33

The hyperreal view helps clarify the picture with regard to the question whether $f(x)dx$ in the expression $\int_a^b f(x)dx$ is a product or not, as well as the issue of commutativity.

From the hyperreal viewpoint, the integral is defined as the standard part of an infinite Riemann sum $\sum_i f(x_i)\Delta x$. In the Riemann sum, the term $f(x_i)\Delta x$ is literally a product, and therefore commutative. Since the infinite Riemann sum uniquely determines the integral (via applying standard part), it follows that in the integral also we are free to commute $f(x)$ and $dx$.

Thus in the integral the term $f(x)dx$ is not literally a product, but the commutation property follows from that for Riemann sums via transfer.

I think as others are getting at, the confusion probably arises from the (great) question: what is $dx$ anyway? I will try and give an intuitive answer that should help a little with the confusion.

The rigorous answer is that $dx$ is a differential 1-form, which you will learn about if you do real analysis, but I think a perfectly good intuitive response is it is just a "tiny bit" of $x$. You can see this by noting that the integral is roughly defined as $$ \lim_{\Delta x\rightarrow 0}\sum f(x*)\Delta x $$ For some $x*$ inside each interval of shrinking size. $dx$ is then exactly this arbitrarily small $\Delta x$. As such, it is just an object that commutes with multiplication like $\Delta x$, and can be moved around as you wish.

Thinking in this way, your question is the same as $$ \sum f(x*)\Delta x=\sum \Delta xf(x*) $$ where I hope you will believe me it is true.

Additionally, I think this intuition for differentials will be helpful when you get to multi-variable calculus and define the volume element $$ \mathrm dv=\mathrm dx \mathrm dy \mathrm dz $$ which can be thought of as a tiny cube.

An operator is an object that acts on another object, typically to the right, though proper definition of the space you're working in will clarify that. We require that operators and the objects they act on fulfill certain requirements. Integrals and derivatives acting on functions fulfill the requirements for a vector space of functions. When an integral is written in operator notation, $\int dx \, f(x)$, assume that it could be equivalently written as $\mathbf{A \, f}$. Operator notation is useful because it transforms calculus into linear algebra for a little while, and occasionally provides an end-run around having to do difficult calculations.

For example, suppose we define two operators, $\mathbf{A} = \int dx$ and $\mathbf{B} = \int dy$ and some function $\mathbf{f} = f(x,y)$. While $\mathbf{A \, B \, f} \neq \mathbf{B \, A \, f}$ in general, if we define an object called the commutator as $[\mathbf{A,B}] ≡ \mathbf{AB - BA} $, we may write $\mathbf{A \, B \, f} = (\mathbf{B \, A} + [\mathbf{A,B}]) f$. The right hand side of that equation may be easier to solve, despite having more terms. Derivatives may also be written as operators, $\frac{d}{dx} f(x)$, and they also do not, in general, commute.

Sloppy notation about where an integrand (or the thing getting differentiated) ends creates ambiguity, so please put parentheses around the integrand if there is an addition or subtraction sign on that side of the equation.

In the integral you mentioned, the only reason to write it in operator notation is to introduce operator notation to you. I remember when they taught it to me, they were similarly (frustratingly) quiet about why they chose to write things that way. Bravo for asking the question.

It appears, in your edit, that you are asking about why the $dx$ 'commutes'. It may move around the integrand, but you should not interpret that as commutation. This is just a change in notation, and not in the intended meaning.

Not the answer you're looking for? Browse other questions tagged or ask your own question.