$dx$ appears in differential equations, such us derivatives and integrals.
For example, a function $f(x)$ its first derivative is $\dfrac{d}{dx}f(x)$ and its integral $\displaystyle\int f(x)dx$. But I don't really understand what $dx$ is.
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It only takes a minute to sign up.
Sign up to join this community$dx$ appears in differential equations, such us derivatives and integrals.
For example, a function $f(x)$ its first derivative is $\dfrac{d}{dx}f(x)$ and its integral $\displaystyle\int f(x)dx$. But I don't really understand what $dx$ is.
The formal definition of an expression such as $$ \int_0^1 x^2\,dx $$ will depend on the setting. This is because there is not just one "theory of integration" - there are several different theories in different areas.
I like the presentation at the beginning of this note by Terence Tao. The key point is that there are really at least three different viewpoints on integration in elementary calculus:
Indefinite integration, which computes antiderivatives
An "unsigned definite integral" for finding areas under curves and masses of objects
A "signed definite integral" for computing work and other "net change" calculations.
The value of an expression such as $\int_0^1 x^2\,dx$ comes out the same under all these interpretations, of course.
In more general settings, the three interpretations generalize in different ways, so that the "dx" comes to mean different things. In the setting of measure theory, "dx" is interpreted as a measure; in the context of differential geometry, it is interpreted as a 1-form.
But, for the purposes of elementary calculus, the only role of the "dx" is to tell which variable is the variable of integration. In other words, it lets us distinguish $$ \int_0^1 uv\,du = v/2 $$ from $$ \int_0^1 uv\,dv = u/2 $$
Formally, $dx$ does not mean anything. It's just a syntactical device to tell you the variable to differentiate with respect to or the integration variable.
As Silvanus Thompson put it in his book Calculus made easy: $\mathrm dx$ means "a little bit of $x$".
If that is not satisfying, there are various more precise explanations. One of them is: $\mathrm dx$ is a differential one-form.
$dx$ means a very very small quantity, $dx=x_2-x_1$ where $x_1$ and $x_2$ very very near to $x$ (in geometry a very small distance), when you derive $\frac{d}{dx}f(x)$ it means you calculate the propinquity of $df(x)$ and $dx$, when you integrate, the sign $\int$ means a continuous sum, so $\int f(x) dx$ means a continuous sum of all the quantities $f(x) dx$ (geometrically very very small rectangles), in graduate language $dx$ is a linear map (differential form).
The d$x$ comes from approximating the area under a curve by a discrete sum of narrow rectangular slices of heights $f(x_i)$ and equal widths $\Delta x = x_{i+1}-x_i$. Look up Riemann sum for more details. So the area is then approximately $\sum^n_{i=1} f(x_i) \Delta x$. This approximation becomes exact when $\Delta x$ becomes arbitrarily small, which is symbolized by replacing $\Delta x$ by d$x$ (and $\sum$ by $\int$). For derivatives, similar story; just replace "area" in the above by "slope" or "gradient", where the approximation is now a chord of length d$x$ along X-direction. NB: correct notation is d$x$, not $dx$.
I have a relevant blog post for those comfortable with multivariate calculus, found here.
Though treating $\mathrm{d}x$ as simply "that thing" works, there is hidden meaning behind it. To be clear, in this case, we are using $x$ to refer to the identity function $x(t)=t$, where $t\in\mathbb{R}$.
Imagine an arrow tangent to the real line. This can be represented by a vector (magnitude and direction) and a real number (position). We call such a vector a tangent vector. If the vector is $v$ and the position is $p$, then we denote the corresponding tangent vector* by $v_p$.
Mathematicians define $\mathrm{d}x$ as a type of function, called a differential $1$-form, that takes in a position $p$ and outputs a so-called "dual" tangent vector, or cotangent vector, which we call $\mathrm{d}x_p$. This $\mathrm{d}x_p$ is, somewhat confusingly, a function on the tangent vectors positioned at $p$. In the case of real numbers, though, the expression for $\mathrm{d}x_p$ is easy: $$\mathrm{d}x_p(v_p)=v.$$
Though many people will prefer to work with the (arguably more rudimentary) notion of "infinitesimals", differential forms have many advantages over the "old way". For example, change of variables, commonly known as $u$-substitution, has a simple formula in terms of something called the "pullback". As another example, when we move on to calculus on spaces that aren't strictly Euclidean, these differential forms give powerful information about the space itself, such as (in some sense) how many holes it has.
(* For the professionals, what I am meaning here is that $v_p=v\left.\frac{d}{dx}\right|_p$. Feel free to heckle in the comments.)