text: An example problem is that of star formation. Stars form out of the interstellar medium, with this formation mostly occurring in giant molecular clouds such as the Rosette Nebula. An interstellar cloud can collapse due to its self-gravity if it is large enough; however, in the ordinary interstellar medium this can only happen if the cloud has a mass of several thousands of solar masses—much larger than that of any star. Stars may still form, however, from processes that occur if the magnetic pressure is much larger than the thermal pressure, which is the case in giant molecular clouds. These processes rely on the interaction of magnetohydrodynamic waves with a thermal instability. A magnetohydrodynamic wave in a medium in which the magnetic pressure is much larger than the thermal pressure can produce dense regions, but they cannot by themselves make the density high enough for self-gravity to act. However, the gas in star forming regions is heated by cosmic rays and is cooled by radiative processes. The net result is that a gas in a thermal equilibrium state in which heating balances cooling can exist in three different phases at the same pressure: a warm phase with a low density, an unstable phase with intermediate density and a cold phase at low temperature. An increase in pressure due to a supernova or a spiral density wave can shift the gas from the warm phase to the unstable phase, with a magnetohydrodynamic wave then being able to produce dense fragments in the cold phase whose self-gravity is strong enough for them to collapse into stars.