Time derivative of the distance between 2 points moving over time let $d_{ij}$ the distance between 2 points in space $p_i$ and $p_j$. These 2 points are moving over time so it is more correct to write them as $p_i(t)$ and $p_j(t)$.
$p_i$ and $p_j$ are, at every time, vectors in 3D to identify a point in 3D space.
So $d_{ij}$ is :
$d_{ij}=|| p_j - p_i ||$ 
I would like to know why, if it is correct, that:
$\dot{d_{ij}}=\beta_{ij}^T(\dot{p_j}-\dot{p_i})$
where $\beta_{ij}$ is the bearing vector between point $i$ and point $j$. Which is defined as
$\beta_{ij} = \frac{p_j-p_i}{d_{ij}}$
The $\beta_{ij}$ it is a unit vector which gives the direction between point $i$ and point $j$.
I am working to understand this but until now I didn't succeded.
Can someone help me please?
Thanks a lot.
 A: In order to have simpler notation, I note the distance
$$d(t) =\Vert p(t) -q(t) \Vert$$ where the two points are $p,q$ themselves function of "the time" $t$.
$d : \mathbb R \to \mathbb R^3$ is a function which is a composition of:
$$\begin{cases}
f : \mathbb R \to \mathbb R^3 \ : t \mapsto p(t)-q(t)\\
g : \mathbb R^3 \to \mathbb R \ : u \mapsto \Vert u \Vert^2\\
h : \mathbb R \to \mathbb R \ : t \mapsto \sqrt{t}\\
\end{cases}$$
$$d=h \circ g \circ f$$
You can now apply the chain rule using the derivative of those functions:
$$\begin{cases}
f ^\prime : \mathbb R \to \mathbb R^3 \ : t \mapsto p^\prime(t)-q^\prime(t)\\
g^\prime(u) : \mathbb R^3 \to \mathbb R \ : h \mapsto 2u^Th\\
h^\prime : \mathbb R \to \mathbb R \ : t \mapsto \frac{1}{2\sqrt{t}}\\
\end{cases}$$
$$d=h^\prime \circ g^\prime \circ f^\prime=\frac{(p(t)-q(t))^T(p^\prime(t)-q^\prime(t))}{d(t)}$$
Which is the expected result. I used the Fréchet derivative for $g$ in order to avoid coming back always to the vector coordinates which is tedious.
A: It's not quite right as stated, as will be clarified below:
The following binds as long as $p_i(t) \ne p_j(t)$, an asuumption we shall henceforeward make.
Writing
$d_{ij} = \Vert p_j - p_i \Vert$
$= ((p_j - p_i) \cdot (p_j - p_i))^{1/2}, \tag{1}$
we have
$\dot d_{ij} = \dfrac{1}{2}((p_j - p_i) \cdot (p_j - p_i))^{-1/2}\dfrac{d}{dt}((p_j - p_i) \cdot (p_j - p_i)); \tag{2}$
(2) follows from (1) by an easy application of the chain rule.  We further have
$\dfrac{d}{dt}((p_j - p_i) \cdot (p_j - p_i)) = 2(p_j - p_i) \cdot (\dot p_j - \dot p_i); \tag{3}$
substituting (3) into (2) yields
$\dot d_{ij} = ((p_j - p_i) \cdot (p_j - p_i))^{-1/2}(p_j - p_i) \cdot (\dot p_j - \dot p_i)$
$= \dfrac{p_j - p_i}{d_{ij}} \cdot (\dot p_j - \dot p_i) = \beta_{ji} \cdot (\dot p_j - \dot p_i)$
$= \beta^T_{ji}(\dot p_j - \dot p_i), \tag{4}$
the correct version of the OP's hypothesized formula.
Careful examination of mathcounterexample.net's answer reveals agreement 'twixt that one and mine.  Furthermore, our OP's definition,
$\beta_{ij} = \dfrac{p_i - p_j}{d_{ij}}, \tag{5}$
implies that
$\beta_{ji} = -\beta_{ij}, \tag{6}$
since $d_{ij} = d_{ji}; \tag{7}$
thus OP's formula is merely off by a sign.
