Diffusion equations and classical mechanics In Wikipedia it is stated that the diffusion equation can be derived from the continuity equation. It is not clear to me how the classical mechanics affect the diffusion equation. For example, if the total force on an object would be equal to the second time derivative of momentum instead of first derivative, then how that would change the diffusion equation?
 A: The diffusion equation can be derived from the continuity equation, the equation that reflects the conservation of mass in continuum mechanics. Changes in the momentum would only have an impact on Newton's second law, which in continuum mechanics is given by the momentum equation, and not on the continuity equation. As a consequence the diffusion equation would stay the same.

If you look at this brief derivation of the diffusion equation you will see the momentum equation is in fact never required:
Derivation of Fick's first law
In a one dimensional steady-state diffusion process, where particles at one point diffuse equally into both directions, the number of particles (amount of constituent) moving in the positive $x$ direction for a discrete system is given by
$$- \frac{1}{2} \left( n(x+\Delta x, t) - n(x, t) \right)$$
and the corresponding diffusive flux $J$ per area element $A$ and time step $\Delta t$ is given by
$$J = - \frac{1}{2 \, A \, \Delta t} \left( n(x+\Delta x, t) - n(x, t) \right) $$
This can be rewritten to
$$J = - \frac{\Delta x^2}{2 \, \Delta t} \left( \frac{n(x+\Delta x, t) - n(x, t)}{A \, \Delta x^2} \right)$$
and introducing the molar concentration $c := \frac{n}{V} = \frac{n}{A \, \Delta x}$ as well as the diffusion constant $D$
$$D = \frac{\Delta x^2}{2 \Delta t}$$
this yields
$$J = - D \left( \frac{c(x+\Delta x, t) - c(x, t)}{\Delta x} \right)$$
which for the case of $\Delta x \to 0$ leads to
$$J = - D \frac{\partial c_i}{\partial x}.$$
For a three dimensional system the gradient replaces the partial derivative
$$\vec J = - D \vec \nabla c.$$
Derivation of Fick's second law
Assuming again a one-dimensional system where now concentration changes over time as well as due to diffusion but the fluid is still at rest
$$\frac{\partial c}{\partial t} + \frac{\partial J}{\partial x} = 0$$
one yields with Fick's first law
$$\frac{\partial c}{\partial t} - \frac{\partial}{\partial x} \left( D \frac{\partial c}{\partial x} \right) = 0$$
which assuming a constant diffusion coefficient $D$ finally yields what is generally known as Fick's second law
$$\frac{\partial c}{\partial t} = D \vec \nabla^2 c.$$
