Water energy, or hydropower, comes from the mechanical energy of the tides and waves.
This shows that mechanical energy is lost at the rate 2 F per unit time.
The fundamental difference between the two methods is that while the mechanical energy developed by a steam engine is in the first case applied directly to the driving-axle of the locomotive, in the second case it is transformed into electrical energy, transmitted over relatively long distances, and retransformed into mechanical energy on the driving-axles of the train.
In whatever form energy is produced and distributed to the train it ultimately appears as mechanical energy applied to turn one or more axles against the resistance to their rotation imposed by the weight on the wheels and the motion of the train.
In addition, the practice replaces mechanical energy with human energy, providing more jobs and revenue to local economies.