Many nonlinear diffusion equations are steepest-descent equations in Wasserstein space. The same computation that identifies their velocity also reveals the correct Lyapunov functional, stationary measures, and dissipation rate.
The general free-energy equation
First variation. For \[ \mathcal F(\rho) =\int U(\rho(x))\,\mathrm{d}x +\int V(x)\rho(x)\,\mathrm{d}x +\frac12\iint W(x-y)\rho(x)\rho(y)\,\mathrm{d}x\,\mathrm{d}y, \] with \(W\) even, \[ \frac{\delta\mathcal F}{\delta\rho} =U'(\rho)+V+W*\rho \] up to an irrelevant additive constant.
Proof. Substitute \(\rho+\varepsilon\sigma\) with \(\int\sigma=0\), differentiate at zero, and use symmetry of \(W\): \[ \frac{\mathrm{d}}{\mathrm{d}\varepsilon}\mathcal F(\rho+\varepsilon\sigma)\bigg|_0 =\int\{U'(\rho)+V+W*\rho\}\sigma\,\mathrm{d}x. \]
Gradient-flow equation. The formal \(W_2\)-gradient flow is \[ \boxed{ \partial_t\rho =\nabla\cdot\left[ \rho\nabla\{U'(\rho)+V+W*\rho\} \right]. } \]
Energy dissipation
Dissipation identity. Along a smooth positive solution with sufficient decay, \[ \frac{\mathrm{d}}{\mathrm{d}t}\mathcal F(\rho_t) =-\int\rho_t \left|\nabla\!\left(\frac{\delta\mathcal F}{\delta\rho_t}\right)\right|^2\,\mathrm{d}x \le0. \]
Proof. Differentiate \(\mathcal F\), substitute the gradient-flow equation, and integrate by parts: \[ \int \frac{\delta\mathcal F}{\delta\rho} \nabla\cdot\left(\rho\nabla\frac{\delta\mathcal F}{\delta\rho}\right)\mathrm{d}x = -\int\rho\left|\nabla\frac{\delta\mathcal F}{\delta\rho}\right|^2\mathrm{d}x. \] The right side is both the squared metric slope and the squared metric speed.
The heat equation
Heat as entropy flow. For the Boltzmann entropy \[ \operatorname{Ent}(\rho)=\int\rho\log\rho\,\mathrm{d}x, \] the Wasserstein gradient flow is \[ \partial_t\rho=\Delta\rho. \]
Proof. Since \(\delta\operatorname{Ent}/\delta\rho=1+\log\rho\), \[ \nabla\cdot(\rho\nabla\log\rho) =\nabla\cdot(\nabla\rho)=\Delta\rho. \] Moreover, \[ \frac{\mathrm{d}}{\mathrm{d}t}\operatorname{Ent}(\rho_t) =-\int\frac{|\nabla\rho_t|^2}{\rho_t}\,\mathrm{d}x =-\int|\nabla\log\rho_t|^2\rho_t\,\mathrm{d}x, \] so entropy dissipation is the Fisher information.
Fokker--Planck and Langevin dynamics
Fokker--Planck flow. For \[ \mathcal F(\rho)=\int\rho\log\rho\,\mathrm{d}x+\int V\rho\,\mathrm{d}x, \] the gradient flow is \[ \partial_t\rho=\Delta\rho+\nabla\cdot(\rho\nabla V). \] If \(Z=\int e^{-V}\,\mathrm{d}x<\infty\), its equilibrium is \(\gamma=Z^{-1}e^{-V}\,\mathrm{d}x\), and \[ \mathcal F(\rho)-\mathcal F(\gamma) =\operatorname{KL}(\rho\,\|\,\gamma). \]
This is the forward equation of the Langevin diffusion \[ \mathrm{d}X_t=-\nabla V(X_t)\,\mathrm{d}t+\sqrt2\,\mathrm{d}B_t. \] When \(D^2V\ge\lambda I\), displacement \(\lambda\)-convexity gives \(W_2\)-contraction at rate \(e^{-\lambda t}\).
Ornstein--Uhlenbeck flow. For \(V(x)=|x|^2/2\), \[ \mathrm{d}X_t=-X_t\,\mathrm{d}t+\sqrt2\,\mathrm{d}B_t, \] and \[ X_t=e^{-t}X_0+\sqrt{1-e^{-2t}}\,Z,\qquad Z\sim N(0,I). \] The invariant law is \(N(0,I)\), and the semigroup contracts \(W_2\) by \(e^{-t}\).
Porous-medium and fast-diffusion equations
Power internal energy. For \[ \mathcal U_m(\rho)=\frac{1}{m-1}\int\rho^m\,\mathrm{d}x,\qquad m\ne1, \] the Wasserstein gradient flow is \[ \partial_t\rho=\Delta(\rho^m). \]
Proof. The first variation is \(\tfrac{m}{m-1}\rho^{m-1}\). Hence \[ \nabla\cdot\left(\rho\nabla\frac{m}{m-1}\rho^{m-1}\right) =\nabla\cdot(m\rho^{m-1}\nabla\rho) =\Delta(\rho^m). \] The case \(m>1\) is porous-medium diffusion with finite-speed propagation; \(m<1\) is fast diffusion, subject to the integrability range dictated by dimension.
Aggregation and interaction
Aggregation equation. For the interaction energy \[ \mathcal W(\rho)=\frac12\iint W(x-y)\rho(x)\rho(y)\,\mathrm{d}x\,\mathrm{d}y, \] the gradient flow is \[ \partial_t\rho=\nabla\cdot\{\rho\nabla(W*\rho)\}. \]
Attractive kernels may concentrate mass, while repulsive kernels spread it. Adding entropy or power internal energy gives the aggregation--diffusion equation \[ \partial_t\rho =\Delta(\rho^m)+\nabla\cdot\{\rho\nabla(V+W*\rho)\}. \] The competition between diffusion and attraction determines whether solutions disperse, approach equilibrium, or concentrate.
Weak solutions from JKO
Variational construction. Under lower semicontinuity, coercivity, and displacement-convexity assumptions on the free energy, the JKO scheme has a continuous-time limit that is a weak solution of the corresponding diffusion equation and satisfies the energy-dissipation inequality.
Identification of the PDE. The Euler equation of each JKO step gives the discrete velocity \[ v_\tau^{k+1} =-\nabla\{U'(\rho_\tau^{k+1})+V+W*\rho_\tau^{k+1}\}. \] Insert this field in the discrete weak continuity equation, sum over time steps, and use the action bound for compactness. Weak convergence of the densities and lower-semicontinuity of the dissipation identify the limiting continuity equation with the displayed PDE.