Mathematica Products
-----
 /
Mathematica
*Fast Dense Numerical Linear Algebra
*High-Speed Sparse Linear Algebra
*Large-Scale Linear Systems
*Big-Number Arithmetic
*64-Bit Platform Support
*Faster MathLink
*Numerical Solving of Differential Equations
*Numerical Equation Solving
*Fitting Data
*Numeric Optimization
*DSolve
<RSolve
*Reduce
*Resolve
*FindInstance
*Symbolic Global Optimization
*Wider Support For Domain Specifications
*Connection Technology
*Importing and Exporting
*Statistical Plots
*Collecting Expressions During Evaluation
*New Linear Algebra Functions
*Algebraic Number Objects
*Authoring and Presentation
*Summary of New Features
*Ask about this page

RSolve

See What's New in Wolfram Mathematica 6

Now a built-in Mathematica function, the newly expanded RSolve is one of the most extensive systems available today for solving recurrence relations. These include linear and nonlinear difference equations, difference algebraic equations, partial difference equations, q-difference, and divide-and-conquer equations.


More Details PreviousNext

Example: Solving Recurrence Equations

This gives the general solution to y_(k + 1) == (k + 1) y_k involving one arbitrary constant c_1.

RSolve[y(k + 1) == (k + 1) y(k), y(k), k]

{{y(k) -> c_1 [CapitalGamma](k + 1)}}

The following example solves a linear system of a difference and an algebraic equation. This second-order system has only one general constant in its solution because one degree of freedom has already been removed by the algebraic equation.

RSolve[{x(k + 1) == x(k) + 2 y(k), 0 == x(k) + y(k)}, {x(k), y(k)}, k]

{{x(k) -> 1/4 (-1)^k c_1, y(k) -> -1/4 (-1)^k c_1}}

RSolve can solve partial difference equations. In these cases the general solution is parameterized by general functions such as c_1[l - k] below.

RSolve[u(k + 1, l + 1) == a u(k, l), u(k, l), {k, l}]

{{u(k, l) -> a^(k - 1) c_1[l - k]}}

RSolve can also solve so-called q-difference equations or divide-and-conquer equations. These are equations of the form F(k, y(k), y(q k), ..., y(q^n k)) [LongEqual] 0.

This is a linear q-difference equation that gives the number of comparisons when doing a binary search.

RSolve[{b(n) == b(n/2) + 1, b(1) == 1}, b(n), n]

{{b(n) -> (log(2) + log(n))/log(2)}}


Related Links


Documentation from The Mathematica Book Documentation from The Mathematica Book
Solving Recurrence Equations
  
Documentation from the Reference Guide Documentation from the Reference Guide
RSolve



Back to Top PreviousNext



 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja]