When a high-speed passenger train traveling at 161 km/h rounds a bend, the engineer is shocked to see that a locomotive has improperly entered onto the track from a siding and is a distance D=676 m ahead (figure). The locomotive is moving at 29.0 km/h. The engineer of the high-speed train immediately applies the brakes. What must be the magnitude of the resulting constant deceleration if a collision is to be just avoided?

Solution:
Let us denote v_t to be the initial velocity of the train and v_l to be the locomotive’s velocity. Note that v_l is also the final velocity of the train if the collision is barely avoided. We will also denote \triangle x to be the distance between two trains and the distance the train travels forward during this time by the locomotive. Thus, we can write:
\frac{v_t+v_l}{2}=\frac{\triangle x}{t}=\frac{D+v_lt}{t}=\frac{D}{t}+v_l
We can now use v=v_0+at to eliminate t from the equation. Thus, we can write:
\frac{v_t+v_l}{2}=\frac{D}{\frac{(v_l-v_t)}{a}}+v_l
Isolating for a gives us:
a=\left(\frac{v_t+v_l}{2}-v_l\right)\left(\frac{v_t+v_l}{D}\right)
a=-\frac{1}{2D}(v_l-v_t)^2
Substituting the values given in the question gives us:
a=-\frac{1}{2(0.676km)}(29km/h-161km/h)^2
a=-12888km/h^2
Let us now convert this to m/s^2.
a=(-12888km/h^2)(\frac{1000m}{1km})(\frac{1h}{3600s})^2
a=-0.994 m/s^2
Thus, the magnitude of the acceleration is \mid a\mid=0.944m/s^2
This question can be found in Fundamentals of Physics, 10th edition, chapter 2, question 43.