In the heat equation:
$$\partial u(x,t)=D\partial\_{xx}u(x,t)$$
the diffusion coefficient $D$ is in general a constant or a given function of $u(x,t)$ in the nonlinear equation. Suppose I have a diffusion coefficient depending on the integral of $u(x,t)$. In this case I have:
$$\partial\_t u(x,t)=\left[\int\_{-L}^L u(x,t)dx\right]\partial\_{xx}u(x,t)$$
If the $IC$ and $BC$ are:
$$u(0,x)=u\_0(x)$$
$$u(L,t)=u\_L$$
$$\partial\_x u(x,t)=f(t)\mid\_{x=L}$$ 
how can I solve this equation?
Thanks.



Heat integro - differential equation
There is a simple way to manage this equation using a Fourier series. We assume a boundary at $0$ and $L$ and that exists the Fourier series for the solution
$$
 u(x,t)=\sum\_{n=-\infty}^{\infty}u\_n(t)e^{i\frac{2\pi n}{L}x}
$$
then you note that
$$
 D(t)=\int\_{-L}^L u(s,t)ds=\int\_{-L}^L\sum\_{n=-\infty}^{\infty}u\_n(t)e^{i\frac{2\pi n}{L}x}=2L u\_0(t)
$$
and you are left with the following set of ordinary equations
$$
 \partial\_t u\_n(t)=-4\pi^2n^2u\_0(t)u\_n(t).
$$
This yields $\partial u\_0(t)=0$ and so, $u\_0=constant=D\_0$ and so for $n\ne 0$,
$$
 u\_n(t)=e^{-4\pi^2n^2D\_0t}u\_n(0).
$$


