I have some trouble understanding a thing. I will reproduce two texts from two different books.
In the first, the author defines the function
$T:\mathbb{R}\longrightarrow \mathbb{R}$, $T(h)=f'(x_0)h$, $\forall h \in \mathbb{R}$,
where $f:I\longrightarrow \mathbb{R}$
is a differentiable function in $x_o$ and he calls it the differential of the function $f$ in $x_0$, denoted $df(x_0)$,
thus $df(x_0)(h)=f'(x_0)h, \forall h \in \mathbb{R}$.
If $f$ is differentiable in $x_0$,
we have the approximation
$f(x)-f(x_0) \cong f'(x_0)(x-x_0)$, for $x$
in a neighbourhood $V$ of $x_0$ (clear for me).
Denoting $h=x-x_0$, we can write:
$f(x)-f(x_0) \cong f'(x_0)h=df(x_0)(h)$.
In the case $f(x)=x$, we have for a point $x_0$: $f'(x_0)=1$,
hence: $df(x_0)(h)=h, \forall h \in \mathbb{R}$.
Denote $dx$ the differential of the function $id(x)$.
Then $dx(h)=h ,\forall h \in \mathbb{R}$
and we get $df(x_0)=f'(x_0)dx$.
If $f$ is differentiable on $I$ (interval),
we have $df(x)=f'(x)dx, \forall x \in I$.
Usually, $dx$ can be understood as an infinitesimal quantity (I don't see a connection with the previous definitions).
Now, in the second text appears the following sentence:
If $u:I\longrightarrow \mathbb{R}$ is a differentiable function, the expression:
$du=u'(x)dx$ is called the formal differential of the function $u$.
My first question: why do they call it "formal"?
Second question: what is the connection between the two texts?
Third: how is this related to $dx$, the infinitesimal quantity?
The first is a good book. The second is a poor book: it "defines" $du$ by means of an undefined symbol $dx$. The author could have written $$ du = u'(x) \spadesuit, $$ and call this a forma differential. The differential is precisely the linear map $T$, and introducing $dx$ as something that we don't want to define is rather old-fashioned.
Finally, infinitesimal quantities are defined only in non-standard analysis. If you study mathematics, please do not speak of infinitesimal quantities. You are allowed only if you teach general physics to students...
PS: of course you can give $dx$ a precise meaning, as the base of the dual space of $\mathbb{R}^1$. This is done in differential geometry courses, but of course you don't really need such an abstract machinery to speak of a linear map from $\mathbb{R}$ to $\mathbb{R}$.