Exact analytical solution to the Poisson-Boltzmann equation for semiconductor devices