why does the total mechanical energy on a roller coaster stay the same?

It actually doesn't; some energy is lost in wheel bearing and air friction. If there were no friction, total mechanical energy (kinetic plus potential) would be conserved. That is a physical law. There is no answer to "why"

Thanks :)

The total mechanical energy of a roller coaster is conserved because roller coasters operate within the laws of conservation of energy, specifically the law of conservation of mechanical energy.

To understand why the total mechanical energy remains the same, let's break it down into its two components: kinetic energy and potential energy.

Kinetic energy is the energy of motion and is given by the equation KE = (1/2)mv^2, where m is the mass of the object and v is its velocity. As a roller coaster moves along the tracks, it gains kinetic energy due to its velocity.

Potential energy, on the other hand, is the energy stored in an object due to its position or height above the ground level. In the context of a roller coaster, we consider gravitational potential energy. It is given by the equation PE = mgh, where m is the mass, g is the acceleration due to gravity, and h is the height above the reference level. As the roller coaster climbs up a hill, its potential energy increases.

According to the law of conservation of energy, the total mechanical energy (which is the sum of kinetic and potential energy) of a closed system remains constant, assuming no external forces such as friction or air resistance are acting on it.

So, in the case of a roller coaster, as it travels across the track, potential energy is converted to kinetic energy as it goes down the hill, and kinetic energy is converted to potential energy as it goes up the next hill. These conversions happen continuously, but the total mechanical energy remains constant throughout the ride.

In summary, the total mechanical energy of a roller coaster stays the same due to the conservation of energy, as the potential energy is converted to kinetic energy and vice versa during the ride.