THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

RSolve

 RSolve[eqn, a[n], n]solves a recurrence equation for a[n]. RSolve[{eqn1, eqn2, ...}, {a1[n], a2[n], ...}, n]solves a system of recurrence equations. RSolve[eqn, a[n1, n2, ...], {n1, n2, ...}]solves a partial recurrence equation.
• RSolve[eqn, a, n] gives solutions for a as pure functions.
• The equations can involve objects of the form a[n+] where is a constant, or in general, objects of the form a[[n]], a[[[n]], a[[...[[n]]...]], where can have forms such as:
 n+ arithmetic difference equation n geometric or -difference equation n+ arithmetic-geometric functional difference equation n geometric-power functional difference equation linear fractional functional difference equation
• Equations such as a[0]val can be given to specify end conditions.
• If not enough end conditions are specified, RSolve will give general solutions in which undetermined constants are introduced.
• The constants introduced by RSolve are indexed by successive integers. The option GeneratedParameters specifies the function to apply to each index. The default is , which yields constants C[1], C[2], ... .
• For partial recurrence equations, RSolve generates arbitrary functions C[n][...].
• Solutions given by RSolve sometimes include sums that cannot be carried out explicitly by Sum. Dummy variables with local names are used in such sums.
• RSolve sometimes gives implicit solutions in terms of Solve.
• RSolve handles both ordinary difference equations and q-difference equations.
• RSolve handles difference-algebraic equations as well as ordinary difference equations.
• RSolve can solve linear recurrence equations of any order with constant coefficients. It can also solve many linear equations up to second order with nonconstant coefficients, as well as many nonlinear equations.
Solve a difference equation:
Include a boundary condition:
Get a "pure function" solution for a:
Substitute the solution into an expression:
Solve a functional equation:
Solve a difference equation:
 Out[1]=

Include a boundary condition:
 Out[1]=

Get a "pure function" solution for a:
 Out[1]=
Substitute the solution into an expression:
 Out[2]=

Solve a functional equation:
 Out[1]=
 Scope   (24)
Geometric equation:
First-order equation with variable coefficients:
A third-order constant coefficient equation:
Initial value conditions:
Plot the solution:
Second-order inhomogeneous equation:
Second-order variable coefficient equation in terms of elementary functions:
Euler-Cauchy equation:
In general, special functions are required to express solutions:
Solvable logistic equations:
Riccati equations:
Solutions in terms of trigonometric and hyperbolic functions:
Higher-order equations:
Nonlinear convolution equation:
Linear system with constant coefficients:
With boundary conditions:
Plot their solution:
Linear fractional systems:
Diagonal system:
Linear constant coefficient difference-algebraic system:
An index-2 system:
First-order linear partial difference equation with constant coefficients:
Substitute the function Sin[2k] for the free function C[1]:
Plot the resulting solution:
Constant coefficient linear equation of orders 2, 3 and 4:
Inhomogeneous:
Variable coefficient linear equation:
First-order constant coefficient q-difference equation:
Equivalent way of expressing the same equation:
Initial value:
Second-order equation:
Third-order:
Inhomogeneous:
Using a numeric value for q:
Plot solution:
Linear varying coefficient equations:
Nonlinear equations:
Riccati equation:
A linear constant coefficient system of q-difference equations:
No boundary condition, gives two generated parameters:
One boundary condition:
Two boundary conditions:
 Options   (1)
Use differently named constants:
Use subscripted constants:
 Applications   (10)
This models the amount a[n] at year n when the interest r is paid on the principal p only:
Here the interest is paid on the current amount a[n], i.e. compound interest:
Here a[n] denotes the number of moves required in the Tower of Hanoi problem with n disks:
Here a[n] is the number of ways to tile a space with tiles:
The number of comparisons for a binary search problem:
Number of arithmetic operations in the fast Fourier transform:
The integral satisfies the difference equation:
The integral satisfies the difference equation:
The difference equation for the series coefficients of :
The determinant of n×n tridiagonal matrix with diagonals satisfies:
This models the surface area s[n] in dimension n of a unit sphere:
The volume of the unit ball in dimension n:
Applying Newton's method to , or computing :
Applying the Euler forward method to yields:
Solutions satisfy their difference and boundary equations:
Difference equation corresponding to Sum:
Difference equation corresponding to Product:
Results may contain symbolic sums and products:
The solution to this difference equation is unique as a sequence:
As a function it is only unique up to a function of period 1:
Boundary value problems may have multiple solutions:
Compute the n iterate or composition of a function: