Crank Nicolson

Overview


The following example uses the Crank Nicolson algorithm to numerically solve the following differential equation (heat equation):
{% \frac{\partial^2 u}{\partial x^2} = \frac{\partial u}{\partial t} + f(x,t) %}
when the initial condition is given by
{% u(x,0) = sin(2 \pi x) %}
and for the purposes of this simple example, we take
{% f(x,t) = 0 %}

Demos and Tutorials


Crank Nicolson
Uses crank nicolson to solve the heat equation.
source