What does it mean when dx is put on the start in an integral? [duplicate]
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?
The notation $\int f(x) \, dx $ and $\int dx \; f(x)$ mean the exact same thing.
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.
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.
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)$$
as
$$\left(\frac{1}{u-1}-\frac{1}{u}-\frac{1}{u^2}\right)\int 1\, du,$$
which is a completely different expression. By writing
$$\int\left(\frac{1}{u-1}-\frac{1}{u}-\frac{1}{u^2}\right)\,du$$
it is clear what the integrand is. Indeed, even if the parentheses are omitted it is clear:
$$\int\frac{1}{u-1}-\frac{1}{u}-\frac{1}{u^2}\,du$$
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.
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$$