After my last question I have worked through the math quite a bit and now I'm stuck again. This time my question is less wordy.
I have two equations for $t$, one with respect to each $a_{x}$ and $a_{y}$: \begin{align*} t&=\frac{-2(u_{x}^{A}-v_{x}^{B})\pm\sqrt{4(u_{x}^{A}-v_{x}^{B})^{2}-8a_{x}(c_{x}^{A}-c_{x}^{B})}}{2a_{x}}\\\ t&=\frac{-2(u_{y}^{A}-v_{y}^{B})\pm\sqrt{4(u_{y}^{A}-v_{y}^{B})^{2}-8a_{y}(c_{y}^{A}-c_{y}^{B})}}{2a_{y}} \end{align*}
Additionally $a_{x}$ can be specified as an inequality in terms of $a_{y}$: $a_{x}\leq\sqrt{a_{max}^{2}-a_{y}^{2}}$
All the variables except $t$, $a_{x}$ and $a_{y}$ are constants. How can I find a function to yield the values for $a_{x}$ and $a_{y}$ that give the lowest value for $t$?
EDIT: and this is how I arrived there:
$s_{x}^{A}, s_{y}^{A}, s_{x}^{B}, s_{y}^{B}$ : Functions for position of particles A and B on the x and y axis
$t$ : Time elapsed
$a_{x}^{A}, a_{y}^{A}$ : Acceleration of A on each axis
$a_{max}$ : Maximum magnitude of acceleration of A
$c_{x}^{A}, c_{y}^{A}, c_{x}^{B}, c_{y}^{B}$: Starting positions of A and B (constant)
$u_{x}^{A}, u_{y}^{A}$ - Starting velocity of A (constant)
$v_{x}^{B}, v_{y}^{B}$ - Velocity of B (constant)
$s^{A}=u^{A}t + \frac{a^{A}t^{2}}{2} + c^{A}$ : Function for position of A in terms of time and acceleration on one axis
$s^{B}=v^{B}t + c^{B}$ : Formula for position of B in terms of time on one axis
$a_{y}^{A}\le \sqrt{a_{max}^{2} - {a_{x}^{A}}^{2}}$ : Inequality yielding maximum acceleration on one axis in terms of acceleration on another
Optimize for t where $s^{A}=s^{B}$ on both axis: \begin{align*} s^{A}&=s^{B}\\\ u^{A}t + a^{A}t2/2 + c^{A} &= v^{B}t + c^{B}\\\ u^{A}t + a^{A}t2/2 - v^{B}t &= c^{B} - c^{A}\\\ 2u^{A}t + a^{A}t2 - 2v^{B}t &= 2c^{B} - 2c^{A}\\\ a^{A}t2 + 2t(u^{A}-v^{B}) + (2c^{A}-2c^{B}) &= 0 \end{align*} \begin{align*} t&=\frac{-2(u^{A}-v^{B})\pm\sqrt{4(u^{A}-v^{B})^{2}-8a(c^{A}-c^{B})}}{2a}&&\mbox{(quadratic formula)}\\\ t&=\frac{-2(u_{x}^{A}-v_{x}^{B})\pm\sqrt{4(u_{x}^{A}-v_{x}^{B})^{2}-8a_{x}(c_{x}^{A}-c_{x}^{B})}}{2a_{x}} &&\mbox{For X}\\\ t&=\frac{-2(u_{y}^{A}-v_{y}^{B})\pm\sqrt{4(u_{y}^{A}-v_{y}^{B})^{2}-8a_{y}(c_{y}^{A}-c_{y}^{B})}}{2a_{y}}&&\mbox{For Y} \end{align*}
By my questionable reasoning these functions for $t$ should give how long it will take to reach the target for a given acceleration. The two values for acceleration could be plotted on the X and Z axis in a 3D space, with $t$ on the Y axis. The constraints to maximum acceleration would reduce the function to a circular disc. The points where the acceleration would never reach the target will be undefined or infinite or something. The lowest positive point on the 'disc' on the Y axis is a point where there is a valid combination of accelerations in each direction to reach the target, and should be the fastest.
Have I gone wrong somewhere?
EDIT 2: It would be really super great if someone could point me in the right direction to learn about optimisation in 3D. Even if you think I'm approaching the problem presented in my other question wrong, I'd still like to know how to do it, which is why I phrased this question the way I did.