I have 2 functions for the $x$ and $y$ components of the velocity of an object ($z$ should always be $0$ in this case)
$$V_x(t)=v_{xi}+\int_0^ta_x(t')dt'$$
$$V_y(t)=v_{yi}+\int_0^t(-g+a_y(t'))dt'$$
and a function for the magnitude of $a(t)$:
$$a(t)=\frac{T}{m-t\frac{T}{I\cdot g_0}}$$
$a(t)$ is always in the opposite direction of $V(t)$.
How could I replace $a_x(t)$ and $a_y(t)$ in the functions $V_x(t)$ and $V_y(t)$ so that $a$ has the magnitude defined by its function at time t but in the opposite direction of $V$? In other words, how could I get the component functions of $a(t)$ so that it is the opposite direction of $V(t)$ at all t?
I tried setting up the functions like:
$$V_x(t)=v_{xi}+\int_0^ta(t')\cos(\theta)dt'$$
$$V_y(t)=v_{yi}+\int_0^t(-g+a(t')\sin(\theta))dt'$$
but then $\theta$ would have to be equal to something like $\tan^{-1}(\frac{V_y(t)}{V_x(t)})$ which would require me to already know $V_x(t)$ and $V_x(t)$ at that t.
I also tried applying the magnitude of $a(t)$ to the total magnitude of $V(t)$ rather than trying to split it into components to get $V(t)=\sqrt{v_{xi}^2+(v_{yi}-gt)^2}-\int_0^t{a(t')dt'}$ but I need the velocity in component form since my next step is go integrate the y component for the y position and I will also need to solve for t later and not even mathematica can seem to solve for t in that equation.
For context I'm using these equations to determine how long a suicide burn would take and when to start burning for a rocket so that $V(t)=0$ at the same $t$ that the y position is 0. $a(t)$ is the acceleration from the engine.