Solution (source code)

= Solution

Take an overdamped particle with <viscous drag coefficient> $\gamma$, so its deterministic drift in the <harmonic potential> $U=kx^2/2$ is $\dot x=-kx/\gamma$. The one-dimensional <Fokker-Planck equation> has <probability current>
$$
J=-\frac{kx}{\gamma}p-D\frac{dp}{dx}.
$$
At thermal <equilibrium>, $J=0$ and the <Boltzmann distribution> is $p(x)=Z^{-1}e^{-kx^2/(2k_BT)}$, with $p'/p=-kx/(k_BT)$. Inserting this into the zero-current condition gives
$$
0=kxp\left(-\frac1\gamma+\frac{D}{k_BT}\right),\qquad
\boxed{D=\frac{k_BT}{\gamma}.}
$$
The result is the <Einstein diffusion relation> between <diffusion> and mobility. It assumes a bath at one <temperature>, linear drag and thermal <equilibrium>. The same Gaussian <probability density> gives $\langle x^2\rangle=k_BT/k$, providing an independent calibration of trap stiffness.