Group Abstract Group Abstract

Message Boards Message Boards

Solving Nonlinear Differential Equation from 0 to Infinity using Shooting

Posted 9 years ago

Hi everyone, I am new to this forum and new to Mathematica. I am trying to solve the following differential equation from 0 to Infinity. My first approach was to simply use NDSolve with the boundary conditions at 0 and Infinity and making a certain cutoff since you can't go to Infinity after all. However, this led to problems since boundary errors occured(boundary values could not be fulfilled) Therefore I thought it might be better to implement a shooting method and stretching the intervall as far as possible 0.001-10, then 0.0001-100, ... However, this leads to oscillations (as soon as I get higher than 10 with the upper boundary) which is not in accordance to the solution which should be an exponential fallof for large r. Furthermore the following error keeps occuring- I already tried googeling it, but I am still not entirely sure if it is really bad or not. At x == ..., step size is effectively zero; \ singularity or stiff system suspected.

Here is my code:

start = 0.00001;
inf = 100;
e = 4.84;
beta = 0.263;
Du = (beta^2)/4.
deqn = {(0.25*x^2 + 2*(Sin[F[x]])^2)*F''[x] + 0.5*x*F'[x] +
     Sin[2*F[x]]*F'[x]*F'[x] - 0.25*Sin[2*F[x]] - 
     Sin[2*F[x]]*((Sin[F[x]])^2)*x^(-2) - Du*x^2*Sin[F[x]] == 0., 
   F[start] == Pi, F'[start] == dy0};
ydysol1 = ParametricNDSolve[deqn, F, {x, 0, inf}, dy0][[1]]
dysol1 = Minimize[((F[dy0] /. ydysol1)[inf])^2 , dy0]
p2 = Plot[(F[dy0] /. ydysol1 /. dysol1[[2]])[x], {x, 0, inf}, 
  PlotStyle -> Red]
Attachments:
POSTED BY: Raphaela W.
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard