# Charge density in an abrupt p-n junction

## Homework Statement

In an abrupt p-n junction we consider the junction between one side p-doped with ##N_A## acceptor atoms and another side n-doped with ##N_D## donor atoms. Initially the chemical potential is different in the two sides, but thermal equilibrium requires that the chemical potential be uniform. This causes the annihilation of electrons and holes, from the n side to the p side, giving rise to a region called the depletion zone where there are very few charge carriers. In the depletion zone, we consequently get a nonzero charge density as shown in the figure below. What I do not understand is why the magnitude of the charge density becomes ##qN_A## and ##qN_D## for the p side and n side, respectively? Why do we not get for example ##qN_A/2## and then just twice the distance ##-x_p*2##?

## The Attempt at a Solution

I understand that my reasoning is incorrect. If I would continue to divide ##N_A## I would eventually end up with the initial situation, and the chemical potential would not be uniform. So I need to annihilate enough electrons and holes in order to create a uniform chemical potential, but how do I know that this happens when ##\rho = -qN_A## and ##\rho = qN_D##?