The 2nd law of diffusion

We usually can't directly see the flow of material, but we can see (or measure) the concentration, and thus can determine the change in concentration of material with time. By combing the first law and the law of conservation of mass, we can derive the 2nd law which relates the change in concentration with time to the 2nd derivative of concentration with respect to distance. In this case, let the concentration, the red line in the Figure below, be a nonlinear function of the distance x. First consider the net flow of material out of the zone between the two dashed lines, then we find the limit as the distance between the lines, del x, decreases to zero. The change in total amount of material in the zone between the two dashed lines is just the difference between the two flows, because this is the only way material can get in or out of the zone. To get the change in average concentration, we divide that difference by the distance between the dashed lines, del x (we assume a unit area at the surfaces defined by x1 and x2), so:

    dc / dt = (J1 - J2 ) / del x

= (-D dc/dx {at x1} + D dc/dx {at x2} ) / del x

The constant D can be factored out, and as del x becomes smaller, the difference between the two dc/dx's divided by del x is the definition of the 2nd derivative of c with respect to x:

    dc / dt = D d2 c / dx2

Since the second derivative of c with respect to x is negative in the Figure (the first derivative is decreasing as you go from left to right), dc / dt is negative, i.e. the concentration in the zone is decreasing with time. This is just what you intuitively know must be happening, because material moves from regions of high concentration (the zone) to regions of low concentration (the regions on both sides of the zone).

Now that we have a differential equation that describes the process of diffusion, we can use the standard tools of mathematical physics (since essentially all the basic laws of physics are expressed as differential equations) to obtain solutions for specific problems . Of course, in all but the most simple geometries, this requires blood, sweat, and tears. However, people make their living doing this, as can be seen in the standard reference book:

The Mathematics of Diffusion, by J. Crank (see our book section for details)

However, now that computers are cheap, anyone can solve differential equations numerically, and thus get the answer for any diffusion problem. Actually, there is less difference between obtaining an "analytical" solution versus a "numerical" one than one might think. But that's another story.