MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Coupled second-order nonlinear ODEs

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90504] Re: Coupled second-order nonlinear ODEs
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 11 Jul 2008 02:03:13 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <g54olq$f15$1@smc.vnet.net>

dkjk at bigpond.net.au wrote:

> I'm trying to solve the following system
> 
> \[Lambda]1 = 1;
> \[Lambda]2 = 1;
> M = 1;
> v = 1;
> h = 1;
> m = 20;
> s = NDSolve[{-1/2 (-M^2 + h \[Eta][y]^2) \[CurlyPhi][y] -
>      2 \[Lambda]1 \[CurlyPhi][y]^3 + \[CurlyPhi]''[y] ==
>     0, -4 \[Eta][y] (-v^2 + \[Eta][y]^2) \[Lambda]2 -
>      h \[Eta][y] \[CurlyPhi][y]^2 + \[Eta]''[y] == 0, \[Eta][0] ==
>     0, \[Eta]'[0] == 1, \[CurlyPhi][0] == 1, \[CurlyPhi]'[0] ==
>     0}, {\[Eta], \[CurlyPhi]}, {y, -m, m}, WorkingPrecision -> 20]
> Plot[\[CurlyPhi][y] /. s, {y, -m, m}]
> Plot[\[Eta][y] /. s, {y, -m, m}]
> 
> but keep running into the error ``step size is effectively zero;
> singularity or stiff system suspected''.  I tried increasing
> WorkingPrecision to no avail.  Can anyone please advise if Mathematica
> is able to solve this?

Your system is really stiff, I mean *really* stiff, on the given range 
for y. Do you need m as large as twenty? Everything is fine up to m 
about 1.4. Setting m = 7/5, we do not need to add any options to NDSolve 
and it does not return any warning message.

     \[Lambda]1 = 1; \[Lambda]2 = 1; M = 1; v = 1; h = 1; m = 7/5;

     s = NDSolve[{-1/2 (-M^2 + h \[Eta][y]^2) \[CurlyPhi][y] -
      2 \[Lambda]1 \[CurlyPhi][y]^3 + \[CurlyPhi]''[y] ==
     0, -4 \[Eta][y] (-v^2 + \[Eta][y]^2) \[Lambda]2 -
      h \[Eta][y] \[CurlyPhi][y]^2 + \[Eta]''[y] == 0, \[Eta][0] ==
     0, \[Eta]'[0] == 1, \[CurlyPhi][0] == 1, \[CurlyPhi]'[0] ==
     0}, {\[Eta], \[CurlyPhi]}, {y, -m, m}]

     Plot[\[CurlyPhi][y] /. s, {y, -m, m}]

     Plot[\[Eta][y] /. s, {y, -m, m}]

Also, you may want to explore some of the numerous solvers available for 
NDSolve. See,

http://reference.wolfram.com/mathematica/tutorial/NDSolveStiffnessSwitching.html

http://reference.wolfram.com/mathematica/tutorial/NDSolveOverview.html

HTH,
-- Jean-Marc


  • Prev by Date: Re: Trouble related to "CSV"
  • Next by Date: Re: What does FullForm[ ] actually do?
  • Previous by thread: Coupled second-order nonlinear ODEs
  • Next by thread: Re: Coupled second-order nonlinear ODEs