particles develops a gradient. Due to this gradient, an electric field is produced in the semiconductor. Derivation In a region where n and p vary with distance, a diffusion current is superimposed on that due to conductivity. This diffusion current is governed by Fick's Law: where: F is flux. De is the diffusion coefficient or diffusivity is the concentration gradient of electrons there is a minus sign because the direction of diffusion is opposite to that of the concentration gradient The diffusion coefficient for a charge carrier is related to its mobility by the Einstein relation: where: kB is the Boltzmann constant T is the absolute temperature e is the electrical charge of an electron Now let's focus on the diffusive current in one-dimension along the x-axis: The electron current density Je is related to flux, F, by: Thus Similarly for holes: Notice that for electrons the diffusive current is in the same direction as the electron density gradient because the minus sign from the negative charge and Fick's Law cancel each other out. However, holes have positive charges and therefore the minus sign from Fick's Law is carried over. Superimpose the diffusive current on the drift current to get for electrons and for holes Consider electrons in a constant electric field E. Electrons will flow (i.e. there is a drift current) until the density gradient builds up enough for the diffusion current to exactly balance the drift current. So at equilibrium there is no net current flow: Example To derive the diffusion current in a semiconductor diode, the depletion layer must be large compared to the mean free path. One begins with the equation for the net current density J in a semiconductor diode, where D is the diffusion coefficient for the electron in the considered medium, n is the number of electrons per unit volume (i.e. number density), q is the magnitude of charge of an electron, μ is electron mobility in the medium, and E = −dΦ/dx (Φ potential difference) is the electric field as the potential gradient of the electric potential. According to the Einstein relation on electrical mobility and . Thus, substituting E for the potential gradient in the above equation () and multiplying both sides with exp(−Φ/Vt), () becomes: Integrating equation () over the depletion region gives which can be written as where The denominator in equation () can be solved by using the