Re: FindRoot Related Question
- To: mathgroup at smc.vnet.net
- Subject: [mg28502] Re: FindRoot Related Question
- From: Daniel Lichtblau <danl at wolfram.com>
- Date: Sun, 22 Apr 2001 21:03:18 -0400 (EDT)
- Organization: Wolfram Research, Inc.
- References: <9b8oim$7er@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
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