Quadratic social welfare functions