Using the method of lines, I am solving a system of equations of the form:(adsbygoogle = window.adsbygoogle || []).push({});

$$

\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?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# A Computing spatial derivatives with BDF

Have something to add?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**