Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2001
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2001

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

Search the Archive

Re: FindRoot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg31512] Re: FindRoot
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Thu, 8 Nov 2001 04:55:50 -0500 (EST)
  • References: <9sb3u5$8oc$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

<Pieter-Jan.DeSmet at fys.kuleuven.ac.be> wrote in message
news:9sb3u5$8oc$1 at smc.vnet.net...
> Dear Sir,
>
> Can you clarify the following error message?
>
> In[3]:= f[i_] := x == i
>
> In[5]:= FindRoot[f[1], {x, 0}]
>
> FindRoot::frnum: Function {False} is not a length 1 list of
> numbers at {x} = {0.}.
>
> Out[5]=FindRoot[f[1], {x, 0}]
>
>
> This is a simplified version of an error message I got in a more
> difficult case. I hope that I have not made a stupid mistake.
>
> Thank you very much
>
> Pieter-Jan De Smet
>

Pieter:

    FindRoot[Evaluate[f[1]],{x,0}]

        {x->1.}

The reason is that FindRoot has the attribute HoldAll, and unevaluated f[1]
is an improper entry.
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565





  • Prev by Date: Re: FindRoot
  • Next by Date: Re: ListContourPlot Color
  • Previous by thread: Re: FindRoot
  • Next by thread: Re: FindRoot