How should be understood the expression " taking the differentials of both sides of an equation". ( Taking differentials VS differentiating) In a basic book, more precisely in the chapter dealing with special relativity, the author aims at showing how is derived this theorem of relativistic dynamics
$ K= mc^2 - m_0 c^2$.
At one point of the derivation, he uses the relativistic expression of mass, that he reexpresses as : $ m^2c^2-m^2u^2=m_0^2c^2$ ( where $u$ is the velocity of a particle in a given inertial reference frame).
Then he says : " taking the differentials of both sides of this expression we obtain :
$2mc^2dm-m^22udu-u^2 2mdm=0$"
I've already heard about the differential of a function of $x$, defined as the linear change in $y$ for an infinitesimal change in $x$.
What I don't understand here is : with respect to what variables are these differentials taken? Is it allowed to take differentials with respect to various different variables ( if the equation is to remain valid?) Is " taking the differentials" the same thing as " differentiating"?
below, solved problem 8.21 
 A: $\newcommand{\d}{\mathrm{d}}$They are being differentiated with respect to time $t$. Rewritten, we have
$$ c^2 \cdot m(u(t))^2 - m(u(t))^2 \cdot u(t)^2 = m_0^2 c^2$$
(Note that this follows as mass is dependent on velocity.) Trivially the right-hand side differentiates to zero, being constant. Then differentiating and applying the chain rule repeatedly, we have
$$\frac{\d}{\d t} c^2 m(u(t))^2 = 2c^2\cdot  m(u(t)) \cdot \underbrace{m'(u(t)) \cdot u'(t)}_{\displaystyle =\frac{\d}{\d t} m(u(t))} \tag 1$$
and
\begin{align*}
\frac{\d}{\d t} m(u(t))^2 u(t)^2 
&= 2\cdot  m(u(t)) \cdot m'(u(t)) \cdot u'(t)\cdot  u(t)^2 \\
&\;\;\; + 2\cdot  m(u(t))^2\cdot  u(t) \cdot u'(t) \tag 2
\end{align*}
Equivalently framed, we have
$$2c^2 m \, \d m \tag{1'}$$
and
$$2mu^2 \, \d m + 2m^2 u \, \d u \tag{2'}$$
respectively, and these lead to the desired expression.


Is " taking the differentials" the same thing as " differentiating"?

Almost. Let $y=f(x)$. Then the differentials $\d y, \d x$ are defined as being such that $\d y = f'(x) \, \d x$, at least when first introduced in elementary calculus classes.
For instance, notice that if you multiply $(1)$ and $(2)$ by $\d t$, you basically get your result. (Not always justifiable, of course, but as a rule of thumb, it's not too bad.)
You can think of $\d f$ as being "an incredibly small change in $f$" - like a $\Delta f$, but specifically geared to be super small.
A: I would argue that you don't need a variable with which to take a differential with respect to.  You can take a differential, essentially, "by itself".  This sort of operation is done quite a bit in physics.
There does, indeed, need to be something connecting the variables for this to work, but you needn't actually know what it is.  Just knowing that they are tied together in some vague metaphysical sense is sufficient.
