Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.9K Views
|
3 Replies
|
1 Total Like
View groups...
Share
Share this post:

Integrating second order differential equation

Posted 11 years ago
POSTED BY: Filippo Cova
3 Replies
POSTED BY: W. Craig Carter
Posted 11 years ago

Thank you very much for you help, I tried your suggestions. However, my specific problem requests conditions for x=0, is there a way to do this avoiding the singularity?

POSTED BY: Filippo Cova

Hello, There is probably a clever way to do this by looking at the limits as $t_{init}\rightarrow 0$, but this will give you a visual clue about the behavior:

Clear[nsol]

nsol[init_ ] := 
 y /. NDSolve[{y''[x] + (2/x) y'[x] + g[y[x], 2, 2, 3] == 0, 
     y[init] == 2, y'[init] == 0}, y, {x, init, 2}][[1]]

Manipulate[
 Plot[nsol[init][t], {t, init, 2}, PlotRange -> {{0, 2}, All}], {init,
   0.0001, .1}]

or,

nsol2[eps_ ] := 
 y /. NDSolve[{ y''[x] + (2/(x + eps)) y'[x] + g[y[x], 2, 2, 3] == 0, 
     y[0] == 2, y'[0] == 0}, y, {x, 0, 2}][[1]]

Manipulate[
 Plot[nsol2[eps][t], {t, 0, 2}, 
  PlotRange -> {{0, 2}, All}], {{eps, 0.01}, .0001, .1}]
POSTED BY: W. Craig Carter
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard