# A Computing spatial derivatives with BDF

1. Nov 5, 2016

Using the method of lines, I am solving a system of equations of the form:
\begin{aligned} \frac {\partial E}{\partial t} &= u \\ \frac {\partial u}{\partial t} &= u + \frac {\partial E}{\partial z} - \frac {\partial^2 E}{\partial z^2} \end{aligned}
Looking at the particular formulae involved, it seems straightforward. Although I am having a slight problem trying to actually implement this when I have spatial derivatives involved. For example, I could approximate the spatial derivatives by central differences (e.g. $\frac {\partial^2 E}{\partial z^2} \approx \frac {E^{k+1}_i -2E^k_i +E^{k-1}_i}{(\Delta z)^2}$), but then would need to find an approximation for the terms $E^{k+1}_{i+1}$, which is a step beyond the current $E^{k}_{i+1}$ I am looking for. And the aforementioned central difference approximation is only of order 2. I have considered using the backward difference approximations instead of the central differences, but is such a routine suggested? If I wanted to stay consistent with the BDF order, it would become very cumbersome using higher order backward differences, no? Is there anything further I am missing which could help simplify the implementation, especially for higher order BDF?

2. Nov 10, 2016