Boundary conditions shooting method

Click For Summary
SUMMARY

The discussion focuses on solving the differential equation ##\frac{d^{2}y}{dr^2}+(\frac{1}{r}+1)y=0## using the shooting method with specific boundary conditions. The user seeks guidance on implementing these conditions in Mathematica, particularly how to adjust the initial conditions and check for convergence. An alternative approach is suggested, utilizing Numerov's method instead of the Runge-Kutta algorithm, emphasizing the importance of starting from a sufficiently large value of ##r## to approximate the boundary conditions effectively.

PREREQUISITES
  • Understanding of differential equations and boundary value problems
  • Familiarity with Mathematica programming and syntax
  • Knowledge of numerical methods, specifically the shooting method
  • Experience with Numerov's method for solving differential equations
NEXT STEPS
  • Implement the shooting method in Mathematica for boundary value problems
  • Explore Numerov's method for solving second-order differential equations
  • Research techniques for verifying boundary conditions in numerical solutions
  • Study variations of the Coulomb potential and their numerical solutions
USEFUL FOR

Mathematicians, physicists, and engineers working on numerical solutions to differential equations, particularly those dealing with boundary value problems and interested in advanced numerical methods.

spaghetti3451
Messages
1,311
Reaction score
31
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
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:

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
22
Views
5K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
1
Views
3K
Replies
4
Views
2K
Replies
13
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K