Solution (source code)

= Solution

Take $x=0$ at chamber A and $x=L$ at chamber B. At <steady state>, the <diffusion equation> with constant positive <diffusion coefficient> gives
$$
0=D\frac{d^2c}{dx^2},\qquad c(x)=A+Bx.
$$
The two <Dirichlet boundary conditions> give $A=c_0$ and $B=-c_0/L$. Thus
$$
\boxed{c(x)=c_0\left(1-\frac{x}{L}\right),\qquad0\leq x\leq L}.
$$
The concentration <gradient> is constant, $dc/dx=-c_0/L$. By <Fick's first law>, the <diffusive flux> is $J=-D\,dc/dx=Dc_0/L$, directed from A towards B. The profile is linear independently of $D$, while the flux and the time needed to approach it depend on $D$.

This result assumes no significant bulk flow, <chemoattractant> loss to the walls, degradation or cellular uptake. Experimentally, a uniform-concentration control with matched reservoir concentrations tests for directional <cell migration> caused by flow or apparatus asymmetry; reversing the reservoir concentrations tests whether the directional response follows the chemical <gradient>. Keeping both reservoirs well mixed and measuring the concentration profile checks the assumed boundary concentrations and whether uptake has distorted it. These controls distinguish the assumed passive <diffusion> field from other directional cues; the derived profile alone does not establish the mechanism of <chemotaxis>.