1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solving Differential Equation numerically

  1. Mar 7, 2016 #1
    1. The problem statement, all variables and given/known data
    I am supposed to write a script that can solve the Schrödinger equation on a nonuniform grid.

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

    3. 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?
     

    Attached Files:

  2. jcsd
  3. Mar 7, 2016 #2

    Simon Bridge

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    How did you construct D?
     
  4. Mar 7, 2016 #3
  5. Mar 9, 2016 #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?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted