MathGroup Archive 1999

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

Search the Archive

FindRoot behaving funny?

  • To: mathgroup at
  • Subject: [mg15752] FindRoot behaving funny?
  • From: "Doug Webb" <D_Webb at>
  • Date: Fri, 5 Feb 1999 03:42:47 -0500 (EST)
  • Organization: Prodigy Services, Inc
  • Sender: owner-wri-mathgroup at

  This is a simplified example of I problem I have run into with
FindRoot. Does anybody have any idea why it's doing what it is? And if
so, how I can make it do what I want, or some other work around? Thanks
for any info. Here's the example:

define a function that takes one input, and outputs two results:

r[x_] := {x, x^2}

It does what's expected:


Now, find a solution using FindRoot:

FindRoot[ r[x] == {5, 25}, {x, 2}]

returns an error (rather than the obvious answer of x->5):

    "Function {{-3., -21.}} is not a length 1 list of numbers at {x}

It seems that FindRoot REQUIRES you to solve for as many variables as
your function returns. Even though when entered seperatly, r[5] == {5,
25} returns "true". Why? Any ideas? Or any ideas how to get around this
"feature" of FindRoot? Thanks for any input.

      D_Webb at
      Douglas.S.Webb at

  • Prev by Date: Re: a tricky limit
  • Next by Date: Options for Cell: Why are some of these System symbols and others not?
  • Previous by thread: Re: a tricky limit
  • Next by thread: Re: FindRoot behaving funny?