Subjects algebra

Recurrence Relation

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. **State the problem:** Solve the recurrence relation $$a_n + 7a_{n-1} + 8a_{n-2} = 0$$ for $$n \geq 2$$ with initial conditions $$a_0 = 2$$ and $$a_1 = -7$$. 2. **Find the characteristic equation:** Assume a solution of the form $$a_n = r^n$$. Substitute into the recurrence: $$r^n + 7r^{n-1} + 8r^{n-2} = 0$$ Divide both sides by $$r^{n-2}$$ (assuming $$r \neq 0$$): $$r^2 + 7r + 8 = 0$$ 3. **Solve the quadratic equation:** $$r^2 + 7r + 8 = 0$$ Use the quadratic formula: $$r = \frac{-7 \pm \sqrt{7^2 - 4 \cdot 1 \cdot 8}}{2} = \frac{-7 \pm \sqrt{49 - 32}}{2} = \frac{-7 \pm \sqrt{17}}{2}$$ 4. **General solution:** The roots are distinct real numbers: $$r_1 = \frac{-7 + \sqrt{17}}{2}, \quad r_2 = \frac{-7 - \sqrt{17}}{2}$$ So the general solution is: $$a_n = A r_1^n + B r_2^n$$ 5. **Use initial conditions to find constants:** For $$n=0$$: $$a_0 = A + B = 2$$ For $$n=1$$: $$a_1 = A r_1 + B r_2 = -7$$ 6. **Solve the system:** From $$A + B = 2$$, we get $$B = 2 - A$$. Substitute into second equation: $$A r_1 + (2 - A) r_2 = -7$$ $$A (r_1 - r_2) + 2 r_2 = -7$$ $$A = \frac{-7 - 2 r_2}{r_1 - r_2}$$ Calculate $$r_1 - r_2$$: $$r_1 - r_2 = \frac{-7 + \sqrt{17}}{2} - \frac{-7 - \sqrt{17}}{2} = \frac{2 \sqrt{17}}{2} = \sqrt{17}$$ Calculate $$-7 - 2 r_2$$: $$-7 - 2 \cdot \frac{-7 - \sqrt{17}}{2} = -7 + 7 + \sqrt{17} = \sqrt{17}$$ So: $$A = \frac{\sqrt{17}}{\sqrt{17}} = 1$$ Then: $$B = 2 - 1 = 1$$ 7. **Final solution:** $$\boxed{a_n = \left(\frac{-7 + \sqrt{17}}{2}\right)^n + \left(\frac{-7 - \sqrt{17}}{2}\right)^n}$$