MathGroup Archive 2005

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

Search the Archive

Re: FindRoot: Failed to converge to the requested accuracy - CORRECTION

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57481] Re: [mg57464] FindRoot: Failed to converge to the requested accuracy - CORRECTION
  • From: Chris Chiasson <chris.chiasson at gmail.com>
  • Date: Sun, 29 May 2005 01:03:41 -0400 (EDT)
  • References: <200505280940.FAA21796@smc.vnet.net>
  • Reply-to: Chris Chiasson <chris.chiasson at gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

What was the code you used in version 4?

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.
> 
> 
> 
> 
> 
> 


-- 
Chris Chiasson
http://chrischiasson.com/
1 (810) 265-3161


  • Prev by Date: Re: Complex Oddity
  • Next by Date: Re: Complex Oddity
  • Previous by thread: FindRoot: Failed to converge to the requested accuracy - CORRECTION
  • Next by thread: using Scripts with GUIKit (bug?)