We calculate the Hartree energy of an electron gas in a doped semiconductor quantum well. We compare its exact value with its perturbative expansion. We show that for densities low enough to have one subband filled only, the exact calculation is unnecessary, the perturbative expansion with one or possibly two terms being already quite good.