Difference between revisions of "Nest"

From TORI
Jump to navigation Jump to search
Line 22: Line 22:
   
 
==Restriction==
 
==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 bug will be corrected.
+
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==
 
==Examples==

Revision as of 01:39, 28 July 2013

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 2011, 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 [1]. 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]$

The square root of factorial 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.

However, in the trivial case, the 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 [2]) 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.

References

  1. http://reference.wolfram.com/mathematica/ref/Nest.html
  2. http://www.ils.uec.ac.jp/~dima/PAPERS/2009supefae.pdf D.Kouznetsov, H.Trappmann. Superfunctions and square root of factorial. Moscow University Physics Bulletin, 2010, v.65, No.1, p.6-12.