Numerical solution of non-linear diffusion equation via finite-difference with the Crank-Nicolson method

I want to numerically solve the non-linear diffusion equation:

$$\frac{\partial}{\partial t} T(x,t)= \frac{\partial}{\partial x}\left(T^{5/2} \frac{\partial T}{\partial x} \right)$$

I want to use finite difference approach to solve it via Crank-Nicolson method. But I don't understand how to treat the non-linear coefficient when applying the numerical method.

• Please specify the boundary conditions you wish to implement. – boyfarrell Jun 24 '13 at 12:55

The Crank-Nicolson discretization of this equation will read $$\frac{T^n-T^{n-1}}{\Delta t} = \frac 12 \left[ \partial_x \left((T^n)^{5/2} \partial_x T^n\right) + \partial_x \left((T^{n-1})^{5/2} \partial_x T^{n-1}\right) \right]$$ which is a nonlinear, time-independent, elliptic partial differential equation in $T^n$. The way to solve such equations is summarized in step-15 of the deal.II tutorial, see http://www.dealii.org/developer/doxygen/deal.II/step_15.html .