] starts with expr, then applies f repeatedly until the result no longer changes.
] stops after at most n steps.
FixedPoint always returns the last result it gets.
The option SameTest
comp allows you to specify a comparison function to apply to successive pairs of results to determine whether a fixed point has been reached.
You can use Throw to exit from FixedPoint before it is finished.
See the Mathematica book: Section 2.2.2.
See also: FixedPointList, Nest, ReplaceRepeated.
This finds a fixed point of the cosine function.
Although the function has a fixed point at zero (), it converges to this point very slowly. You can control the behavior of FixedPoint in this type of situation by relaxing the conditions under which it will terminate. In this example, FixedPoint will terminate after two successive results differ by less than 0.0001.
With FixedPoint you can implement Newton's method in one line.
The default stopping criterion for FixedPoint measures the closeness of successive approximations to one another, whereas the tests built into FindRoot (via the AccuracyGoal option) measure the closeness of the function evaluation to zero. By setting the SameTest option you could imitate the criterion of FindRoot. (The SameTest function doesn't have to be a comparision of two iterations: it can just test the most recent one for some property.)
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER
FOR THE LATEST INFORMATION.