Message Boards Message Boards

0
|
1272 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

NIntegrate::slwcon error in Rolf Winter’s problem

Posted 7 months ago

The notebook comes from Jim Napolitano tuf43817@temple.edu, and it throws the message NIntegrate::slwcon, as shown below:

How to fix this problem?

Regards, Zhao

POSTED BY: Hongyi Zhao
4 Replies
Posted 7 months ago

I try to use ParallelEvaluate as follows:

\[Psi] = 
  NIntegrate[(qJac intg) /. q -> qu /. vals /. f -> 0 /. T -> Ts,
    {u, 0, 1}, {l, -1, 0}, PrecisionGoal -> 4] // ParallelEvaluate;

However, no effect was observed either.

Regards, Zhao

POSTED BY: Hongyi Zhao

We can speed up computation:

for more info see here

POSTED BY: Mariusz Iwaniuk
Posted 7 months ago

I give the following comments about these two methods, aka, the original one and the Gauss-Kronrod Quadrature:

The results derived from both methods provide a visualization of the time-dependent probability distribution that a particle will be found inside a given well. Both graphs generated by these methods outline the decaying trend in this probability as time progresses, which adheres logically to the expected physical behavior of a particle in a bound state over time.

Also, it's essential to note that both methods are grappling with intricate mathematical modeling likely involving highly oscillatory integrands, potential singularities, and finite precision, all of which present considerable numerical challenges. Due to these built-in complexities, some discrepancies between the two methods are expected and generally acceptable within limits.

The first method appears to undergo some convergence issues, as indicated by the error message, likely due to the complexity of the integrand and the approximations used within NIntegrate.

The second method, which employs Gauss-Kronrod quadrature, seems to handle this complexity better. By increasing working precision, representing the function to be integrated in compiled code, and using a different numerical integration technique, the computation appears to be more stable and less prone to potential sources of numerical instability.

In summary, while both methods indicate a physically intuitive result – a decay of state with time, the second method seems to offer a more numerically stable implementation, which might be more robust in this particular context. However, the most suitable method would generally rely on the specific requirements and constraints of the underlying problem.

Regards, Zhao

POSTED BY: Hongyi Zhao

Update code for this:

Ts = Rationalize[{0, 0.01, 0.025, 0.05, 0.075, 0.1, 0.2, 0.3, 0.4, 0.5,
      1, 2, 4, 6, 8, 8.25, 8.5, 8.75, 9, 9.125, 9.25, 9.375, 9.5, 9.625,
       9.75, 9.875,
      10, 10.25, 10.5, 10.75}, 0];

NIntegrate[(qJac intg) /. q -> qu /. vals /. f -> 0 /. T -> Ts,
  {u, 0, 1}, {l, -1, 0}, Method -> "LocalAdaptive"]

but time computation is more exstensive.

Regards M.I.

POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract