# Numerical solution of non-linear heat-diffusion PDE using the Crank-Nicholson Method

I am trying to solve numerically the following 1D EBM:

$C\frac{\partial T[x,t] }{\partial t} - \frac{\partial }{\partial x}\left ( D(1-x^2)\frac{\partial T[x,t] }{\partial x} \right ) + I[T] = S[x,t](1-A[T])$

where $C$ and $D$ are constants.

I want to use the Crank-Nicolson method to solve it but I am unsure how to implement it with all of the non-linear terms.

What would the Crank-Nicolson discretization of this equation be?

• scicomp.stackexchange.com/questions/7780/… can't this help? what is A[T] and I[T] btw? – VorKir Dec 9 '16 at 20:30
• What does EBM stands for? – nicoguaro Dec 9 '16 at 20:31
• The C-N discretization will simply yield a nonlinear differential equation at each time step. You then need to solve it using something like a Newton method. – Wolfgang Bangerth Dec 9 '16 at 22:20
• @WolfgangBangerth I think you mean "a nonlinear system of algebraic equations". – David Ketcheson Dec 10 '16 at 18:15
• @DavidKetcheson, well that depends on whether you discretize first in time then space, or the other way around :-) – Wolfgang Bangerth Dec 10 '16 at 21:05