Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well... vector/matrix equations are a tad awkward :

sage: from _operator import eq
sage: vector(map(eq, diff(r_a, t), v0*(r_b - r_a)/(r_b - r_a).norm()))
(diff(x_a(t), t) == -v0*(x_a(t) - x_b(t))/sqrt(abs(-x_a(t) + x_b(t))^2 + abs(-y_a(t) + y_b(t))^2), diff(y_a(t), t) == -v0*(y_a(t) - y_b(t))/sqrt(abs(-x_a(t) + x_b(t))^2 + abs(-y_a(t) + y_b(t))^2))

$$ \left(\frac{\partial}{\partial t}x_{a}\left(t\right) = -\frac{v_{0} {\left(x_{a}\left(t\right) - x_{b}\left(t\right)\right)}}{\sqrt{{\left| -x_{a}\left(t\right) + x_{b}\left(t\right) \right|}^{2} + {\left| -y_{a}\left(t\right) + y_{b}\left(t\right) \right|}^{2}}},\,\frac{\partial}{\partial t}y_{a}\left(t\right) = -\frac{v_{0} {\left(y_{a}\left(t\right) - y_{b}\left(t\right)\right)}}{\sqrt{{\left| -x_{a}\left(t\right) + x_{b}\left(t\right) \right|}^{2} + {\left| -y_{a}\left(t\right) + y_{b}\left(t\right) \right|}^{2}}}\right) $$

HTH,