Approximations for accumulation and inversion space-charge layers in semiconductors