We saw last lecture that the mass of a main sequence star determines its temperature and luminosity. High mass means high gravity so for the star to be stable (hydrostatic equilibrium) requires that the thermal pressure pushing outwards which balances gravity has to go up as well, so the temperature (and density) goes up. And the nuclear reaction rate is INCREDIBLY sensitive to temperature - a little bit more temperature means that the particle velocity is a little bit higher, so MANY more protons get within the range of the strong nuclear force which can overcome the electrical repulsion AND as well as the proton-proton (PP) chain which we discussed, there is an additional way to fuse H to He for stars which have high temperatures, called the CNO cycle - and this is WILDLY sensitive to temperature, so it dominates in high mass stars while PP dominates for stars of mass less than about 1.2x that of the Sun.
So massive stars are MUCH MUCH more luminous. But their lifetime on the main sequence is determined by how much hydrogen fuel they have available (mass), and the rate at which they spend it (luminosity). Massive stars with lots of fuel resources squander them in a short lived blaze of glory, while very low mass stars eke out the small amount of fuel they have to glow dimly over a main sequence lifetime much longer than that of the Sun.
But whether its a long or short lifetime, all stars eventually come to the end of it. When all of the hydrogen in teh core has been fused to hellium then there is no more energy available to the core. This marks the end of the main sequence lifetime. But gravity never runs out....! The weight of the layers above still pushes down on the core, only now there are no fusion reactions to heat the core to hold it up against gravity. So gravity takes over and the core shrinks. The layers outside the core collapse too, the ones closer to the center collapse quicker than the ones near the surface. As the layers collapse, the gas compresses and heats up as there is gravitational energy released.
But can the core contract indefinitely ? How close can we squash material together before it protests ? With classical ideas of electrons and protons/nuclei as being almost point--like particles, then plainly we can squash them together until they 'almost touch' before odd things start to happen. But as we've said before, electrons are not like this - they can behave a bit more like a wave. And a wave doesn't have a well defined position, it's spread out. So it might object at much larger spacings than we'd expect from point particles. And now we hit another odd property of matter - suppose you have two water or sound (or light!) waves of the same energy (amplitude and wavelength) in the same place. They would add up together to make you a wave thats twice as big. But the electron waves ARE NOT LIKE THIS. They have a Greta Garbo sense of 'I want to be alone'. You can't get two electrons with the same energy at the same place. This is NOT due to them being of the same charge (we'll see later on that neutrons do this too!!). And they can't get away with having very very slightly different energies - we saw in lecture 3 that electrons in atoms have energies which are quantized - they can only take certain values ! We looked at some justification for that by thinking the permitted energy levels were ones where the wavelength of the electron fit perfectly into the radius of the 'orbit'. So here it can either have a wavelength which fits into the little space, or it can have half this, (so two wavelengths fit into the space) or 1/3 of this (so three wavelengths fit into the space).... From what we know about light waves we then expect shorter wavelengths to be associated with more energy. So the smallest possible energy an electron can have is NOT ZERO - the minimum energy is when its own space at the lowest energy level corresponding to the size of the space. But earlier when we looked at pressure we saw that normal thermal pressure is caused by the motion of nuclei and electrons - the faster they move (i.e. the more energy they have) then the more pressure they exert. But here we are saying that the electrons have energy even if they are NOT HOT - they have energy (i.e. they are moving) just because they are confined to a small space. And if they are moving then they exert a pressure - this is called electron degeneracy pressure. It is a purely quantum mechanical effect - ultimate core collapse of a star can be held off by this odd property that electrons want to be alone!
For very low mass stars, then this is what happens. These stars transport energy by convection so they are all mixed inside so the hydrogen runs out in the whole star. The core shrinks, and shrinks, and shrinks, becoming degenerate before the core temperature rises high enough to do anything more entertaining! So it can't contract any more, so can't get any more gravitational energy. This is a white dwarf made up of helium. It fades and cools becomming a black dwarf.
Stars from 0.4-4 solar masses are much more complex. These carried the energy in the interior mostly by radiation so the core is made up of helium but the outer layers are still mostly hydrogen and they are not mixed together during the main sequence life of the star. So when the core starts contracting, and heating up because of gravity then eventually the layer just outside the core gets hot and dense enough for fusion to start. So there are 2 sources of energy - the gravitational shrinking and H fusion in a shell around the core, and this core and shell are much more luminous than the original main sequence core! So the outer layers of the star (which hadn't contracted by very much so still feel much the same gravity) suddenly have MUCH more luminosity going through them. So the thermal pressure is much bigger than the gravity, so the outer layers expand tremendously (our sun will be bigger than the orbit or mercury and Venus, and possibly also of Earth), and so cool down.... This is a red giant. Plotting this on an HR diagram we'd see the star go from the main sequence to much higher luminosity and much lower temperatures - ie it moves up and to the right on an HR diagram. There is a nice java animation of stellar evolution on an HR diagram
But the core keeps on contracting, and the shell burning around the core keeps on going, adding helium ash to the core. So gravity in the core gets STRONGER as the mass of the core increases AND its radius is decreasing. So each electron gets squashed into a smaller and smaller space, so to shorter and shorter wavelengths. Thus we get higher and higher electron velocities and so an increase in pressure (as required for the core to be stable as we increased gravity!). This means that higher masses can only be held up by squashing the core into a smaller and smaller volume. Obviously this can't continue indefinitely!
But first what happens is that the temperature in the degenerate core goes high enough (over 100 million K) that it can start to fuse Helium to carbon (triple alpha process). You'd have thought that the core would fuse 2 helium to 1 Berylium, but the isotope of Be which you'd make from 2 helium nuclei would have 4 protons and 4 neutrons and that happens to be highly unstable and falls apart very very fast! So you have to stick another helium on before it does so, and go to an extremely stable isotope of carbon (carbon 12 with 6 protons and 6 neutrons). The whole core fuses He-C - its degenerate so even though a little fusion increases the temperture, it DOESN'T increase the pressure as the pressure is mostly from the degenerate gas. So the core is hotter, so you get more fusion, so it gets hotter still so we get more fusion.... (this is called the helium flash). Eventually it gets so hot that the normal thermal pressure is bigger than the electron degeneracy pressure, so it expands and cools, but not till after all the core has fused to C. Then there is an inert C core, then He fusing to carbon in a shell, and then H fusing to helium in a shell. And the total luminosity is rather less than before as the core is now much larger so the hydrogen burning shell is further out and at a lower temperature. So there is less luminosity coming out from the core, and so the outer layers can contract and heat up a little (so it moves down on the HR diagram and slightly to the left)
So now the C core keeps contracting, so the He and H fusing shells get hotter, so the luminosity goes up so the outer layers expand and cool .... it goes back up to being a red giant again, and is even bigger this time than last time. So the outer layers are a long long way from the core, so the gravity holding them onto the star is quite weak. And the shell burning isn't really very stable - if there is a bit more luminosity than normal then the outer layers get pushed out and become detached from the star. So we have material illuminated by the hot core - this is a planetary nebula. The exposed core can't keep on contracting as it hits the limit where degeneracy pressure won't let it go any smaller. So the core starts off as a hot carbon white dwarf, and then cools down to a black dwarf.
For stars with mass ~3-6x then the scenario is much the same except that the gravity is higher so the core temperature on the main sequence is higher. The helium core temperature is higher, so that the core starts fusing He-C BEFORE it becomes degenerate. So the helium burns rather more steadily, giving rise to a phase where there is helium core fusion and H shell fusion. And then once the He core has all fused to C then its as above
In fact, you don't have to go to wildly extreme densities to see this property - normal atoms demonstate it too. Otherwise the electrons would all pile on top of each other into the lowest possible energy level (i.e. closest) to the nucleus. All electrons from a particular element would take the same amount of energy to get up to the next energy level. Yet the emission (or absorption) line spectra we see from a particular element are not like this at all - they REQUIRE that some electrons are much closer in to the nucleus than others. Ultimate core collapse is held off by electron degeneracy pressure, a purely quantum effect. Electrons belong to a class of particles which like to be alone! Two electrons with identical energies cannot go in the same box. This is just the way they are. This is what stabilises a white dwarf against gravity (page 3 of this is specifically about electron degeneracy pressure.