MathGroup Archive 1997

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

Search the Archive

Re: NDSolve problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg6560] Re: NDSolve problem
  • From: Mark James <mrj at cs.usyd.edu.au>
  • Date: Tue, 1 Apr 1997 19:00:57 -0500 (EST)
  • Organization: Basser Dept of Computer Science, University of Sydney, Australia
  • Sender: owner-wri-mathgroup at wolfram.com

Here's some code that will eliminate all errors except the
exhaustion of the maximum number of steps in NDSolve
due to the asymptote around x=0.17:

Off[ FindRoot::precw ];
SetOptions[ FindRoot, MaxIterations->40 ];
FFunc1[y_Real]:= theta /. FindRoot[Cos[y*theta]==0.0, {theta,2,5}];
sol = y /. NDSolve[{y'[x]==FFunc1[y[x]], y[0]==1.}, {y}, {x,0,1} ][[1]];
Plot[ sol[x],  {x, 0, sol[[1,1,2]]}, PlotRange->All ];

-- 
Mark James                                  |EMAIL : mrj at cs.usyd.edu.au|
Basser Department of Computer Science, F09  |PHONE : +61-2-351-3423    |
The University of Sydney NSW 2006 AUSTRALIA |FAX   : +61-2-351-3838    |
================- WEB: http://www.cs.usyd.edu.au/~mrj -=================


  • Prev by Date: Multiple Integrals, Partial Derivatives
  • Next by Date: Re: Solve and Plot
  • Previous by thread: Re: NDSolve problem
  • Next by thread: Re: NDSolve problem