Which part of the train stays for the longest time in the station? 
A train with length $L$ is moving towards a train station of length $S$ with speed $v$. 
The train starts to decelerate with acceleration $-a$ as soon as head reaches the station until completely stops. Right after the train completely stops, it starts to accelerate with acceleration $a$ until its tail leaves the station with speed $v$. 
Which part of the train stays for the longest time in the station? 

The correct answer is the mid-part of the train. If the head stays in the station for $t$ and the mid-part of the train stays for $\sqrt{2}t$. Could anyone give me some clue on how to get this?
 A: First notice that the situation is symmetric and denote the following time events:


*

*Front reaches station.

*Middle reaches station.

*Front leaves station.

*Middle leaves station.


If you just want to show that the middle stays longer than the front, it suffices to notice the relevant time intervals are 1→2 and 3→4. In both intervals, the train travels the same distance, but in the latter interval it is slower.
To get a quantitative result:


*

*Sketch the position of the train at each event.

*Determine the distance the train traveled at each event using the point of standstill as a reference point.

*Use the formula for the time spent to travel a distance $d$ in constantly accelerated motion $\left( t=\sqrt{\frac{2d}{a}}\right)$ to determine the times of the above events, again with respect to the time when the train stands still.

*Add, subtract, and multiply as needed.
Note that to obtain the result you specified, you probably need to assume that the station is longer than the train (which is not necessarily true in reality as for proper usage of a train it suffices that the distance between the first and last door is shorter than the station but the train itself can be longer).
Finally note that you can just replace the front with any part before the middle to show that there is no point that is neither front nor middle nor tail that stays longest at the station.
A: Let me use $2S$ and $2L$ for convenience.
Let $[-S,S]$ be the station.
The main hint is that the tail leaves the station with the same speed as the head entered the station. By symmetry, this implies that the middle of the train was exactly at the middle of the station when the train stopped. More precisely, the speed when the middle of the train was at $L+S$ and $-L-S$ were the same, so the location of the middle of the train when it stopped is necessarily $0$.
Let $x$ be the relative position of a passenger with respect to the middle of the train. This passenger decelerates until reaching position $x$ and accelerates after that. The time spent at the station is thus proportional to $\sqrt{S+x}+\sqrt{S-x}$ if $|x|<S$, and some other equation if $|x|>S$, which is maximized at $x=0$.
