Solving Differential Equation numerically

In summary, the conversation discusses solving the Schrödinger equation on a nonuniform grid using the finite element method. The problem arises from the discontinuity in the distance between grid points, which affects the eigenvalues of the second derivative. The solution method involves finding eigenvectors of a matrix representation of the equation. The validity of this method is questioned.
  • #1
aaaa202
1,169
2

Homework Statement


I am supposed to write a script that can solve the Schrödinger equation on a nonuniform grid.

Homework Equations


Finite element approximation to the second derivative as in:
https://www.physicsforums.com/threads/nonuniform-finite-element-method.857334/#post-5382329

The Attempt at a Solution


I have defined a grid x = [x1,x2,x3,...,x4] with nonuniform spacing and a potential V(x). Specifically the nonuniform spacing is such that the first 10 points have a spacing of 10-10 and the others have 10-9.
I have then solved the Schrödinger equation by finding eigenvectors of:
H = -ħ2/2m D + V

The problem is that these have some kind of weird oscillatory behaviour, which stems from the discontinuity in the distance between the grid points. Do anyone have an idea what I could be doing wrong?
 

Attachments

  • untitled.png
    untitled.png
    6.9 KB · Views: 334
Physics news on Phys.org
  • #2
How did you construct D?
 
  • #4
I think if you use an approximation for the second derivative based on a nonuniform mesh, will this create some problems for the eigenvalue equation? Is it still valid that the eigenfunctions of the second derivative is just the eigenvectors of the matrix that represents it?
 

Related to Solving Differential Equation numerically

1. What is the purpose of solving differential equations numerically?

Solving differential equations numerically allows us to approximate the solution to a given differential equation when an analytical solution is not possible. It is used in a wide range of scientific and engineering fields to model and understand complex systems.

2. What are the steps involved in solving a differential equation numerically?

The first step is to discretize the differential equation, which involves dividing the domain into smaller intervals. Then, a numerical method such as Euler's method or Runge-Kutta method is used to approximate the solution at each interval. Finally, the results are checked for accuracy and refined if necessary.

3. What are the advantages and limitations of solving differential equations numerically?

The advantages of solving differential equations numerically include the ability to analyze complex systems that do not have analytical solutions, and to account for small changes in the system over time. However, numerical methods can be computationally intensive and may introduce errors into the solution, so care must be taken to select an appropriate method and check for accuracy.

4. How do you determine the accuracy of a numerical solution to a differential equation?

The accuracy of a numerical solution can be determined by comparing it to an analytical solution, if one exists, or by using convergence analysis. This involves calculating the solution with different step sizes and comparing the results to see if they approach a common value.

5. How can solving differential equations numerically be applied in real-world situations?

Solving differential equations numerically is used in a variety of real-world situations, such as modeling the spread of diseases, predicting weather patterns, and designing control systems for vehicles and machinery. It is also used in scientific research to study complex systems and make predictions about their behavior.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
980
  • Calculus and Beyond Homework Help
Replies
4
Views
835
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Introductory Physics Homework Help
Replies
8
Views
171
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
Back
Top