RecurrenceTable

RecurrenceTable[eqns,expr,{n,nmax}]

generates a list of values of expr for successive n based on solving the recurrence equations eqns.

RecurrenceTable[eqns,expr,nspec]

generates a list of values of expr over the range of n values specified by nspec.

RecurrenceTable[eqns,expr,{n1,},{n2,},]

generates an array of values of expr for successive n1, n2, .

Details and Options

  • The eqns must be recurrence equations whose solutions over the range specified can be determined completely from the initial or boundary values given.
  • The eqns can involve objects of the form a[n+i] where i is any fixed integer.
  • The range specification nspec can have any of the forms used in Table.
  • The following options can be given:
  • DependentVariablesAutomaticthe list of all dependent variables
    MethodAutomaticmethod to use
    WorkingPrecisionAutomaticprecision used in internal computations
  • With DependentVariables->Automatic, RecurrenceTable attempts to determine the dependent variables by analyzing the equations given.
  • With WorkingPrecision->Automatic, results for exact inputs are computed exactly, and for inexact inputs, the precision to use is determined adaptively at each iteration.
  • With WorkingPrecision->p, a fixed precision p is used for all iterations.

Examples

open allclose all

Basic Examples  (4)

Solve an initial-value problem for a first-order difference equation:

In[1]:=
Click for copyable input
Out[1]=

Find the first few Fibonacci numbers:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Study the evolution for a nonlinear map of the plane:

In[1]:=
Click for copyable input
Out[1]//Short=
In[2]:=
Click for copyable input
Out[2]=

Compute a table of Stirling numbers of the first kind:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (9)

Generalizations & Extensions  (3)

Options  (3)

Applications  (6)

Properties & Relations  (2)

Neat Examples  (1)

See Also

RSolve  Table  FindInstance  NDSolve  RecurrenceFilter

Introduced in 2008
(7.0)