A comparison of dipole polarizability obtained from linear and quadratic response functions