Read this lesson as text

Finite Difference for Heat Equation

PDEs · Axiom Academy

EXAMPLE Finite Difference for Heat Equation Step-by-step implementation of FTCS and Crank-Nicolson schemes Excellent work! You've learned how to implement finite difference schemes for the heat equation: FTCS (Forward-Time Central-Space): Explicit scheme with stability constraint r = Δt/Δx² ≤ 1/2 for numerical stability Discretization: Replace derivatives with finite differences—central difference for space, forward difference for time in FTCS Crank-Nicolson: Implicit scheme averaging time levels, unconditionally stable but requires solving a tridiagonal system each step Accuracy vs Stability: FTCS is simple but restricted by stability, CN is more stable and accurate (second-order in time) but computationally more expensive Implementation: FTCS: explicit update formula; CN: solve Au^(n+1) = Bu^n with tridiagonal matrices A and B These techniques extend to other parabolic PDEs and form the foundation for more advanced numerical methods in scientific computing!

This is the written version of the interactive lesson above. See the full PDEs course.