# Solving first versus second order PDE

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. central 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 central 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.

• You can do it, but your method becomes implicit and is limited to 2nd order in time, no matter how high the order of your Runge-Kutta method. – David Ketcheson Oct 20 '16 at 5:35
• @DavidKetcheson Thank you for the response. Do you mind detailing how I am limited to 2nd order in time? If I was to apply a backward difference approximation, it would work for an arbitrarily high order, no? – Mathews24 Oct 20 '16 at 16:20
• @DavidKetcheson Also, if I was to use a backward difference approximation, it would allow me to work with an explicit scheme, no? – Mathews24 Oct 20 '16 at 19:13
• The centered difference in time is implicit and 2nd order – David Ketcheson Oct 24 '16 at 4:12
• But the central difference in time evaluates $E$ at $z = z_k$; since I have $E$ at all $t_i$ for a given $z_k$, I am now looking for $E$ at $z_{k+1}$ and $t_i$.Although if I want to use a higher order (>1) RK method, I am missing the intermediate value for $E_{k,i+1}$ since I am only at this stage calculating intermediate values at $E_{k,i}$ in the z-direction (and have intermediate values for $E$ at $k$ and $t < t_{i}$). The intermediate values for $t>t_{i}$ would be necessary for central differences—thus backward differences are likely the route I will go for the time derivatives as well. – Mathews24 Oct 24 '16 at 4:19

You can not approximate in your last equation the second time derivative by central difference, because you introduce the unknown discrete values, say $E^{n+1}$, that are not available when you compute $E^n$ in the $n$-th time step if you want to apply explicit Runge-Kutta solver.
Formally, you might use a second order accurate backward difference for the approximation of $\frac{\partial^2E}{\partial t^2}$, when you use the discrete values of $E$ at two previous time levels. Nevertheless, higher order Runge-Kutta methods require to evaluate the right hand side of your system at some intermediate time levels with variable (adaptive) time step, so then you must be able to approximate $\frac{\partial^2E}{\partial t^2}$ in such time points and I do not see a way how to do it with the required accuracy of higher, i.e. greater than 2, order Runge-Kutta methods.
The standard approach as you described at the beginning of your question is appropriate, just write the second equation in suitable order, i.e. $$\frac{\partial E}{\partial t} = u$$
• Frolkovic Thank you. Yes, a backward difference approximation must be used. But since the backward difference approximation involves $E^n$, would not this work for higher order Runge-Kutta methods if the values for previous $E^n$ are also stored and used for intermediate step calculations? – Mathews24 Oct 19 '16 at 23:15
• You need intermediate steps between n and n+1 to compute $E^{n+1}$, so you would miss good approximations of second time derivative there. – Peter Frolkovič Oct 20 '16 at 19:34
• @Mathews24 the first paragraph of this answer is incorrect. You can use 2nd order central differences (in time) for the second-order time derivative (you solve for $E^{n+1}$ using $E^{n}$ and $E^{n-1}$), but (as per David Ketcheson's remark above) your scheme becomes (1) implicit in time and (2) at most 2nd order accurate in time (regardless of how accurate an approximation you choose for $\partial E / \partial t$). – GoHokies Mar 23 '17 at 13:40