# Solving Recurrence Equations

If you represent the term in a sequence as , you can use a *recurrence equation* to specify how it is related to other terms in the sequence.

RSolve takes recurrence equations and solves them to get explicit formulas for .

RSolve[eqn,a[n],n] | solve a recurrence equation |

Solving a recurrence equation.

RSolve can be thought of as a discrete analog of DSolve. Many of the same functions generated in solving differential equations also appear in finding symbolic solutions to recurrence equations.

RSolve does not require you to specify explicit values for terms such as a[1]. Like DSolve, it automatically introduces undetermined constants C[i] to give a general solution.

RSolve can solve equations that do not depend only linearly on . For nonlinear equations, however, there are sometimes several distinct solutions that must be given. Just as for differential equations, it is a difficult matter to find symbolic solutions to recurrence equations, and standard mathematical functions only cover a limited set of cases.

RSolve can solve not only ordinary *difference equations* in which the arguments of differ by integers, but also *‐difference equations* in which the arguments of are related by multiplicative factors.

RSolve[{eqn_{1},eqn_{2},…},{a_{1}[n],a_{2}[n],…},n] | |

solve a coupled system of recurrence equations |

Solving systems of recurrence equations.

RSolve[eqns,a[n_{1},n_{2},…],{n_{1},n_{2},…}] | |

solve partial recurrence equations |

Solving partial recurrence equations.

Just as one can set up partial differential equations that involve functions of several variables, so one can also set up partial recurrence equations that involve multidimensional sequences. Just as in the differential equations case, general solutions to partial recurrence equations can involve undetermined functions.