Backward finite differences on higher order derivative

In summary, the individual is attempting to solve a system of equations using a fifth-order Cash-Karp Runge-Kutta (CKRK) embedded method with the method of lines. The system of equations includes partial derivatives and initial/boundary conditions. They have tried to switch the equations to a system of first order spatial derivatives, but this resulted in long processing times and unstable equations. They are wondering if applying CKRK to the original equations with backward finite differences is a valid approach. They have also considered using a brute force approach to check the validity of their normal technique.
  • #1
TheCanadian
367
13
I am trying to solve a system of equations and have a question regarding the validity of my approach when implementing a fifth-order Cash-Karp Runge-Kutta (CKRK) embedded method with the method of lines. To give the questions some context, let me state the problem I am attempting to solve:

$$ \frac {\partial E}{\partial z} = - \frac {1}{c^2}\frac {\partial E}{\partial t} - \frac{1}{k} \frac {\partial ^2 E}{\partial z^2} - \frac{1}{kc^2} \frac {\partial^2 E}{\partial t^2} + iP \tag{1}
$$ $$
\\
\frac {\partial P}{\partial t} = iNE^* \tag{2}\\
$$ $$
\frac {\partial N}{\partial t} = iPE \tag{3}
$$

$$ E(z=0) = \frac{\partial E}{\partial z}(z=0) = E(t=0) = \frac{\partial E}{\partial t}(t=0) = 0,\\ P(t=0) = P_0e^{z/c}, N(t=0) = N_0e^{z/c} $$

where ## c = 3 \times 10^8, k = 1000, P_0 ## and ##N_0## are constants##, i=\sqrt{-1}####; 0 \leq t \leq 1000, 0 \leq z \leq 1000 ##

I am implementing CKRK on the above, and even though the first spatial derivative of ##E## depends on the second spatial derivative of ##E##, the numerical method appears to work when solving (1)-(3) when I use the scheme of approximating the time and spatial derivatives of ##E## on the right hand side of (1) by a backward difference approximation (I am using an accuracy of 5).

To switch (1) above to a system of first order spatial derivatives in ##z##, I could make the substitution:

$$ U = \frac {\partial E}{\partial z} $$

and solve the following equations for ##E## instead:

$$
U = \frac {\partial E}{\partial z} \tag{4}\\
$$ $$\frac {\partial U}{\partial z} = - \frac {k}{c^2}\frac {\partial E}{\partial t} - kU - \frac{1}{c^2}\frac {\partial^2 E}{\partial t^2} + kP \tag{5}
$$

But when testing these same initial/boundary conditions using the same numerical method on the coupled equations (2) - (5), the code takes too long to finish (the step sizes required become extremely small). I believe it is due to the fact that the coefficients on the right hand side of (5) are very large and cause stability issues. I have tried to rescale the values for ##z,t,P,N,## and ##E##, but doing so causes one of the other coupled equations to become unstable or has no effect (e.g. scaling ##z## does nothing to the value ## E = U\Delta z ## since both ##U## and ##\Delta z## would scale reciprocally and cancel any effect). It is due to similar reasons I am solving ##E## in the ##z##-direction as opposed to doing the substitution ##U = \frac {\partial E}{\partial t}## and solving it in ##t## which is the standard method of lines approach (when I tried this method, the ##\Delta t## given by CKRK becomes very small).

So ultimately, instead of using equations (2) - (5), I was wondering if applying CKRK to (1) - (3) is still a valid approach where I approximate the derivatives of ##E## on the right-side of (1) by backward finite differences? It seems very odd to apply CKRK to a first order spatial derivative that depends on an approximation of the second order spatial derivative, but is this wrong? (I would be using stored intermediate values of ##E## to ensure the backward finite difference approximations are also following the Runge-Kutta method.)
 
  • #3
Either put a lower limit on the step size or do a brute force approach with a constant (but very small) step size. It'll take a long time, but this approach is useful for checking the validity of your normal technique.

It is always easier to check validity than to solve in the first place. Think of independent methods for checking validity.
 
  • Like
Likes TheCanadian

1. What is the concept of backward finite differences on higher order derivative?

Backward finite differences on higher order derivative is a numerical method used to approximate the derivative of a function at a specific point. It involves taking the change in function values at a given point and dividing it by the change in the independent variable. This method is commonly used in scientific computing and engineering to approximate derivatives of functions that cannot be easily differentiated.

2. How does backward finite differences on higher order derivative differ from other numerical methods?

Unlike other numerical methods for approximating derivatives, backward finite differences on higher order derivative only uses information from points preceding the desired point. This makes it a backward method, as opposed to forward methods that use information from points after the desired point. Additionally, backward finite differences on higher order derivative can be used to approximate derivatives of any order, making it a versatile tool in scientific computing.

3. What are the advantages of using backward finite differences on higher order derivative?

One of the main advantages of using backward finite differences on higher order derivative is its simplicity. It is a straightforward method that does not require advanced mathematical knowledge to understand and implement. Additionally, it can be used to approximate derivatives of functions that are not analytically differentiable, making it a valuable tool in many fields of science and engineering.

4. Are there any limitations to using backward finite differences on higher order derivative?

One limitation of backward finite differences on higher order derivative is that it can introduce errors in the approximation, especially for functions with highly oscillatory behavior. This method also requires a smaller step size in order to achieve accurate results, which can be time-consuming for large datasets. Additionally, it is important to consider the stability of this method, as it can become unstable for certain types of functions.

5. How can backward finite differences on higher order derivative be applied in real-world problems?

Backward finite differences on higher order derivative can be used in various real-world problems, such as in numerical solutions of differential equations, optimization, and data fitting. It can also be applied in fields such as finance, physics, and biology to approximate derivatives of functions that do not have a closed-form solution. In engineering, this method is commonly used in the design and analysis of control systems and signal processing algorithms.

Similar threads

Replies
5
Views
1K
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
2
Views
1K
  • Differential Equations
Replies
7
Views
2K
  • Differential Equations
Replies
1
Views
1K
Replies
1
Views
1K
  • Differential Equations
Replies
3
Views
1K
  • Differential Equations
Replies
1
Views
1K
  • Differential Equations
Replies
4
Views
2K
  • Differential Equations
Replies
1
Views
706
Back
Top