Confirm equation for Numerov method

  • MHB
  • Thread starter ognik
  • Start date
  • Tags
    Method
In summary, the conversation is about a problem involving the wave equation and a substitution that is suitable for the Numerov algorithm. The speaker has derived an equation in the correct form for the algorithm, but is unsure how to proceed with it. They have looked at a Fortan program that uses a shooting method to find the first eigenvalue, and their task is to modify the program to work with their derived equation. However, they are unsure how to reconcile the constant in the program with the more complex sum-of-squares function in their equation. In the end, they have made some progress but are still struggling to get the correct values for k and r.
  • #1
ognik
643
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
  • #2
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
 
  • #3
Hi ognik! :)

Just a quick observation:
$$\left(\!\d {}r\!\right)^{\!2} \ne \frac{d^2}{dr^2}$$
 
  • #4
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 \(\displaystyle \frac{d^2}{dr^2}\) instead of \(\displaystyle \left(\!\frac{d}{dr}\!\right)^{\!2}\)?
If that is the case, your derivation is correct.
Moreover, it has the proper form with \(\displaystyle a(r) = k^2+\left(\!\frac{1}{2r}\!\right)^{\!2}\). (Wasntme)
 
  • #5
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 :-)
 
  • #6
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)$$
 
  • #7
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\(\displaystyle \pi\), \(\displaystyle \phi\)n = sin n\(\displaystyle \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 \(\displaystyle \phi\)(x=0) = 0, \(\displaystyle \phi\)'(x=0) = \(\displaystyle \delta\) (arbitrary). Finding a value of k for which \(\displaystyle \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?
 
  • #8
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 \(\displaystyle \lambda=k^2 + \frac{1}{2r}^2\)
Then the given program already calculates my 'new' eigenvalue - \(\displaystyle \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 - \(\displaystyle 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: 42

FAQ: Confirm equation for Numerov method

What is the Numerov method?

The Numerov method is a numerical algorithm used to approximate the solution to a second-order differential equation. It is commonly used in physics and engineering to solve problems involving oscillatory motion or wave-like phenomena.

How does the Numerov method work?

The Numerov method works by using a finite difference approximation to calculate the second derivative of the function at a given point. This value is then used to update the function at the next point, and the process is repeated until the desired level of accuracy is reached.

Why is the Numerov method useful?

The Numerov method is useful because it is a relatively simple and efficient way to solve second-order differential equations. It is also versatile, as it can be applied to a wide range of problems in various fields such as physics, engineering, and mathematics.

What is the difference between the Numerov method and other numerical methods?

Unlike other numerical methods, the Numerov method does not require the function to be evaluated at every point along the solution. Instead, it only needs to calculate the function at every other point, making it more efficient for larger systems.

How do I confirm if the equation used in the Numerov method is correct?

The equation used in the Numerov method is derived from the Taylor series expansion of the function. It can be confirmed by comparing the results obtained from the Numerov method with the exact solution of the differential equation or by checking for consistency with known solutions to specific problems.

Similar threads

Replies
5
Views
1K
Replies
1
Views
996
Replies
1
Views
3K
Replies
7
Views
2K
Replies
1
Views
2K
Replies
8
Views
3K
Back
Top