\(\)
The Diffusion equation governs motion of e.g. smoke in unmovable air, or dye in a solution.
Definition
It is a partial differential equation. The unknown is a function, and the function relates the partial derivatives of that function to each other.
We will express it using the \(\nabla^2\) “Laplacian” operator. The divergence of gradient \(u\). $$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \newcommand{ppdv}[2]{\frac{\partial^2 #1}{\partial #2^2}} \shaded{ \begin{align*} \nabla^2 u &= \nabla\cdot\nabla\,u = k\,\nabla\cdot\nabla u \\ &= \ppdv{u}{x}+\ppdv{u}{y}+\ppdv{u}{z} \end{align*} } \nonumber $$
Let \(u\) be the concentration of substance at a given point, \(u(x,y,z,t\)). Let \(\vec F\) be the flow of substance.
The equation gives us the derivative of \(u\) in respect to time \(t\), of how the concentration will vary in space. So, it will relate \(\newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \pdv{u}{t}\) to partial derivatives in respect to \(x\), \(y\) and \(z\). $$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \newcommand{ppdv}[2]{\frac{\partial^2 #1}{\partial #2^2}} \shaded{ \begin{align*} \pdv{u}{t} &= k\,\nabla^2 u \\ &= k\left( \ppdv{u}{x}+\ppdv{u}{y}+\ppdv{u}{z} \right) \end{align*} } \nonumber $$
For the heat equation \(u\) would be the temperature.
Understanding
Let \(\vec F\) is the flow of smoke
- Physics: smoke will flow from high concentration towards low concentration regions. So, in the direction where the concentration decreases the fastest. That is negative the gradient. So \(\vec F\) is directed along \(-\nabla u\). In fact, the flow is proportional to the gradient field $$ \vec F = -k\,\nabla u \label{eq:understanding1} $$
- Math: How does the flow affect the concentration? One place it will be decreasing, and another place it will be increasing. The divergence theorem relates \(\vec F\) and \(\newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \pdv{u}{t}\).
Let’s try to understand that
Flux out of \(D\) through \(S\) measures the amount of smoke going through \(S\) in unit time. $$ \newcommand{oiint}{\subset\!\!\supset\kern-1.65em\iint} \oiint_S\vec F\cdot\hat n\,dS \nonumber $$
The smoke is counted positive going out, so it is minus the derivative (what we’re loosing per unit time) $$ \newcommand{oiint}{\subset\!\!\supset\kern-1.65em\iint} \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \oiint_S\vec F\cdot\hat n\,dS =-\pdv{}{t}\left( \iiint_D u\,dV\right) \nonumber $$
We can use the divergence theorem \(\eqref{eq:divthm}\) to compute this
$$ \iiint_D\rm{div}(\vec F)\,dV =-\pdv{}{t}\left( \iiint_D u\,dV\right) \nonumber $$
Instead of taking the sum of all the amounts of smoke, and seeing how it changes over time, we can take all the little derivatives and then sum them. The derivative of the sum, is the sum of the derivatives
$$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \frac{d}{dt}\left(\sum_i u(x_i,y_i,z_i,t)\,\Delta V_i\right) = \sum_i\pdv{u}{t}(x_i,y_i,z_i,t)\,\Delta V_i \nonumber $$
Thus $$ \iiint_D\underline{\rm{div}(\vec F)}\,dV = -\iiint_D \underline{\pdv{u}{t}}\,dV \nonumber $$
For any region \(D\). $$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \tfrac{1}{\rm{Vol}(D)}\iiint_D \rm{div}(\vec F)\,dV = \tfrac{1}{\rm{Vol}(D)}\iiint_D-\pdv{u}{t}\,dV \\ \Rightarrow \text{avg. of }\rm{div}(\vec F)\text{ in }D = \text{avg. of }-\pdv{u}{t}\text{ in }D \nonumber $$
So, from the divergence theorem we derived $$ \shaded{ \rm{div}(\vec F) = -\pdv{u}{t} } \nonumber $$
So, this is another way think about what divergence means: how much “stuff” is flowing out, how much you’re loosing.
If you combine that with equation \(\eqref{eq:understanding1}\), you get the diffusion equation $$ \newcommand{pdv}[2]{\frac{\partial #1}{\partial #2}} \left. \begin{align*} \vec F &= -k\,\nabla u \\ \pdv{u}{t} &= -\rm{div}(\vec F) \end{align*} \right\} \Rightarrow \shaded{ \pdv{u}{t} = +k\,\rm{div}(\nabla u)= k\,\nabla^2 u } $$