A spring-mounted trolley passes the same mark twice. How can its velocity change?
You pull a trolley attached to a spring half a metre to the right and release it from rest. It can pass the same mark twice, once in each direction. The spring pulls the same way at that mark. How can the trolley have opposite velocities there?
Watch the trolley move back and forth. Measure its displacement, x, from equilibrium, and take right as positive. You already know that velocity is the rate of change of displacement. So a trolley to the right of equilibrium can still have negative velocity if it's moving left.
Acceleration is how fast velocity changes with time. Between turns, the trolley moves in one direction, so you can describe its velocity using position. By the chain rule, multiply how fast velocity changes with position by how fast position changes with time. That last rate is velocity.
At one point the trolley is moving left at two metres per second. Its velocity changes with position at a rate of minus three per second. Use the chain rule to find its acceleration, then pick the correct value.
Ignore friction. The spring pulls towards equilibrium, so its force is minus k times x. Divide by the trolley's mass to get acceleration, then replace acceleration with v times the derivative of v with respect to x. With these values for k and m, you get minus sixteen x.
Separate and integrate. Half v squared equals minus eight x squared plus C. Using the limiting values at release, half a metre and zero velocity, gives C equal to two. Double both sides. At zero point three metres, v squared is two point five six. Choose the negative root because the trolley moves left.
Use the same spring model. This time the trolley is zero point four metres to the right of equilibrium and still heading towards it. Work out v squared first, then use the direction to pick the velocity.
At the same mark on the right, the trolley moves right on the outward trip and left on the return. Its velocity is positive one point six on the way out and negative one point six on the return, in metres per second. The speed is the same. Always taking the positive root would miss the change in direction.
Where the curve drops below zero, no real velocity is possible. At minus and plus half a metre, the velocity is zero and the trolley turns. The allowed displacements lie between those points, including both ends. From release to the first crossing of equilibrium, you only use the interval from zero to plus half a metre.
Estimate displacement after two steps. Start at half a metre, at rest, with steps of zero point zero five seconds. Find acceleration from position. Add velocity times the step to position, and acceleration times the step to velocity, using the old values. You get about zero point four eight metres.