Boundary conditions shooting method

In summary, the conversation discusses the method to solve a differential equation with specific boundary conditions. The shooting method is suggested, but the implementation of the boundary conditions is causing trouble. The use of Mathematica and NDSolve is mentioned, but the approach of starting from the right and using the Numerov method is suggested instead. Further research on the topic is recommended.
  • #1
spaghetti3451
1,344
33
I am trying to solve the differential equation

##\frac{d^{2}y}{dr^2}+(\frac{1}{r}+1)y=0##

with the boundary conditions

##y(r) \rightarrow r \frac{dy}{dr}(0)## as ##r \rightarrow 0## and ##y(r) \rightarrow \sin(kr+\delta)## as ##r \rightarrow \infty##.

I know that the shooting method is the way to go, but am having trouble figuring out how to implement the boundary conditions.

Are the following lines of code in Mathematica alright? I have not yet wrapped it around a root-finding algorithm.

differential equation = {y''[r] + ((1/r) + 1) y[r] == 0, y[0] == 0, y'[0] == 5};
sol = NDSolve[diffeq, y, {r, 0, 200}, Method -> "ExplicitRungeKutta"];Now, how do I change y[0]=0 in the code above to the first boundary condition.

Also, I know that the value of y[0] is to be changed and the code run until the second boundary condition is satisfied. What check should I use for that? Do I just check if the solution lies between -1 and 1 as ##r \rightarrow \infty##
 
Technology news on Phys.org
  • #2
These boundary conditions might be nice for an analytical solution, but not for a numerical one!

I would take a slightly different approach, and start from the right. Choose a value of ##r## that is big enough to be considered "infinity." At that point, you can easily find ##y## and ##y'##, so you can integrate the equation towards ##r=0##. This requires you to guess the value of ##\delta##. You can then check the solution at ##r \rightarrow 0## and vary ##\delta## until the left boundary condition is fulfilled.

For such a problem, I would not use a Runge-Kutta algorithm, but the Numerov[/PLAIN] method. Also, this is a variation of the Coulomb potential for an electron in an atom. There are probably more clever methods to solve that problem. You should try to look up what has been published on the subject.
 
Last edited by a moderator:

Related to Boundary conditions shooting method

1. What is the boundary conditions shooting method?

The boundary conditions shooting method is a numerical technique used to solve differential equations by converting them into boundary value problems. It involves solving an initial value problem multiple times with different initial conditions until the desired boundary conditions are satisfied.

2. What types of problems can the boundary conditions shooting method be applied to?

The boundary conditions shooting method can be applied to a wide range of problems, including heat transfer, fluid flow, and structural analysis. It is particularly useful for problems with complex boundary conditions or systems of equations.

3. How does the boundary conditions shooting method differ from other numerical methods?

The boundary conditions shooting method differs from other numerical methods, such as finite difference or finite element methods, in that it focuses on satisfying the boundary conditions rather than discretizing the problem domain. It can also handle problems with variable boundary conditions and multiple solutions.

4. What are the advantages of using the boundary conditions shooting method?

The boundary conditions shooting method offers several advantages, including its ability to handle complex boundary conditions, its flexibility in solving systems of equations, and its accuracy in obtaining solutions. It is also computationally efficient and does not require a fine mesh, making it faster and more cost-effective than some other numerical methods.

5. What are the limitations of the boundary conditions shooting method?

While the boundary conditions shooting method has many advantages, it also has some limitations. It may not be suitable for problems with discontinuities or singularities, and it requires an initial guess for the solution. Additionally, it may be more challenging to implement for higher-order differential equations or systems of equations with a large number of variables.

Similar threads

  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
22
Views
3K
Replies
1
Views
2K
  • Programming and Computer Science
Replies
1
Views
831
Replies
4
Views
912
  • Precalculus Mathematics Homework Help
Replies
7
Views
567
  • Calculus and Beyond Homework Help
Replies
2
Views
768
  • Programming and Computer Science
Replies
4
Views
2K
Back
Top