Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

A function is defined as f[x_]=Sqrt[1-x^2].

How can I determine the fixed point of f?

I've tried this:

FixedPoint[Sqrt[1-x^2],0]

But it only keeps running.

So, help please.

share|improve this question

closed as off-topic by Mark McClure, ubpdqn, RunnyKine, Michael E2, bobthechemist Aug 1 at 2:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Mark McClure, ubpdqn, RunnyKine, Michael E2, bobthechemist
If this question can be reworded to fit the rules in the help center, please edit the question.

2  
$f(f(x))=\sqrt{1-(\sqrt{1-x^2})^2}=x$ which is how you know, analytically, that it will just flip between two values like in Mark's –  Pickett Aug 1 at 0:31

1 Answer 1

up vote 5 down vote accepted

The commands FixedPoint and FixedPointList are rather specialized versions of Nest and NestList - both sets of commands perform functional iteration but the FixedPoint versions stop when the iterate stops changing. The *List versions return the whole computed sequence of iterates, while the non-List versions return just the last iterate. Thus,

Short[FixedPointList[Cos,1.0],2]
FixedPoint[Cos,1.0]
(* Out:
  {1.,0.540302,0.857553, <<87>>, 0.739085,0.739085,0.739085}
  0.739085
*)

Note that Cos is a function, not an expression. Thus, you iterate Cos, not Cos[x]. Now in your case, since you've defined f in your first line, you can iterate f. The computation never quits, however:

f[x_] = Sqrt[1 - x^2];
FixedPoint[f, 0]
(* Out:  $Aborted *)

You can use the FixedPointList command with the optional third argument to terminate the computation to see what happened:

f[x_] = Sqrt[1 - x^2];
FixedPointList[f, 0, 10]
(* Out:  {0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0} *)

As I mentioned in the comments, though, the fixed point can easily be found using Solve:

Solve[Sqrt[1 - x^2] == x, x]
(* Out: {{x -> 1/Sqrt[2]}} *)
share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.