|
|
For example:
Linear homogeneous recurrence relations
Recurrence relations, particular linear recurrence relations, can be solved in order to obtain a non-recursive function of n. The Fibonacci numbers are defined using a linear recurrence relation:
In the above example of Fibonacci numbers, the initial conditions are:
For recurrence relations in the form:
Additionally, if the equation if of the form you can substitute 2 for n and get as above. The constants C and D can be gotten from the "side conditions" that are often given as
Different solutions are obtained depending on the nature of the roots of the characteristic equation.
If the recurrence is inhomogeneous, a particular solution can be found by the method of undetermined coefficients and the solution is the sum of the solution of the homogeneous and the particular solutions.
Interestingly, the method for solving linear differential equations is similar to the method above - the "intelligent guess" for linear differential equations is ex.
See also: recursion