Lesson 254

Differential Equations<br>& Numerical PDEs

Euler · Runge–Kutta · Finite Differences · Heat Equation

1:00

How to simulate differential equations numerically — from forward Euler and RK4 for ODEs to finite-difference schemes and the heat equation for PDEs.

By the end, you can

  • Explain what a differential equation is and why the unknown is a function, not a number.
  • Apply one or two steps of forward Euler by hand and compute the result.
  • State Euler's global error order O(h) and its stability condition |1 + h·k| ≤ 1.
  • Explain how RK4 achieves O(h⁴) error and how many slope samples it uses.
  • Distinguish ODEs from PDEs by the number of independent variables.
  • Approximate a second derivative using the (+1, −2, +1)/Δx² finite-difference stencil.
  • Write out the FTCS update rule and identify the diffusion number r.
  • Apply the FTCS stability criterion r ≤ 1/2 to compute the maximum allowed time step.
  • Explain what stiffness means and why implicit methods are preferred for stiff problems.
Up next in Advanced Algorithms, Math & PL Theory
Questions or feedback?