# A Computing first derivative based on second derivative

1. Oct 19, 2016

I am trying to numerically solve a PDE, and just had a question as to the validity of a certain approach. For example, given the PDE:

$$\frac {\partial ^2 E}{\partial t^2} = - k\frac {\partial E}{\partial t} + c^2 \frac {\partial ^2 E}{\partial z^2} - c\frac {\partial E}{\partial z}$$

If I was to apply an explicit Runge-Kutta method, I could make a substitution:

$$u = \frac {\partial E}{\partial t}$$

$$\frac {\partial u}{\partial t} = - ku + c^2 \frac {\partial ^2 E}{\partial z^2} - c\frac {\partial E}{\partial z} \\ \\ u = \frac {\partial E}{\partial t}$$

where the spatial derivatives are computed by a finite difference approximation (e.g. backward difference). I was just wondering: is solving the following a valid approach?

$$\frac {\partial E}{\partial t} = \frac{1}{k}(-\frac {\partial ^2 E}{\partial t^2} + c^2 \frac {\partial ^2 E}{\partial z^2} - c\frac {\partial E}{\partial z})$$

Where now both the spatial derivatives and second time derivative are approximated by backward difference schemes, while I apply the Runge-Kutta method to the first time derivative of $E$. I have not seen this done anywhere, but was just curious as to why (or why not) this is an unacceptable method? Mathematically, it seems odd that my first order derivative depends on higher order derivatives of itself, although I don't immediately see any reason why this is wrong numerically.

2. Oct 20, 2016

### Staff: Mentor

I don't believe this makes sense. To the best of my knowledge, Runge-Kutta methods are specific to ordinary DEs, not partial DEs.

3. Oct 20, 2016

Yes, that is correct. I would have to apply a method of lines first to discretize the $z$-space. Once I have done this, I am applying the spatial derivatives to step $E$ forward in the $z$-direction at a particular $t$.