Calculus and infinitesimals In the definition of reimann integral, why do we put a 'dx' inside the integral sign when practically it serves no purpose except maybe telling what variable you are talking about.
Then in some physics classes, i have seen people writing stuff like $f(x)/ g(y) = dy/dx$ as $f(x) dx = g(y) dy $. 
Simply asking what is this 'dx' supposed to mean and how can you treat it like a function and sometimes even 'cancel' it from LHS and RHS(when these symbols are somehow present on both sides of equality).
 A: The short answer is that there other types of integrals (Riemann integrals in several variables, and other ways of defining an "integral" in one or several variables), and in those situations you have to keep track of which variable(s) you're integrating with respect to.  Even if the $dx$ does not seem to add any extra information in the one-variable case, it's necessary (or at least extremely convenient) to keep track of the variables in other situations.  Here are three particular scenarios.


*

*When doing line integrals of a vector field you integrate each component of the vector field with respect to the corresponding variable.  For example, the line integral of the vector field $\left\langle P(x, y), Q(x, y)\right\rangle$ over a curve $C$ is given by
$$
\int\limits_C \vec{F} \cdot d\vec{r} = \int\limits_C P(x, y) dx + Q(x, y) dy.
$$
Here you're integrating one function with respect to $x$ and another with respect to $y$, and so you need some notation to tell you which variable you should integrate each function with respect to.  The standard example of this is calculating the work done by a force field along a curve.

*There are other ways to define integration, even integration in a single variable.  In this case the notation $dx$ means you're integrating with respect to the Lebesgue measure. (This equals the the Riemann integral if you are integrating a continuous function, and so it makes sense to keep notation consistent with the Riemann integral case.)  You could choose to measure subsets of the real line a different way, using a measure $\mu$ which assigns some size to subsets of $\mathbb{R}$.  When integrating with $\mu$ you'd use the notation $\int_{[a,b]} f(x) d\mu$ -- again, the $d\mu$ tells you your notion of size when performing the integration.

*Probably the "most correct" answer to this question has to do with differential forms.  You could think of integrating a differential form as a more general version of the line integral of a vector field.  A differential form is simply a function defined on tangent vectors, and integrating a 1-form along a curve is the "essentially" adding up all the values that 1-form assigns to the tangent vectors along the curve.  (There are other types of differential forms, 2-forms, 3-forms, ..., but 1-forms are most closely related to your question.)  The space of 1-forms at a given point is a vector space whose basis is usually denoted $dx_1$, $dx_2$, ..., $dx_n$ if you are using coordinates $x_1$, $x_2$, ..., $x_n$.  Here $dx_i$ is just a function which takes a tangent vector, say $\vec{v} = (v_1, v_2, ..., v_n)$ and returns the $i$-th component, $v_i$.  With respect to this basis, a 1-form may be written as $\omega = f_1 dx_1 + \cdots + f_n dx_n$; and so it's necessary to keep track of the $dx_i$'s in order to specify the form that you're integrating.
