Finite difference numerical integration or ode45?

In summary, the time-dependent Schrödinger equation can be solved numerically using a finite difference (interpolation) method, but this is less stable and requires smaller step sizes than using an ODE solver such as ode45.
  • #1
Frank Castle
580
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
  • #2
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.
 
  • #3
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)?!
 
  • #4
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.
 
  • #5
Technically you can still use RK4 (or related schemes) for the temporal evolution (while discretising the spatial Laplacian part of the Schrodinger 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.
 
  • #6
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 Schrodinger 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?
 
  • #7
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.
 
  • #8
Why not use PDEPE?
 
  • #9
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.
 

What is finite difference numerical integration?

Finite difference numerical integration is a method used to approximate the solution of differential equations by discretizing the continuous problem into a set of algebraic equations. It involves dividing the continuous domain into a finite number of discrete points and approximating the derivatives at each point using finite difference equations.

How does finite difference numerical integration differ from other numerical integration methods?

Finite difference numerical integration differs from other numerical integration methods in that it uses a discrete approach to approximate the solution of differential equations, rather than an analytical approach. It is also a relatively simple and easy-to-implement method, making it a popular choice for solving a wide range of scientific problems.

What is the purpose of using ode45 in numerical integration?

Ode45 is a specific algorithm used for solving ordinary differential equations (ODEs) numerically. It is a Runge-Kutta method that uses a combination of fourth and fifth order accurate formulas to approximate the solution of the ODE. Ode45 is particularly useful for solving stiff ODEs, which are equations that exhibit very rapid changes in behavior.

What are the advantages of using finite difference numerical integration?

The main advantage of using finite difference numerical integration is its simplicity and ease of implementation. It is also a very flexible method that can be applied to a wide range of problems. Additionally, it allows for the use of varying time steps, making it useful for solving problems with changing dynamics.

Are there any limitations to using finite difference numerical integration?

One limitation of finite difference numerical integration is that it can only approximate the solution of a differential equation, rather than providing an exact solution. Additionally, it may not be the most accurate method for problems with rapidly changing dynamics or steep gradients. It also requires a sufficient number of discrete points to accurately approximate the solution, which can be computationally expensive for large and complex problems.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Introductory Physics Homework Help
Replies
5
Views
3K
Replies
1
Views
964
  • Advanced Physics Homework Help
Replies
1
Views
696
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • Atomic and Condensed Matter
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
703
Replies
3
Views
443
Replies
2
Views
376
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
Back
Top