Difference between revisions of "Iteration Command"

From GeoGebra Manual
Jump to: navigation, search
(added user's example)
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude>
 
<noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude>
 
{{command|function}}
 
{{command|function}}
; Iteration[Function, Number x0, Number n]: Iterates the function ''n'' times using the given start value ''x0''.
+
;Iteration[ <Function>, <Number x0>, <Number n> ]:Iterates the function ''n'' times using the given start value ''x0''.
: {{Examples| 1=After defining <code>f(x) = x^2</code> the command <code>Iteration[f, 3, 2]</code> gives you the result ''(3<sup>2</sup>)<sup>2</sup>=81'';
+
:{{Examples|1=<br><br>After defining <code>f(x) = x^2</code> the command <code>Iteration[f, 3, 2]</code> gives you the result ''(3<sup>2</sup>)<sup>2</sup>=81'';<br><br>Another example of the use of this command is the repeated addition of 7 to the number 3: <br />Let g(x) = x+7.  The command <code>Iteration[g, 3, 4]</code> yields the result (((3+7) +7) +7) +7 = 31.}}
::Another example of the use of this command is the repeated addition of 7 to the number 3: <br />
 
::Let g(x) = x+7.  The command <code>Iteration[g, 3, 4]</code> yields the result (((3+7) +7) +7) +7 = 31.}}
 

Revision as of 23:30, 14 December 2012


Iteration[ <Function>, <Number x0>, <Number n> ]
Iterates the function n times using the given start value x0.
Examples:

After defining f(x) = x^2 the command Iteration[f, 3, 2] gives you the result (32)2=81;

Another example of the use of this command is the repeated addition of 7 to the number 3:
Let g(x) = x+7. The command Iteration[g, 3, 4] yields the result (((3+7) +7) +7) +7 = 31.
© 2024 International GeoGebra Institute