MathGroup Archive 2001

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

Search the Archive

Re: FindRoot Related Question


Don Paddleford wrote:
> 
> I have been unable to get FindRoot to run on simultaneous equations which
> include terms such as Sign[x[1]-x[2]] or UnitStep[x[1]-x[2]].  When I
> checked to see if the equations accidently contained some undefined variable
> (using Variables[on equation terms]  I was surprised  the list of variables
> included Sign or UnitStep of [x[1]-x[2]] as well as the true variables like
> x[1] and x[2]. How get around this?
> 
> Thanks
> Don Paddleford

Variables will not tell you how FindRoot regards your expression.

My guess is that FindRoot will prefer real-analytic functions. At the
very least, don't try this with just one starting value; you'll want to
use a secant method, so specify two values.

To get real-analytic functions, you might use

Abs[f]-->Sqrt[f^2]
Sign[f]-->f/Abs[f]
UnitStep[f]-->1/2*(f+Abs[f])

which are correct almost everywhere for real-valued f.


Daniel Lichtblau
Wolfram Research


  • Prev by Date: Algebraic Integers
  • Next by Date: Re: help to plot..please
  • Previous by thread: Re: Algebraic Integers
  • Next by thread: Two questions concerning ListDensityPlot ...