MathGroup Archive 2005

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

Search the Archive

Re: Re: FindRoot: Failed to converge to the

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57494] Re: [mg57481] Re: [mg57464] FindRoot: Failed to converge to the
  • From: <topolog at gazeta.pl>
  • Date: Sun, 29 May 2005 21:00:11 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

> What was the code you used in version 4?


Here it is:

dYdX = EQJ;
Y1X1 = {v[z1] == BCV1, v'[z1] == BCV2};
eqset = Join[{dYdX}, Y1X1];

FindRoot[ 
( NDSolve[eqset /. {W -> w}, v, {z, z1, z2}][[1,1,2]]              
                           )[z2] == BCV3, {w, {w1, w2}}]

As you can see, in version 5.1 I based on the old 4.0 code as close
as possible. Starting values for W (w1, w2) are appropriately chosen
in both cases.

Regards



> 
> On 5/28/05, topolog at gazeta.pl <topolog at gazeta.pl> wrote:
> > Dear Mathematica Users,
> >
> > This is a valid part of a code that provides shooting method to
> > solve equation EQJ = J1(W,z)*v(z) + J2(W,z)*v'(z) + J3(W,z)*v''(z)
> > == 0 (--THIS IS THE CORRECT FORM!!--)
> > with W - an eigenvalue:
> >
> > dYdX[W_?NumericQ] := EQJ; (* the equation *)
> > Y1X1[W_?NumericQ] := {v[z1] == BCV1, v'[z2] == BCV2}; (* boundary
> > conditions, BCV2 is W-dependent *)
> > eqset[W_?NumericQ] := Join[{dYdX[W] == 0.}, Y1X1[W]]; (* the set of
> > the above *)
> >
> > (* function that solves eqset for the specified W *)
> > ndsolut[W_?NumberQ] := NDSolve[eqset[W], v, {z, z1, z2}][[1, 1, 2]];
> >
> > (* searching for W that satisfies another boundary condition *)
> > FindRoot[ndsolut[W][z2] == BCV3, {W, W1, W2}]
> >
> > While in version 4.0 of Mathematica similar code was able to find
> > solutions quickly and accurately, the 5.1 version breaks after 100
> > iterations in FindRoot:
> >
> > FindRoot::cvmit: Failed to converge to the requested accuracy or
> > precision within 100 iterations
> >
> > Any sugestion, please.
> >
> > Rafal Kosinski
> >
> > P.S. The J-functions are rather complex so I do not present them
> > here. They are dependent of z-coordinate through
> > InterpolatingFunction[{{0., 3000.}}, <>][z] and of W in powers from
> > 1 to 10.
> >
> >
> >
> >
> >
> >
> 
> 





  • Prev by Date: Re: sorting complex number?
  • Next by Date: Re: Re: Solve or Reduce on a monstrosity of an expresssion (and a prize!)
  • Previous by thread: Re: NDSolve, FindRoot and shooting method - PROBLEM SOLVED
  • Next by thread: What is causing this error message?