Studies on potential profiles in a heavily doped semiconductor heterojunction in equilibrium