Finite difference numerical integration or ode45?

Click For Summary

Discussion Overview

The discussion revolves around the numerical methods for solving the time-dependent Schrödinger equation (TDSE), specifically comparing finite difference methods and the ode45 solver. Participants explore the appropriateness of these methods in different contexts, including one-dimensional cases and the implications of treating the TDSE as a partial differential equation versus an ordinary differential equation.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • Some participants suggest that finite difference methods, like the Crank-Nicolson method, are preferred for the TDSE due to its nature as a partial differential equation.
  • Others argue that in one-dimensional cases, the TDSE can be treated as an ordinary differential equation, raising questions about the suitability of ode45 and similar methods.
  • There is a discussion about the stability and efficiency of using RK4 or related schemes for temporal evolution while discretizing the spatial components via finite differences.
  • Some participants mention that finite difference methods may be more efficient than ODE solvers when the number of discrete states is large, as fewer grid points are needed compared to basis functions.
  • One participant expresses a preference for the split-operator method, which utilizes FFTs for the kinetic energy operator.
  • There is a query regarding whether the TDSE is considered a "stiff" equation, which could influence the choice of numerical methods.
  • Participants also inquire about the use of PDEPE, a MATLAB PDE solver, and its applicability to the problem at hand.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the superiority of one method over the other, as multiple competing views regarding the use of finite difference methods versus ODE solvers remain present throughout the discussion.

Contextual Notes

The discussion includes assumptions about the dimensionality of the problem and the nature of the equations involved, which may affect the choice of numerical methods. There are also unresolved questions regarding the stability of different approaches and the specific conditions under which one method may be preferred over another.

Frank Castle
Messages
579
Reaction score
23
I'm trying to numerically solve the time dependent Schrödinger equation and I've been told that the best approach is to numerically integrate using a finite difference method, however I don't understand why I couldn't just use ode45 to solve it?! Is the finite difference (interpolation) method simply more accurate than ode45 in this case or are there other reasons?
 
Physics news on Phys.org
The time dependent Schrödinger equation is a partial differential equation, not an ordinary differential equation. One of the more commonly used finite difference schemes for numerically evolving the dynamics of a wavepacket is the Crank-Nicolson method.
 
Fightfish said:
The time dependent Schrödinger equation is a partial differential equation, not an ordinary differential equation. One of the more commonly used finite difference schemes for numerically evolving the dynamics of a wavepacket is the Crank-Nicolson method.

Yes, I appreciate that, but if one is solving it for the one-dimensional case it can be treated as an ODE. I was just wondering if in general certain cases are better suited to using ode45 (or other Runge-Kutta like methods), or using interpolation techniques to numerically integrate (using finite difference methods)?!
 
Frank Castle said:
Yes, I appreciate that, but if one is solving it for the one-dimensional case it can be treated as an ODE.
Not the time-dependent Schrödinger equation.

You can use ODE methods with the TDSE if you express it in terms of a basis set, since you then get a set of coupled ODEs for the basis coefficients.
 
Technically you can still use RK4 (or related schemes) for the temporal evolution (while discretising the spatial Laplacian part of the Schrödinger equation via finite differences). For the same time step size, this will be faster than implicit methods such as Crank-Nicolson, but it is less stable and in general requires smaller step sizes in order to achieve sufficient accuracy, which is why the Crank-Nicolson method is still largely preferred in most cases.
 
DrClaude said:
Not the time-dependent Schrödinger equation.

You can use ODE methods with the TDSE if you express it in terms of a basis set, since you then get a set of coupled ODEs for the basis coefficients.

Is it more efficient to use a finite difference method to integrate in this case then?

In general, are there cases where it is better to use a finite difference (interpolation) method than using an ODE solver such as ode45?

Fightfish said:
Technically you can still use RK4 (or related schemes) for the temporal evolution (while discretising the spatial Laplacian part of the Schrödinger equation via finite differences). For the same time step size, this will be faster than implicit methods such as Crank-Nicolson, but it is less stable and in general requires smaller step sizes in order to achieve sufficient accuracy, which is why the Crank-Nicolson method is still largely preferred in most cases.

Is this because the the time dependent Schrödinger equation is a so-called "stiff" equation? Is this why finite difference techniques are preferred over ODE solvers in certain situations, as the latter can be much less stable?
 
Frank Castle said:
In general, are there cases where it is better to use a finite difference (interpolation) method than using an ODE solver such as ode45?
Unless the number of discrete states of the system is small, grid methods are usually more efficient (fewer grid points are needed than basis functions for a similar problem).

Personally, I prefer the split-operator method, where the kinetic energy operator is dealt with in momentum space, using FFTs.
 
Why not use PDEPE?
 
mfig said:
Why not use PDEPE?

Is that a PDE solver in matlab?
 
  • #10
Sorry, I should have linked this the first time: pdepe

If you post the actual equation (and (b/i)c) you are trying to solve I might be able to help you cast it into the correct form.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
2K