FindRoot: Failed to converge to the requested accuracy - CORRECTION

• To: mathgroup at smc.vnet.net
• Subject: [mg57464] FindRoot: Failed to converge to the requested accuracy - CORRECTION
• From: <topolog at gazeta.pl>
• Date: Sat, 28 May 2005 05:40:24 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

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

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: global fit
• Next by Date: using Scripts with GUIKit (bug?)
• Previous by thread: Re: global fit
• Next by thread: Re: FindRoot: Failed to converge to the requested accuracy - CORRECTION