> For example take a train moving 100 kmh to the north which wants to reverse direction to the south. It has to break and then accelerate again, a very costly operation. Except when the tracks make a turn? But how can a northward momentum change to a southward momentum?

Your train is decelerating, and then accelerating southwards. It really is.

If you were on a train that was travelling in a straight line northwards and the driver applied the brakes, it would decelerate, which really is acceleration with a negative value (and I can hear that in my old high school physics teacher's voice, hope you're doing well, Mr Siwek). You would feel yourself being thrown forwards if the acceleration was strong enough because your momentum wants to keep you moving north.

If you were on a train that was travelling around a U-shaped bit of track looping from northbound to southbound, then you'd be thrown towards the outside of the curve. Guess what? The train is not moving north so fast, and your momentum is trying to keep you moving north.

The difference here is that if you brake the train to a stop and throw it in reverse then you're dissipating energy as heat to stop it, and then applying more energy from the drivetrain to get it moving again, but if you go round a U-shaped track the energy going north is now energy going east. You have not added or removed energy, just pointed it a different direction.

Turning around a track definitely dissipates some heat energy through increased friction with the rails. Imagine taking a semicircle turn and making it tighter and tighter. At the limit, the train is basically hitting a solid wall and rebounding in the other direction, which would certainly transfer some energy.

The energy question is this: going from a 100kmh-due-north momentum to a 100kmh-due-south momentum via slowing, stopping, and accelerating again clearly takes energy. You can also switch the momentum vector by driving in a semicircle. Turning around a semicircle takes some energy, but how much - and where does it come from? Does it depend on how tight the circle is - or does that just spread it out over a wider time/distance? If you had an electric train with zero loss from battery to wheels, and you needed to get it from going north to going south, what would be the most efficient way to do it?

There is no "required" energy to change direction, even for a zero-radius change, think of a bouncing ball:

https://www.youtube.com/watch?v=QpuCtzdvix4

This only applies in perfectly elastic systems, where the bodies can convert kinetic energy to potential energy and back with perfect restitution. Which, thanks to the second law of thermodynamics, doesn't exist in reality. It's only a question of how much energy is lost. (Unless, of course, you include the medium into which the energy dissipates as heat into the system itself. But such a model is not useful in almost all practical scenarios.)

A bouncing ball is elastic. There is some loss in the process of storing the energy from the movement into the ball and then releasing it into the opposite direction. Good example though!

> Turning around a track definitely dissipates some heat energy through increased friction with the rails.

No it doesn't, but we're talking about identical spherical frictionless trains in a vacuum.

You are also talking about a track with infinite mass because otherwise the reason train can change direction is because it's pushing the track northwards

Obviously! It goes without saying that the track must be infinitely massive and infinitely stiff, mounted on an entirely inflexible infinite plane.

See, now you're talking real physics!