Solution (source code)

= Solution

With no <chemotaxis>, the stationary <oxygen> equation is $D_c c''=k\bar n$. Symmetry and the two prescribed surface values give
$$
\boxed{c(z)=c_0+\frac{k\bar n}{2D_c}\left(z^2-\frac{d^2}{4}\right).}
$$
By <Fick's first law>, the vertical <oxygen> <flux> is $j_c=-D_cc'=-k\bar n z$. Thus each face supplies an inward <flux> $k\bar n d/2$ per unit area, and \b[the total influx is $k\bar n d$], equal to the integrated consumption across the layer. The profile is physically nonnegative only if $c_0\ge k\bar n d^2/(8D_c)$; otherwise the constant-consumption approximation must be modified.

For bacteria retained in the fluid, impose zero bacterial <flux> at the faces. The stationary bacterial equation says that $j_n=-D_n n'+\mu n c'$ is constant, hence zero. Integrating $n'/n=(\mu/D_n)c'$ gives $n(z)=n_0\exp(\mu c(z)/D_n)$, with $n_0$ fixed by the total bacterial population. Substitution into the <oxygen> equation proves
$$
\boxed{c''-\frac{kn_0}{D_c}\exp(\mu c/D_n)=0.}
$$
Zero bacterial through-flux is the boundary assumption behind this equilibrium relation.