Break up the problem into two parts: the positive acceleration and negative
acceleration. Solve the positive acceleration part completely, and then move on
to the negative acceleration part, using the results you calculted from the
previous part as initial conditions.