Say one has a train on a track between two stations with four constraints:
$a_a$ = Acceleration of the Train.
$a_b$ = Braking/Deceleration of the Train.
D = Distance between the two stations.
$v_{max}$ = Top Speed of the Train
What is the minimum possible time between two stops? Assuming the engineer accelerates and brakes perfectly? It is non trivial because the train may not have a chance to hit top speed.
I could no doubt come with a Python numeric solution for this, but there must be a solution that Calculus can offer, I just cannot figure it out.
The solution must be some sort of integral optimization, I need to solve for $t$ with the rectilinear motion formulae, but the struggle is that the 3 stages (train acceleration, train traveling at top speed, train braking) cannot be included in one equation, and it is unclear how I would pull that off.
I've spent the past couple hours on this to no avail. This is not a homework problem, just a physics grad who was curious how big of a difference upgrading the local commuter trains would make, and whether higher top speed or better acceleration would be more important.
Update:
Someone has pointed out that there's no single workable equation, because of the case statement of the train hitting top speed, which is a fair point. But it is still unclear how to find the minimum time without a top speed. Also after having reconsidered the question based on the responses, I found this previous answer with new different search terms. ->
Determining the peak speed of an accelerating/decelerating body between two point.
This is similar to what I am looking for, except I would like to assume different accelerations and decelerations (which I think leads to very different math).
Accelerate as fast as you can until either you reach top speed or reach the point at which you no longer have enough distance to decelerate. If the former, continue at top speed until you have just enough distance to decelerate.
Since it's a routine calculus exercise to relate time and distance given initial conditions you can find algebraic expressions for the relevant times and distances. You won't end up with a "single equation" for the minimum trip time since there's a case statement to take into account.