the number density of photons, $N'$, throughout the boundary layer. As we showed in Paper I, the equation of photon number conservation becomes, to lowest order in the boundary layer thickness,

$$\nabla_{\mu}\bigg{(}N'U^{\mu}\bigg{)}=\frac{1}{3}\frac{\partial}{\partial{y}}\bigg{(}\frac{1}{\rho'\kappa}\frac{\partial{N'}}{\partial{y}}\bigg{)} \label{Neq1}.$$

Performing a few manipulations, this equation becomes

$$U^{\mu}\nabla_{\mu}\bigg{(}\frac{N'}{\rho'}\bigg{)} = \frac{\kappa}{3}\frac{\partial^2N'}{\partial\tau^2} \label{Neq2}.$$

As was true for the density of scatterers, we expect the observer frame number density of photons to vary approximately self-similarly, which will be true if we let

$$\frac{N'}{\rho'} = \frac{N'_0}{\rho'_0}h(\xi) \label{Nselfsim},$$

where $N'_0$ is the number density of photons in the ambient medium and $h$ is a dimensionless function. Inserting this ansatz into equation gives

$$-\frac{1}{3}f\,h_{\xi} = \zeta\frac{\partial^2}{\partial\xi^2}\bigg{(}\frac{h}{\Gamma{g}-\frac{3}{4\mu}}\bigg{)} \label{heq}.$$

For the boundary conditions on $h$, we first require that the number density of photons approach that of the ambient medium in the $\xi \gg 1$ limit. Equation then gives $h(\infty) = 1$. For the second condition, return to equation , integrate both sides from $y = -\infty$ to $\infty$, and require that the derivative of $N$ vanish in both of those limits. Doing so yields

$$\frac{\partial}{\partial{z}}\int_{-\infty}^{\infty}N'\Gamma{v_z}dy = -N'\Gamma{v_y}\bigg{|}_{-\infty}^{\infty} \label{hbc}.$$

The right-hand side can be determined by returning to the continuity equation, integrating from $y = -\infty$ to $\infty$ and performing a few manipulations to show 