As of the 2000 United States Census there were 40,517 people, 15,848 households, and 8,700 families residing in the city.