# Nest

Jump to: navigation, search

Nest is name of function in the Mathematica software, that evaluates iterations of a function. The call of this function has form

$$\mathrm{Nest}[f,z,c]$$

where $$f$$ is name of iterated function, $$z$$ is initial value of the argument, and $$c$$ is number of iterations. Up to year 2013, the implementation has serious restrictions.

## Iteration of functions

The $$c$$th iteration of some function $$f$$ can be expressed through the superfunction $$F$$ and the Abel function $$G=F^{-1}$$:

$$f^c(z)=F(c+G(z))$$

In Mathematica, the operation, that could evaluate such a expression, is called Nest . This function has 3 arguments:

The first argument indicates the name of the function.

The second argument indicates the initial value.

The third (and last) argument indicates the number of iterations.

Then, the $$c$$th iteration of function $$f$$ can be written as $$f^c(z)=\mathrm {Nest}[f,z,c]$$.

## Restriction

For year 2013, the implementation of the Nest has serious defect: the number of iterations should allow the simplification to an integer constant. The intents to call function Nest with any other expression as the last argument cause the error messages. One may hope, in the future versions of Mathematica this defect will be corrected.

## Examples

With function Nest, the tetration could be expressed as follows:

$$\mathrm{tet}(z)=\mathrm{Nest}[\exp,0,z]$$

Iteration of exponential could be expressed with

$$\exp^n(z)=\mathrm{Nest}[\exp,z,n]$$

The square root of factorial, that is used as [logo]] of the Physics department of the Moscow State University, could be expressed as

$$\sqrt{!\,}(z)=\mathrm{Nest}[\mathrm{Factorial},z,1/2]$$

Due to the restriction mentioned, yet, such representation cannot be used even to plot graphics of these functions for non-integer number of iterates.

However, in the trivial case, while the number of iteration can be simplified to positive integer constant, the built-in function Nest is usable; for example, expression $$~\mathrm{Nest}[\sin,z,2]~$$ returns $$~\sin(\sin(z))~$$.

## Table of superfunctions

The table of known superfunctions and the corresponding Abel functions (similar to that suggested in ) could be loaded in Mathematica in a manned similar to that the table of integrals is loaded. This would allow the correct implementation of Nest for the case of non–integer number of iterations.