Rendezvous between two accelerating objects from opposite sides I have two objects. Object 1 is travelling from A to B, a distance of (let's say) 1,000,000km. It can accelerate at 2g, and will accelerate up to the halfway point and then decelerate until the end (so initial and final velocity are both 0m/s).
Object 2 is already at B, can accelerate at 20g, and wants to intercept object 1 as soon as possible after object 1 leaves A. It has to not just reach the same position as object 1, but be at the same speed as object 1 when it intercepts.
In essence, object 2 must accelerate toward object 1, then turn around and accelerate the opposite direction, so that it matches speed with object 1 when the two meet, in the shortest possible time.
Is there a (set of) formula(s) I can use to solve this problem?
This is not homework; I need this for a science fiction story I'm writing.
 A: Here are the equations
$V_A = 2gT$,  where $T$ is the total time of travel.
$V_B = -20gT_1+20gT_2$  , where $T_1$ is for the first part of Bs journey and $T_2$ for the second part.
$T=T_1+T_2$
$V_A = V_B$
$S_A = S_B$ , where these distances are measured from A positive towards B
$S_A=0.5(2g)T^2$
$S_B=1\times10^9+0.5(-20g){T_1}^2-20gT_1T_2+0.5(20g){T_2}^2$
7 equations with 7 unknowns, solving with g=9.8 gives $T_1 = 2043.134$, $T_2=2497.1639$ and the distance $S=2.020202\times10^8$m from A.
A: This kind of problem does not quite lend itself to be solved with some set of mathematical expressions because of the following: over time the acceleration of each of the objects has a discontinuity: Object 1 is described as having the direction of acceleration reverse at the halfway point.
With object 1 at least you know in advance when the change of reversal of direction of acceleration occurs. But of course the moment in time of the reversal of acceleration of Object 2 is the very thing you are looking for.

It appears to me that drawing graphs will be a good strategy here.
I just did an internet search with the search terms:
online function plotting
There are multiple websites offering an environment for plotting functions.

The plot of the position of Object 1 as a function of time is a given: with uniform acceleration the position as a function of time is a parabola. To plot the trajectory of Object 1 you need to declare a pair of functions: one for the stretch from start to halfway, the other for the stretch from halfway to the end point.
Then you declare a pair of functions for the position-as-a-function-of-time for Object 2.
For that pair you implement a shared variable for the point in time when Object 1 reverses its direction of acceleration.
From there it will be trial-and-error. You shift the point of acceleration reversal of Object 2 to find the earliest point that allows Object 2 to overtake object 1 before Object 1 completes its journey.
In addition, by tweaking the ratio of acceleration of Object 1 and Object 2 you can look for a scenario that maximizes dramatic effect.

The advantage of a graphing approach, I think, is that once you have homed in on the answer you will know with certainty that it is the optimum you are looking for. I assume it can also be solved with formula's, but then (I think) there will be gnawing doubt that maybe there could be an error somewhere.
