- #1

- 832

- 30

## Main Question or Discussion Point

Hi there. I was trying to implement Numerov method for solving second order differential equations (you can see some information of Numerov algorithm at here: https://en.wikipedia.org/wiki/Numerov's_method ). At the beginning I've used a uniform grid mesh, all points equally spaced. I'm working in Fortran, and the program I wrote worked fine on that mesh, I've tried different things and contrasted what the method gave with the analytical solutions, everything went just great. But then I wanted to use a different kind of grid mesh, so I've implemented an exponential grid mesh. When I've started to run the program on this exponential grid mesh, with points spaced like

[tex]x_i=x_0(e^{t_i}-1)[/tex] and [tex]t_i=(i-1)h[/tex]

the solution started to look like compressed at the origin, where points are more dense in the gridmesh. So I came to think that probably this was because of Numerov method being a multi step method derived on a uniform grid mesh, that the problem was maybe due that the algorithm doesn't have in account how the points in the domain are spaced when I use a grid mesh which is not uniform, so when I've took a domain with discrete points given by an exponential function, adjacent points were not equally spaced anymore, and that changed the metric somehow. Is this appreciation correct? I have never done this before, so I'm just "trying". I haven't read any book on how to implement this sort of things. If you have any reference on where to look for the implementation of variable grid mesh that would be great.

So then what I tryied to do was to modify the algorithm to work in this exponential domain. So I rederived a formula by using the chain rule in the taylor expansion. But then the method doesn't look that nice anymore, I have many derivatives of all orders including a first order one, which I cant extract from the differential equation as it is done in the standard Numerov method.

[tex]y''(x)=-g(x)y(x)+s(x)[/tex]

Well, any idea, correction or comment will be welcome. Thank you in advance.

Note to the moderation: I've originally posted this issue in here: https://www.physicsforums.com/threads/variable-grid-mesh-in-numerovs-method-fortran.870657/ but then I thought that this subforum was more appropriate. Please, don't be mad at me for posting this again in here, just delete the other topic if necessary.

[tex]x_i=x_0(e^{t_i}-1)[/tex] and [tex]t_i=(i-1)h[/tex]

the solution started to look like compressed at the origin, where points are more dense in the gridmesh. So I came to think that probably this was because of Numerov method being a multi step method derived on a uniform grid mesh, that the problem was maybe due that the algorithm doesn't have in account how the points in the domain are spaced when I use a grid mesh which is not uniform, so when I've took a domain with discrete points given by an exponential function, adjacent points were not equally spaced anymore, and that changed the metric somehow. Is this appreciation correct? I have never done this before, so I'm just "trying". I haven't read any book on how to implement this sort of things. If you have any reference on where to look for the implementation of variable grid mesh that would be great.

So then what I tryied to do was to modify the algorithm to work in this exponential domain. So I rederived a formula by using the chain rule in the taylor expansion. But then the method doesn't look that nice anymore, I have many derivatives of all orders including a first order one, which I cant extract from the differential equation as it is done in the standard Numerov method.

[tex]y''(x)=-g(x)y(x)+s(x)[/tex]

Well, any idea, correction or comment will be welcome. Thank you in advance.

Note to the moderation: I've originally posted this issue in here: https://www.physicsforums.com/threads/variable-grid-mesh-in-numerovs-method-fortran.870657/ but then I thought that this subforum was more appropriate. Please, don't be mad at me for posting this again in here, just delete the other topic if necessary.