Re: problems with FindRoot: what worked with 4.2 does not work with 5.0

*To*: mathgroup at smc.vnet.net*Subject*: [mg47379] Re: [mg47356] problems with FindRoot: what worked with 4.2 does not work with 5.0*From*: Gerry Flanagan <flanagan at materials-sciences.com>*Date*: Wed, 7 Apr 2004 03:16:39 -0400 (EDT)*References*: <200404061036.GAA09266@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

The usual fix for us is to modify the functions so that they only execute for numerical input. This can be done by placing a NumberQ conditional with some or all of the input arguments. I'm guessing that without the conditional, FindRoot now attempts a symbolic derivative, and fails if you have a complex function (like anything containing an If statement). Gerry Flanagan At 06:36 AM 4/6/2004, Edgar Dachs wrote: >Computers & Geosciences, 24/3: 219-235) und worked out a >new version that I tested with Mathematica version 4.2. With 5.0, I now >find problems that several of my functions do not work any more, >obviously do to changes that have been employed between 4.2 and 5.0 >concerning FindRoot. >Below is a little test-function that illustrates the problem: the >return-value of the function depends on the value of x, as in the much >more complex petrological functions that I have written, where >calculations depend e.g. on the value

**References**:**problems with FindRoot: what worked with 4.2 does not work with 5.0***From:*"Edgar Dachs" <edgar.dachs@sbg.ac.at>