I am running a simulation of two bicycles traveling in the same direction in a single dimension. Bicycle A is $z$ meters behind bicycle B. The acceleration of each bicycle determined by the power (P) produced by the cyclist and a number of drag factors (simplified below):
$v'(t) = (\frac{P}{v} - 0.6v^2) \frac{1}{m}$
I'm trying to determine a value of P for bicycle A (given an initial velocity) such that after $k$ seconds, the two bicycles would be in the same location. I can assume that bicycle B has reached some steady state velocity $(v_b)$. Without being able to find a closed form solution for the displacement in terms of time, power and initial velocity, is there any way to calculate or approximate this value? The best approach I have right now is to manually simulate several values of P and choose the one that is closest to $z+kv_b$