MHB Confirm equation for Numerov method

  • Thread starter Thread starter ognik
  • Start date Start date
  • Tags Tags
    Method
AI Thread Summary
The discussion revolves around verifying the application of the Numerov method to a modified wave equation through the substitution \( \Phi = r^{-\frac{1}{2}} \phi \). The user derives an equation that approaches the required form for Numerov but struggles with the term \( \frac{1}{2r} \) and its implications for eigenvalues. They seek clarification on how to relate their derived \( a(k, r) \) to the eigenvalue \( k \) used in a Fortran program designed for solving similar problems. After some exploration, they substitute \( \lambda = k^2 + \frac{1}{2r}^2 \) to align with the program's structure but encounter discrepancies in the expected value of \( r \) and the resulting eigenvalue \( k \). The discussion highlights the complexities of adapting numerical methods for eigenvalue problems and the importance of correctly interpreting variable relationships in computational contexts.
ognik
Messages
626
Reaction score
2
Thanks for reading.
I am given the wave eqtn $ {[(\d{}{r}})^{2} +\frac{1}{r}\d{}{r}]\Phi\left(r\right)=-{k}^{2}\Phi $
The problems asks to 'show that the substitution $ \Phi={r}^{-\frac{1}{2}}\phi $ gives an eqtn for which the Numerov algorithm is suitable'.
I get $ {(\d{\phi}{r}})^{2}=-\left({k}^{2}+\left(\frac{1}{2r}\right)^{\!{2}}\right)\phi $
Its close, but not quite what I expected, I have checked it a couple of times. I'd appreciate if someone would check if I have it right?
Then the eiganvalues would be $ {\left({k}^{2}+\left(\frac{1}{2r}\right)^{\!{2}}\right)\ }^{-\frac{1}{2}} $?
 
Mathematics news on Phys.org
I should show my working I think... I wasn't sure how to show the 2nd order DEs in latex, hope I've got them right...

I split the eqtn into 3 parts, (1)=LHS 2nd order operator, (2)=LHS 1sr order, (3)=RHS:
(1) $ \left(\frac{d\Phi}{dr}\right)^{\!{2}}=\left(\frac{d}{dr}\right)^{\!{2}} \left({r}^{-\frac{1}{2}}\phi\right)=\frac{3}{4}{r}^{-\frac{5}{2}}\phi - {r}^{-\frac{3}{2}}\frac{d\phi}{dr} + {r}^{-\frac{1}{2}}\left(\frac{d\phi}{dr}\right)^{\!{2}} $
(2) $ \frac{1}{r}\frac{d\Phi}{dr} = \frac{1}{r}\frac{d}{dr}\left({r}^{-\frac{1}{2}}\phi\right) = -\frac{1}{2} {r}^{-\frac{5}{2}}\phi + {r}^{-\frac{3}{2}}\frac{d\phi}{dr} $
(3) $ -{k}^{2}\Phi = {r}^{-\frac{1}{2}} {k}^{2}\phi $

then (1)+(2)=(3):
$ {r}^{-\frac{1}{2}} \left(\frac{d\phi}{dr}\right)^{\!{2}} + \frac{1}{4}{r}^{-\frac{5}{2}}\phi = -{k}^{2}\Phi = {r}^{-\frac{1}{2}} {k}^{2}\phi $
Multiply by $ {r}^{\frac{1}{2}} $ gives:
$ \left(\frac{d\phi}{dr}\right)^{\!{2}} +\frac{1}{4}{r}^{-2}\phi=-{k}^{2}\phi $
Rearranging gives: $ \left(\frac{d\phi}{dr}\right)^{\!{2}} =-\left({k}^{2}+\left(\frac{1}{2r}\right)^{\!{2}}\right)\phi $
This is almost in the correct form to use Numerov - except that I don't know what to do with the $ \frac{1}{2r} $ term? I was looking for something of the form $ \left(\frac{d\phi}{dr}\right)^{\!{2}} -{k}^{2}\phi = S\left(r\right)$
So I could use some help around how to proceed from here, assuming my workings above are correct?
Thanks
 
Hi ognik! :)

Just a quick observation:
$$\left(\!\d {}r\!\right)^{\!2} \ne \frac{d^2}{dr^2}$$
 
The wikipedia article about Numerov's method says that the equation should be of the form:
$$\left(\!\frac{d^2}{dx^2}+a(x)\!\right)y(x) = 0$$
Or equivalently, applied to your problem statement:
$$\frac{d^2}{dr^2}\phi(r) = -a(r)\phi(r)$$This suggests that your problem statement has a typo.
Can it be that it should be $$\frac{d^2}{dr^2}$$ instead of $$\left(\!\frac{d}{dr}\!\right)^{\!2}$$?
If that is the case, your derivation is correct.
Moreover, it has the proper form with $$a(r) = k^2+\left(\!\frac{1}{2r}\!\right)^{\!2}$$. (Wasntme)
 
Sorry, mea culpa with the dbl deriv, I just got the latex wrong at first. So I'm happy that my derivation is correct and I can see that it is in the correct form, but I am blank on what to do next. They have given me a Fortan program that uses a 'shooting method' (ie successive corrected guesses) to find the first eigenvalue k, where a(r)=k2. The program calls a sub-routine which used Numerov to check the guessed k. It stops when k is close enough.

My task is to modify that program to do the same thing with what I have derived. So far sounds straight forward, I have no problem with coding if I understand what is going on.

But, I just can't see how the a(k) from their program is related to my a(k, r)? (Please excuse the bad notation)
If I had (k +1/2r)2 I could manage that, but not the sum of products as I have. Probably I just don't understand the eigenvalue thing, if k is the eigenvalue in their fortran program, what is the eigenvalue in my derivation? Sorry, probably not explaining well, because I probably don't know what I don't know :-)
 
Without having seen your fortran program I'll make an educated guess.

In your problem statement r is the variable and k is some constant. I expect that in your fortran program k is the variable and there is no particular constant.

You can probably use the program if you rewrite your problem as:
$$\phi''(k)=-\left(\!c^2+\left(\!\frac 1 {2k}\!\right)^{\!\!2}\right)\phi(k)$$
 
Hi - I've gone through the section again and have gleaned some more information. The section is about finding eigenvalues analytically, their program (copy is viewable at https://drive.google.com/file/d/0B8djt9QSh5rAWldCekRoOGJKVkk/view?usp=sharing) finds the lowest eigenvalue of a stretched string - so its the wave-number I am sure. The (un-normalised) eigenvalues and eigenvectors are known as kn = n$$\pi$$, $$\phi$$n = sin n$$\pi$$x

The logic can be summarised as:
guess a trial eigenvalue and generate a solution by integrating the DE as an initial value problem. Iterate until a trial value is found for which the boundary conditions are satisfied within a given tolerance. For each trial value of k, we integrate forward from x=0 to x=1 with the initial conditions $$\phi$$(x=0) = 0, $$\phi$$'(x=0) = $$\delta$$ (arbitrary). Finding a value of k for which $$\phi$$(1) vanishes is a root finding problem ...

The program I have uploaded to the URL above is probably clearer than all this :-)

I follow it all quite clearly, its just reconciling the constant k in the program with the more complex sum-of-squares function a(k, r) I must work with. Hope that makes it clear enough, if not please ask for anything else you might need to help me out here?
 
Hi, still hoping for some help with this, here's what I've done since the above.

Without that much confidence, I resorted to arithmetic and substituted $$\lambda=k^2 + \frac{1}{2r}^2$$
Then the given program already calculates my 'new' eigenvalue - $$\lambda$$ and I can easily substitute back to find k - a trivial change to the program. (While that sounds sensible, I can't shake the feeling I am missing something critical...).

Anyway, I also need to know the value of r for that, so I adapted their subroutine to return r as well.
But instead of getting the expected value for k (k BTW is just the wave number) which should be 2.404826 (solution to problem according to the text), I get k just smaller than pi (pi is the eigenvalue their original program returns, which is correct - $$k_{n}=v\pi$$)...

So to try and figure this out, I calculated manually what r should have been, and it should have been 0.2473. But I have no idea why my r (1.01) is wrong? or even if I am on the right track. My program and output is attached, be really grateful to get this finished, it is chapters of the text behind where I am busy now ...
 

Attachments

  • pgm&output.jpg
    pgm&output.jpg
    84.9 KB · Views: 63
Back
Top