
Finite Difference Boundary Conditions

With Neumann or Neumann-like (e.g. Robin) conditions you want to be careful that you discretize the boundary derivative in a way which has the same order as your discretization of the interior derivatives
Finite Difference Boundary Conditions