The diffusion equation links changes in space with changes over time. It has second-order spatial derivatives and a first-order temporal one. We'll work out the general solutions here; the specific solution depends on boundary conditions such as concentrations at the beginning and diffusion coefficients. It involves a Fourier series expansion as was the case with Laplace's equation.

### Separation of Variables

 The diffusion equation is: $\nabla^2u=\frac{1}{\alpha^2}\frac{\partial u}{\partial t}$. Assume product solution: $u(x,y,t)=F(x,y)\cdot T(t)$. $T(t)$ doesn't depend on $x$ or $y$, $F(x,y)$ doesn't depend on $t$. So we can take them out of the corresponding derivatives: $T\nabla^2F=\frac{F}{\alpha^2}\frac{{\rm d}T}{{\rm d}t}$. Separate terms and introduce separation constant: $\frac{1}{F}\nabla^2F=\frac{1}{\alpha^2T}\frac{{\rm d}T}{{\rm d}t}=-k^2$. The argument is once again that, as the LHS is independent of time and the RHS is independent of spatial coordinates, the two can only generally be equal if they are constant. This leaves us with two separate equations, a spatial one: $\nabla^2F+k^2F=0$ and a temporal one: $\frac{{\rm d}T}{{\rm d}t}+\alpha^2k^2T=0$.

Note that the spatial part is still a PDE as it still depends on both $x$ and $y$!

### Temporal part

The temporal part is a separable linear first-order ODE. That's easy.

 Separate dependent and independent variable: $\frac{1}{T}{\rm d}T=-\alpha^2 k^2{\rm d}t$, integrate: $\ln{T}=-\alpha^2 k^2t+\text{const.}$, and raise to the power of e: $T(t)={\rm e}^{-\alpha^2 k^2t}$

(lacking a physical boundary condition, we can choose $\text{const.}=0$).

### Separation again

 The spatial part: $\frac{\partial^2F}{\partial x^2}+\frac{\partial^2F}{\partial y^2}+k^2F=0$ can be separated again: $F(x,y)=X(x)\cdot Y(y)$. Substitute the product: $Y\frac{{\rm d}^2X}{{\rm d}x^2}+X\frac{{\rm d}^2Y}{{\rm d}y^2}+k^2XY=0$, separate $x$ and $y$ terms: $\frac{1}{X}\frac{{\rm d}^2X}{{\rm d}x^2}+k^2=-\frac{1}{Y}\frac{{\rm d}^2Y}{{\rm d}y^2}=-l^2$.

The constant $k^2$ is arbitrarily taken as part of the $x$ term. This second separation of variables results in another separation constant, $l^2$. Following the separation, we have

 two 2nd-order ODE with constant coefficients: $\frac{{\rm d}^2X}{{\rm d}x^2}+(k^2+l^2)X=0$, $\frac{{\rm d}^2Y}{{\rm d}y^2}-l^2Y=0$. The 2nd-order coefficients are: $a_2=1$, $a_2=1$, the 1st-order coefficients are: $a_1=0$, $a_1=0$, and the zero-order coefficients are: $a_0=(k^2+l^2)$, $a_0=-l^2$. The roots of the characteristic polynomials are: $\frac{0}{2}\pm\sqrt{\frac{0^2}{4}-(k^2+l^2)}=\pm {\rm i}\sqrt{k^2+l^2}$, $\frac{0}{2}\pm\sqrt{\frac{0^2}{4}+l^2}=\pm l$, and the solutions are: $X(x)=\begin{cases}\sin{(\sqrt{k^2+l^2}x)}&\\\cos{(\sqrt{k^2+l^2}x)}&\end{cases}$, $Y(y)={\rm e}^{\pm ly}$.

### Putting the general solution together

Finally, we need to put the three partial solutions back together. Therefore the general solutions of the diffusion equation --taking into account the symmetry with respect to $x$ and $y$ -- are:

$u(x,y,t)=X(x)\cdot Y(y)\cdot T(t)=\begin{cases} e^{\pm ly-\alpha^2 k^2t}\sin(\sqrt{k^2+l^2}x)& e^{\pm ly-\alpha^2 k^2t}\cos(\sqrt{k^2+l^2}x)\\ e^{\pm lx-\alpha^2 k^2t}\sin(\sqrt{k^2+l^2}y)& e^{\pm lx-\alpha^2 k^2t}\cos(\sqrt{k^2+l^2}y) \end{cases}$.

Worksheet 3 contains an example with boundary conditions. When you're done, check the solutions.

The final common type on the list of PDE in physics is the wave equation.