# Problem

We have two bodies in discrete time: the first is described by its coordinate $x_i$ and its speed $v_i$, the second has coordinate $z_i$ and speed $u_i$. Each body has its own dynamics, which we denote as linear systems with matrices $A, B, C, D$:

We want these bodies to meet in future at some point $T$ in such a way, that preserve minimum energy through the path. We will consider only kinetic energy, which is proportional to the squared speed at each point of time, that’s why optimization problem takes the following form:

Problem of this type arise in space engeneering - just imagine, that the first body is the spaceship, while the second, say, Mars.