Rate of change of distance between linearly moving points Writing the position and velocity of one point relative to the other, this becomes finding distance of a point to the origin, where the point is parameterized by a line:
$$s(t) = (x(t), y(y)) = (x_0 + Xt, y_0 + Yt)$$
$$||s||^2 = l^2 = x^2 +y^2$$
$$2ll' = 2xx' + 2yy'$$
$$l' = \frac{xx' + yy'}{\sqrt{x^2 + y^2}}$$
$$l' = \frac{(x_o + Xt)X + (y_0 + Yt)Y}{\sqrt{(x_0 + Xt)^2 + (y_0 + Yt)^2}}$$
Where $x_0, y_0, X, Y$ all constants.
I think my mind is going to mush.


*

*How do I know this function is defined at the origin?

*How can I evaluate this function at the origin using a computer, where it won't blow up (0/0 = NaN)

 A: First of all, I think you are right that this function is not defined at the origin. So you have to define it. 
$$ll' = xx' + yy'$$ is valid for all position including the origin. And you cannot divide both side with 0 when both x and y are zero. 
at the origin, $$l' = \sqrt {(x')^2 + (y')^2}$$
this is because, at origin, $$\triangle l = \sqrt {(x'\triangle t)^2 + (y'\triangle t)^2}$$ thus
$$l'=\lim_{\triangle t \rightarrow 0} \frac{\triangle l}{\triangle t} = \sqrt {(x')^2 + (y')^2}$$
A: The line $s$ passes through the origin if the two moving points coincide at some time $t_0$. In that case, the distance function $l$ will be of the form $k|t-t_0|$ for some constant $k$. This is not differentiable at $t_0$, so there’s nothing strange going on here.
A: $l' 
= \dfrac{(x_0 + Xt)X + (y_0 + Yt)Y}{\sqrt{(x_0 + Xt)^2 + (y_0 + Yt)^2}}
$
If there is a
$t_0$
such that
$x_0 + Xt_0
=y_0 + Yt_0
= 0
$,
then,
at $t_0+c$,
$\begin{array}\\
l' 
&= \dfrac{(x_0 + X(t_0+c))X + (y_0 + Y(t_0+c))Y}{\sqrt{(x_0 + X(t_0+c))^2 + (y_0 + Y(t_0+c)))^2}}\\
&= \dfrac{XcX + YcY}{\sqrt{(Xc)^2 + (Yc)^2}}\\
&= sign(c)\dfrac{X^2 + Y^2}{\sqrt{X^2 + Y^2}}\\
&= sign(c)\sqrt{X^2 + Y^2}\\
\end{array}
$
Where 
$sign(c)
=-1, 0, 1$
if $c<0, c=0, c>0$.
$
