TITLE: Why do we treat $\mathrm{d}x$ in the indefinite integral as if $f(x)$ were multiplied by it?
QUESTION [8 upvotes]: The first explanation I heard for the $\mathrm{d}x$ - it just shows by which variable we are integrating. Which made sense because $(F(x)+C)^\prime=f(x)$, not $f(x)\mathrm{d}x$. Now, some time later, the $\mathrm{d}x$ has become a source of confusion again. If there's $\int \frac{x}{x^2+1} \mathrm{d}x$, then why can we solve it like that: $\int \frac{1}{x^2+1} x \mathrm{d}x= \frac{1}{2}\int\frac{1}{x^2+1} 2 x \mathrm{d} x=\frac{1}{2}\int \frac{1}{x^2+1} \mathrm{d}(x^2+1)$ ? The other parts seem more or less normal but the transition from $\int\frac{x}{x^2+1} \mathrm{d}x$ to $\int \frac{1}{x^2+1} x \mathrm{d}x$ seems very strange. 
It works but why does it? If $\mathrm{d}x$ just shows by which variable we are integrating $f(x)$ then we cannot treat it as if $f(x)$ were multiplied by it. And on the other hand, if $f(x)$ IS actually multiplied by $\mathrm{d}x$ then why can we do it? I know there's simple explanation for it when we calculate the definite integral, that we break up some line or surface or volume into infinitely little pieces and then add up those infinitely little pieces to get the whole thing, so it makes sense. 
But why do we treat $\mathrm{d}x$ in the indefinite integral as if $f(x)$ were multiplied by it? Thanks.

REPLY [4 votes]: As was alluded to in the comments of process91's answer there are a couple of ways of making some sense out of the $dx$.  
One way is via differential forms.  The $dx$ is then related to a vector space called the cotangent bundle.  The cotangent bundle gives you linear maps from the tangent space to $\mathbb{R}$.  Here $x$ is viewed as a function (the identity on $\mathbb{R}$) and $d$ is an operator that takes $x$ to $\frac{dx}{dx}\,dx=1\,dx=dx$.  In fact $d$ takes any function $f$ to $\frac{df}{dx}\,dx$.  This $dx$ is then the basis for a $1$-dimensional vector space.  But, then we notice that it is also the basis for a $1$-dimensional algebra over the set (actually ring) of continuous functions.  In this sense we kind of $\textit{are}$ multiplying a function $f(x)$ by $dx$.  This is when you might want to think of $dx$ as saying "integrate with respect to $x$".  In other words, integrate with respect to the identity function.  This is a more high powered way to view things.  So, I apologize if this paragraph hasn't made a ton of sense (my brain is still warming up today). 
Another way of viewing it is to introduce the notion of a measure.  Here $dx$ is viewed as giving a notion of length to each closed interval.  Again, $x$ is the identity function and we find the length of $[a,b]$ by applying the identity function to the endpoints and subtracting.  So, the length of $[a,b]$ is given by $x(b)-x(a)=b-a$.  This is when change of variables comes into play.  Suppose I have a continuous non decreasing function $f$.  Then the length of $[a,b]$ can be made to be $f(b)-f(a)$.  We can talk about integrating with respect to this new version of length.  In the definition of the Riemann integral you have limits of finite sums where function values are being multiplied by lengths of subintervals.  We just swap out our old version of length with the new one in the limits.  Now, given any continuous function we have an integral.  Converting between them is just the change of variables (or $u$-substitution) theorem: If given a continuous $f(x)$ then $df=f'(x)\, dx$.