The relativistic Thomas-Fermi equation for extended nuclear matter