Enter the coefficients and initial conditions below to solve your recurrence relation:
A recurrence relation is a mathematical equation that defines a sequence recursively. Each term of the sequence is expressed as a function of the preceding terms. Linear homogeneous recurrence relations with constant coefficients are among the most common types studied in discrete mathematics and computer science.
This calculator solves second-order linear homogeneous recurrence relations of the form:
$$a \cdot a_{n+2} + b \cdot a_{n+1} + c \cdot a_n = 0$$
where $a$, $b$, and $c$ are constants, and the initial conditions $a_1$ and $a_2$ are given.
Example: Solve the recurrence relation $a_{n+2} - 5a_{n+1} + 6a_n = 0$ with initial conditions $a_1 = 1$ and $a_2 = 5$.
Solution:
Try entering $a = 1$, $b = -5$, $c = 6$, $a_1 = 1$, and $a_2 = 5$ into the calculator to verify this result!
The solution method used by this calculator is based on the characteristic equation technique:
For the recurrence relation $a \cdot a_{n+2} + b \cdot a_{n+1} + c \cdot a_n = 0$, we form the characteristic equation:
$$a \cdot r^2 + b \cdot r + c = 0$$
We solve for $r$ using the quadratic formula:
$$r = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$
The form of the solution depends on the discriminant $D = b^2 - 4ac$:
The constants $A$ and $B$ are determined by substituting the initial conditions $a_1$ and $a_2$ into the general solution.
Recurrence relations have numerous applications in various fields:
This calculator solves second-order linear homogeneous recurrence relations with constant coefficients. The equation must be of the form $a \cdot a_{n+2} + b \cdot a_{n+1} + c \cdot a_n = 0$.
When the discriminant is negative, the characteristic equation has complex roots. The solution involves trigonometric functions. This feature is currently not supported, but may be added in future updates.
No, this calculator is specifically designed for homogeneous recurrence relations (where the right-hand side is zero). For non-homogeneous relations, additional techniques are required.
The calculator provides results with 2 decimal places. For exact solutions, you may need to perform the calculations manually or use symbolic computation software.