Supposing I have a linear axis with linear acceleration/deceleration. I would like it to move to its target location and arrive after a specific amount of time.
How can I calculate the maximum velocity given the time, distance and acceleration?
It seems like a rather easy problem to solve at first sight. However I strugle with the fact that the time/distance needed for acceleration/deceleration changes with the max velocity.


Let the maximum speed be $v_{max}$ and total time, distance, acceleration and deceleration be $t_{total}$, $s_{total}$, $a_{1}$ and $a_{2}$ respectively, with $a_{2} < 0$.
In order to find the maximum speed, you will need to consider each section of the journey individually to find an expression for $v_{max}$, as it is dependent on the acceleration and deceleration.
Considering the journey in three stages, labelled as follows:
where $s_{m}$ and $t_{m}$ represent the distance and duration for which $v = v_{max}$.
As the total distance and time are known, we can say $s_{total} = s_{1} + s_{m} + s_{2}$ and $t_{total} = t_{1} + t_{m} + t_{2}$.
For the middle section travelled at the constant speed $v_{max}$, we can say $v_{max}= \frac{s_{m}}{t_{m}}$.
As $a_{1}$ and $a_{2}$ are known, we will be able to find $t_{1}$, $t_{2}$, $s_{1}$ and $s_{2}$. So, $$v_{max}= \frac{ s_{total} - s_{1} - s_{2}}{t_{total} - t_{1} - t_{2}}$$.
$t_1$ and $t_2$ can be found using $v = u + at$:
For $t_1$, $u = 0$ so $t_1 = \frac{v_{max}}{a_1}$.
For $t_2$, $v = 0$ so $t_2 = \frac{-v_{max}}{a_2}$.
$s_1$ and $s_2$ can be found using $s=ut+\frac{1}{2}at^2$:
For $s_1$, $u=0$ so $$s_1 = \frac{1}{2} * \frac{v_m^2}{a_1}$$
For $s_2$, $u=v_{max}$ so $$s_2 = v_{max}t_2 + \frac{1}{2}a_2t_2^2$$
Substituting these expressions into the expression for $v_{max}$ will give a quadratic in $v_{max}$:
$$v_{max} = \frac{ s_{total} - (\frac{-v_max^2}{a_2} + \frac{v_max^2}{a_2})-\frac{v_max^2}{a_1} }{t_{total} -\frac{v_max}{a_1} + \frac{v_{max}}{a_2} }$$
which simplifies to
$$(\frac{1}{2a_2} - \frac{1}{2a_1})v_{max}^2 + v_{max}t_{total} - s_{total} = 0$$
EDIT The geometrical method used in Ak19's answer is much more efficient, however you may still be interested to see how an equivalent result can be derived from the basic kinematics formulae.