FixedPoint

FixedPoint[f,expr]

starts with expr, then applies f repeatedly until the result no longer changes.

FixedPoint[f,expr,n]

stops after at most n steps.

Details and Options

  • FixedPoint always returns the last result it gets.
  • You can use Throw to exit from FixedPoint before it is finished.
  • FixedPoint[f,expr] applies SameQ to successive pairs of results to determine whether a fixed point has been reached.
  • FixedPoint[f,expr,,SameTest->s] applies s to successive pairs of results.

Examples

open allclose all

Basic Examples  (3)

Find a value such that :

Fixed point of an integer-valued function:

Repeated application of a rule until the result no longer changes:

Scope  (2)

Numerical fixed point of a function:

Fixed point of a repeated transformation:

Generalizations & Extensions  (1)

Stop after at most 10 steps:

Options  (2)

SameTest  (2)

Stop as soon as successive iterations differ by less than :

Perform exact arithmetic, but use a numerical comparison function:

Applications  (8)

Find using Newton's method:

Fixed point of a complex iteration:

Matrix-multiplication convergence:

Root of the current directory tree (the result will depend on computer system):

Repeated differentiation:

Find the minimum of with the steepest-descent method (vector notation):

Component notation:

Evaluate combinators [more info]:

Connected components in a graph:

Properties & Relations  (3)

FixedPoint gives the last element of FixedPointList:

Apply rules repeatedly until the result no longer changes using ReplaceRepeated (//.):

FixedPoint is equivalent to a particular choice of arguments of NestWhile:

Possible Issues  (2)

Calculations may not converge in a finite number of steps:

Providing a maximum number of iterations will guarantee termination:

Using a numerical test for convergence works in this case as well:

Convergence may fail in machine-precision computations due to oscillations in the final digits. Use a test function with a larger tolerance than SameQ to resolve this:

Wolfram Research (1988), FixedPoint, Wolfram Language function, https://reference.wolfram.com/language/ref/FixedPoint.html (updated 1996).

Text

Wolfram Research (1988), FixedPoint, Wolfram Language function, https://reference.wolfram.com/language/ref/FixedPoint.html (updated 1996).

CMS

Wolfram Language. 1988. "FixedPoint." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/FixedPoint.html.

APA

Wolfram Language. (1988). FixedPoint. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FixedPoint.html

BibTeX

@misc{reference.wolfram_2024_fixedpoint, author="Wolfram Research", title="{FixedPoint}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/FixedPoint.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_fixedpoint, organization={Wolfram Research}, title={FixedPoint}, year={1996}, url={https://reference.wolfram.com/language/ref/FixedPoint.html}, note=[Accessed: 21-November-2024 ]}