First of all, I didn't know whether to pick this subforum or the engineering/compsci one, I understand this might need to be moved to a more appropriate subforum.
The general approach is fairly obvious, use implicit method to construct the tridiagonal matrix for Thomas method and solve. However...