Subjects algebra

Recurrence Relations 90E0E3

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

Search Solutions

1. **Problem (a): Solve the recurrence relation** $$S(n) - 5S(n-1) + 6S(n-2) = 5n$$ 2. **Step 1: Solve the homogeneous part** The associated homogeneous recurrence is: $$S_h(n) - 5S_h(n-1) + 6S_h(n-2) = 0$$ The characteristic equation is: $$r^2 - 5r + 6 = 0$$ Factoring: $$(r-2)(r-3) = 0$$ So the roots are $r=2$ and $r=3$. 3. **Step 2: General solution of homogeneous equation** $$S_h(n) = A2^n + B3^n$$ where $A$ and $B$ are constants. 4. **Step 3: Find a particular solution $S_p(n)$** Since the right side is $5n$, a polynomial of degree 1, try a particular solution of the form: $$S_p(n) = Cn + D$$ 5. **Step 4: Substitute $S_p(n)$ into the original recurrence** Calculate: $$S_p(n) = Cn + D$$ $$S_p(n-1) = C(n-1) + D = Cn - C + D$$ $$S_p(n-2) = C(n-2) + D = Cn - 2C + D$$ Substitute into the left side: $$S_p(n) - 5S_p(n-1) + 6S_p(n-2) = (Cn + D) - 5(Cn - C + D) + 6(Cn - 2C + D)$$ Simplify: $$= Cn + D - 5Cn + 5C - 5D + 6Cn - 12C + 6D$$ $$= (C n - 5 C n + 6 C n) + (D - 5 D + 6 D) + (5 C - 12 C)$$ $$= (2 C n) + (2 D) + (-7 C)$$ 6. **Step 5: Set equal to right side $5n$ and solve for $C$ and $D$** $$2 C n + 2 D - 7 C = 5 n$$ Equate coefficients: For $n$: $$2 C = 5 \implies C = \frac{5}{2}$$ For constants: $$2 D - 7 C = 0 \implies 2 D = 7 C = 7 \times \frac{5}{2} = \frac{35}{2} \implies D = \frac{35}{4}$$ 7. **Step 6: Write the general solution for (a)** $$S(n) = A 2^n + B 3^n + \frac{5}{2} n + \frac{35}{4}$$ --- 8. **Problem (b): Solve the recurrence relation** $$S(n) - 2 S(n-1) + S(n-2) = 2$$ with initial conditions: $$S(0) = 25, \quad S(1) = 16$$ 9. **Step 1: Solve the homogeneous part** Characteristic equation: $$r^2 - 2 r + 1 = 0$$ This factors as: $$(r-1)^2 = 0$$ So the root is $r=1$ with multiplicity 2. 10. **Step 2: General solution of homogeneous equation** $$S_h(n) = A + B n$$ 11. **Step 3: Find a particular solution $S_p(n)$** Right side is constant 2, so try a constant particular solution: $$S_p(n) = C$$ Substitute into the left side: $$C - 2 C + C = 0$$ which equals 0, not 2, so try a polynomial of degree 1: $$S_p(n) = D n$$ Substitute: $$D n - 2 D (n-1) + D (n-2) = D n - 2 D n + 2 D + D n - 2 D = 0$$ Still zero, so try quadratic: $$S_p(n) = E n^2$$ Substitute: $$E n^2 - 2 E (n-1)^2 + E (n-2)^2 = 2$$ Expand: $$(n-1)^2 = n^2 - 2 n + 1$$ $$(n-2)^2 = n^2 - 4 n + 4$$ Substitute: $$E n^2 - 2 E (n^2 - 2 n + 1) + E (n^2 - 4 n + 4) = 2$$ Simplify: $$E n^2 - 2 E n^2 + 4 E n - 2 E + E n^2 - 4 E n + 4 E = 2$$ Combine like terms: $$(E n^2 - 2 E n^2 + E n^2) + (4 E n - 4 E n) + (-2 E + 4 E) = 2$$ $$0 n^2 + 0 n + 2 E = 2$$ So: $$2 E = 2 \implies E = 1$$ 12. **Step 4: General solution for (b)** $$S(n) = A + B n + n^2$$ 13. **Step 5: Use initial conditions to solve for $A$ and $B$** At $n=0$: $$S(0) = A + B \times 0 + 0^2 = A = 25$$ At $n=1$: $$S(1) = A + B + 1 = 16$$ Substitute $A=25$: $$25 + B + 1 = 16 \implies B = 16 - 26 = -10$$ 14. **Step 6: Final solution for (b)** $$S(n) = 25 - 10 n + n^2$$