Induction and Recursion - Hoang Anh Duc - MIM - HUS - VNU

Work 19.

  • Solve the following recurrence relations with the given initial conditions and prove that the formula you found is correct using mathematical induction:
[t](a)an=an1,a0=5(e)an=2an13,a0=1(b)an=an1+3,a0=1(f)an=(n+1)an1,a0=2(c)an=an1n,a0=4(g)an=2nan1,a0=3(d)an=5an1,a0=1(h)an=an1+n1,a0=7\begin{aligned}[t] (a) \quad a_n &= -a_{n-1}, a_0 = 5 \qquad & (e) \quad a_n &= 2a_{n-1} - 3, a_0 = -1 \quad \\[5pt] (b) \quad a_n &= a_{n-1} + 3, a_0 = 1 \qquad & (f) \quad a_n &= (n+1)a_{n-1}, a_0 = 2 \quad \\[5pt] (c) \quad a_n &= a_{n-1} - n, a_0 = 4 \qquad & (g) \quad a_n &= 2n a_{n-1}, a_0 = 3 \quad \\[5pt] (d) \quad a_n &= 5a_{n-1}, a_0 = 1 \qquad & (h) \quad a_n &= -a_{n-1} + n - 1, a_0 = 7 \quad \end{aligned}
Block
  • (a)an=an1,a0=5(a) \quad a_n = -a_{n-1}, a_0 = 5
We form a conjecture using forward substitution:Given recurrence relation: an=an1,a0=5Calculate the first few terms:a0=5a1=a0=5a2=a1=(5)=5a3=a2=5a4=a3=(5)=5From our calculation, we form the conjecture:an=(1)n5Now we prove our conjecture with mathematical induction:Let P(n) = an=(1)n5,nNBasis step: a0=(1)05=5 so P(0) = TInductive step: Assume Inductive Hypothesis:P(k)=ak=(1)k5=T,kNConsider: P(k+1)=ak+1=ak=IH((1)k5)=(1)k+15So P(k)=T    P(k+1)=TTherefore, by mathematical induction, P(n)=T,nN\begin{align} & \text{We form a conjecture using forward substitution:} \quad \\[5pt] & \text{Given recurrence relation: } \quad a_n = -a_{n-1}, a_0 = 5 \quad \\[5pt] & \text{Calculate the first few terms:} \quad \\[8pt] & ● \quad a_0 = 5 \quad \\[5pt] & ● \quad a_1 = -a_0 = -5 \quad \\[5pt] & ● \quad a_2 = -a_1 = -(-5) = 5 \quad \\[5pt] & ● \quad a_3 = -a_2 = -5 \quad \\[5pt] & ● \quad a_4 = -a_3 = -(-5) = 5 \quad \\[8pt] & \text{From our calculation, we form the conjecture:} \quad \\[5pt] & \qquad a_n = (-1)^n \cdot 5 \quad \\[8pt] & \text{Now we prove our conjecture with mathematical induction:} \quad \\[5pt] & \text{Let P(n) = } a_n = (-1)^n \cdot 5 , \forall n \in \mathbb{N} \quad \\[5pt] & \text{Basis step: } a_0 = (-1)^0 \cdot 5 = 5 \text{ so P(0) = } \mathbf{T} \quad \\[5pt] & \text{Inductive step: Assume Inductive Hypothesis:} \quad \\[5pt] & P(k) = a_k = (-1)^k \cdot 5 = \mathbf{T}, k \in \mathbb{N} \quad \\[10pt] & \text{Consider: } \quad \\[5pt] & P(k+1) = a_{k+1} = -a_k \overset{IH}{\mathrel{=}} -((-1)^k \cdot 5) = (-1)^{k+1} \cdot 5 \quad \\[5pt] & \text{So } P(k) = \mathbf{T} \implies P(k+1) = \mathbf{T} \quad \\[5pt] & \text{Therefore, by mathematical induction, } P(n) = \mathbf{T}, \forall n \in \mathbb{N} \quad \end{align}
Block
  • (b)an=an1+3,a0=1(b) \quad a_n = a_{n-1} + 3, a_0 = 1
We form a conjecture using backward substitution:Given recurrence relation: an=an1+3,a0=1Calculate the first few terms:an=an1+3an=(an2+3)+3=an2+32an=(an3+3)+32=an3+33an=a0+3n=1+3nFrom our calculation, we form the conjecture:an=1+3nNow we prove our conjecture with mathematical induction:Let P(n) = an=1+3n,nNBasis step: a0=1+30=1 so P(0) = TInductive step: Assume Inductive Hypothesis:P(k)=ak=1+3k=T,kNConsider: P(k+1)=ak+1=ak+3=IH1+3k+3=1+3(k+1)So P(k)=T    P(k+1)=TTherefore, by mathematical induction, P(n)=T,nN\begin{align} & \text{We form a conjecture using backward substitution:} \quad \\[5pt] & \text{Given recurrence relation: } \quad a_n = a_{n-1} + 3, a_0 = 1 \quad \\[5pt] & \text{Calculate the first few terms:} \quad \\[8pt] & ● \quad a_n = a_{n-1} + 3 \quad \\[5pt] & ● \quad a_n = (a_{n-2} + 3) + 3 = a_{n-2} + 3 \cdot 2 \quad \\[5pt] & ● \quad a_n = (a_{n-3} + 3) + 3 \cdot 2 = a_{n-3} + 3 \cdot 3 \quad \\[5pt] & \qquad \vdots \quad \\[7pt] & ● \quad a_n = a_0 + 3 \cdot n = 1 + 3 \cdot n \quad \\[5pt] & \text{From our calculation, we form the conjecture:} \quad \\[5pt] & \qquad a_n = 1 + 3 \cdot n \quad \\[8pt] & \text{Now we prove our conjecture with mathematical induction:} \quad \\[5pt] & \text{Let P(n) = } a_n = 1 + 3 \cdot n , \forall n \in \mathbb{N} \quad \\[5pt] & \text{Basis step: } a_0 = 1 + 3 \cdot 0 = 1 \text{ so P(0) = } \mathbf{T} \quad \\[5pt] & \text{Inductive step: Assume Inductive Hypothesis:} \quad \\[5pt] & P(k) = a_k = 1 + 3 \cdot k = \mathbf{T}, k \in \mathbb{N} \quad \\[10pt] & \text{Consider: } \quad \\[5pt] & P(k+1) = a_{k+1} = a_k + 3 \overset{IH}{\mathrel{=}} 1 + 3 \cdot k + 3 = 1 + 3(k + 1) \quad \\[5pt] & \text{So } P(k) = \mathbf{T} \implies P(k+1) = \mathbf{T} \quad \\[5pt] & \text{Therefore, by mathematical induction, } P(n) = \mathbf{T}, \forall n \in \mathbb{N} \quad \end{align}
Block
  • (c)an=an1n,a0=4(c) \quad a_n = a_{n-1} - n, a_0 = 4
We form a conjecture using backward substitution:Given recurrence relation: an=an1n,a0=4Calculate the first few terms:an=an1nan=(an2(n1))n=an2(n1)nan=(an3(n2))(n1)n=an3(n2)(n1)nan=a0(1+2+3++n)=4(1+2+3++n)From our calculation, we form the conjecture:an=4i=1ni=4n(n+1)2Now we prove our conjecture with mathematical induction:Let P(n) = 4n(n+1)2,nNBasis step: a0=40(0+1)2=4 so P(0) = TInductive step: Assume Inductive Hypothesis:P(k)=ak=4k(k+1)2=T,kNConsider: P(k+1)=ak+1=ak(k+1)=IH(4k(k+1)2)(k+1)=4(k(k+1)2+(k+1))=4(k(k+1)+2(k+1)2)=4(k+1)(k+2)2So P(k)=T    P(k+1)=TTherefore, by mathematical induction, P(n)=T,nN\begin{align} & \text{We form a conjecture using backward substitution:} \quad \\[5pt] & \text{Given recurrence relation: } \quad a_n = a_{n-1} - n, a_0 = 4 \quad \\[5pt] & \text{Calculate the first few terms:} \quad \\[8pt] & ● \quad a_n = a_{n-1} - n \quad \\[5pt] & ● \quad a_n = (a_{n-2} - (n - 1)) - n = a_{n-2} - (n - 1) - n \quad \\[5pt] & ● \quad a_n = (a_{n-3} - (n - 2)) - (n - 1) - n = a_{n-3} - (n - 2) - (n - 1) - n \quad \\[5pt] & \qquad \vdots \quad \\[7pt] & ● \quad a_n = a_0 - (1 + 2 + 3 + \ldots + n) = 4 - (1 + 2 + 3 + \ldots + n) \quad \\[8pt] & \text{From our calculation, we form the conjecture:} \quad \\[8pt] & \qquad a_n = 4 - \sum_{i=1}^{n} i = 4 - \frac{n(n+1)}{2} \quad \\[8pt] & \text{Now we prove our conjecture with mathematical induction:} \quad \\[8pt] & \text{Let P(n) = } 4 - \frac{n(n+1)}{2} , \forall n \in \mathbb{N} \quad \\[8pt] & \text{Basis step: } a_0 = 4 - \frac{0(0+1)}{2} = 4 \text{ so P(0) = } \mathbf{T} \quad \\[8pt] & \text{Inductive step: Assume Inductive Hypothesis:} \quad \\[8pt] & P(k) = a_k = 4 - \frac{k(k+1)}{2} = \mathbf{T}, k \in \mathbb{N} \quad \\[10pt] & \text{Consider: } \quad \\[8pt] & P(k+1) = a_{k+1} = a_k - (k + 1) \overset{IH}{\mathrel{=}} \left( 4 - \frac{k(k+1)}{2} \right) - (k + 1) \quad \\[8pt] & \qquad \qquad = 4 - \left(\frac{k(k+1)}{2} + (k + 1)\right) = 4 - \left( \frac{k(k+1) + 2(k+1)}{2} \right) \quad \\[8pt] & \qquad \qquad = 4 - \frac{(k+1)(k+2)}{2} \quad \\[8pt] & \text{So } P(k) = \mathbf{T} \implies P(k+1) = \mathbf{T} \quad \\[5pt] & \text{Therefore, by mathematical induction, } P(n) = \mathbf{T}, \forall n \in \mathbb{N} \quad \end{align}
Block
  • (d)an=5an1,a0=1(d) \quad a_n = 5a_{n-1}, a_0 = 1
We form a conjecture using forward substitution:Given recurrence relation: an=5an1,a0=1Calculate the first few terms:a0=1a1=5a0=51=5a2=5a1=55=25a3=5a2=525=125a4=5a3=5125=625From our calculation, we form the conjecture:an=5nNow we prove our conjecture with mathematical induction:Let P(n) = an=5n,nNBasis step: a0=50=1 so P(0) = TInductive step: Assume Inductive Hypothesis:P(k)=ak=5k=T,kNConsider: P(k+1)=ak+1=5ak=IH5(5k)=55k=5k+1So P(k)=T    P(k+1)=TTherefore, by mathematical induction, P(n)=T,nN\begin{align} & \text{We form a conjecture using forward substitution:} \quad \\[5pt] & \text{Given recurrence relation: } \quad a_n = 5a_{n-1}, a_0 = 1\quad \\[5pt] & \text{Calculate the first few terms:} \quad \\[8pt] & ● \quad a_0 = 1 \quad \\[5pt] & ● \quad a_1 = 5a_0 = 5 \cdot 1 = 5 \quad \\[5pt] & ● \quad a_2 = 5a_1 = 5 \cdot 5 = 25 \quad \\[5pt] & ● \quad a_3 = 5a_2 = 5 \cdot 25 = 125 \quad \\[5pt] & ● \quad a_4 = 5a_3 = 5 \cdot 125 = 625 \quad \\[8pt] & \text{From our calculation, we form the conjecture:} \quad \\[5pt] & \qquad a_n = 5^n \quad \\[8pt] & \text{Now we prove our conjecture with mathematical induction:} \quad \\[5pt] & \text{Let P(n) = } a_n = 5^n , \forall n \in \mathbb{N} \quad \\[5pt] & \text{Basis step: } a_0 = 5^0 = 1 \text{ so P(0) = } \mathbf{T} \quad \\[5pt] & \text{Inductive step: Assume Inductive Hypothesis:} \quad \\[5pt] & P(k) = a_k = 5^k = \mathbf{T}, k \in \mathbb{N} \quad \\[10pt] & \text{Consider: } \quad \\[5pt] & P(k+1) = a_{k+1} = 5a_k \overset{IH}{\mathrel{=}} 5(5^k) = 5 \cdot 5^k = 5^{k+1} \quad \\[5pt] & \text{So } P(k) = \mathbf{T} \implies P(k+1) = \mathbf{T} \quad \\[5pt] & \text{Therefore, by mathematical induction, } P(n) = \mathbf{T}, \forall n \in \mathbb{N} \quad \end{align}
Block
  • (e)an=2an13,a0=1(e) \quad a_n = 2a_{n-1} - 3, a_0 = -1
We form a conjecture using backward substitution:Given recurrence relation: an=2an13,a0=1Calculate the first few terms:an=2an13an=2(2an23)3=4an29an=4(2an33)9=8an321an=8(2an43)21=16an445an=16(2an53)45=32an593So far, our conjecture follows the form: an=Ana0BnWe can see that A are powers of 2, so we have: an=2na0BnNow we analyze B:B1B0=30=3B2B1=93=6B3B2=219=12B4B3=4521=24B5B4=9345=48We can see that the differences Bi+1Bi=32i,iNTherefore, we formulate Bn=32n3=3(2n1)From our calculation, we form the conjecture:an=2na03(2n1)=(1)2n3(2n1)Now we prove our conjecture with mathematical induction:Let P(n) = an=(1)2n3(2n1),nNBasis step: a0=(1)203(201)=(1)130=1 so P(0) = TInductive step: Assume Inductive Hypothesis:P(k)=ak=(1)2k3(2k1)=T,kNConsider: P(k+1)=ak+1=2ak3=IH2((1)2k3(2k1))3=(1)2k+132(2k1)3=(1)2k+13(22k2+1)=(1)2k+13(2k+11)So P(k)=T    P(k+1)=TTherefore, by mathematical induction, P(n)=T,nN\begin{align} & \text{We form a conjecture using backward substitution:} \quad \\[5pt] & \text{Given recurrence relation: } \quad a_n = 2a_{n-1} - 3, a_0 = -1 \quad \\[5pt] & \text{Calculate the first few terms:} \quad \\[8pt] & ● \quad a_n = 2a_{n-1} - 3 \quad \\[5pt] & ● \quad a_n = 2(2a_{n-2} - 3) - 3 = 4a_{n-2} - 9 \quad \\[5pt] & ● \quad a_n = 4(2a_{n-3} - 3) - 9 = 8a_{n-3} - 21 \quad \\[5pt] & ● \quad a_n = 8(2a_{n-4} - 3) - 21 = 16a_{n-4} - 45 \quad \\[5pt] & ● \quad a_n = 16(2a_{n-5} - 3) - 45 = 32a_{n-5} - 93 \quad \\[8pt] & \text{So far, our conjecture follows the form: } a_n = \mathbf{A}_na_0 - \mathbf{B}_n \quad \\[5pt] & \text{We can see that } \mathbf{A} \text{ are powers of 2, so we have: } a_n = 2^na_0 - \mathbf{B}_n \quad \\[5pt] & \text{Now we analyze } \mathbf{B} \text{:} \quad \\[8pt] & ● \quad B_1 - B_0 = 3 - 0 = 3 \quad \\[5pt] & ● \quad B_2 - B_1 = 9 - 3 = 6 \quad \\[5pt] & ● \quad B_3 - B_2 = 21 - 9 = 12 \quad \\[5pt] & ● \quad B_4 - B_3 = 45 - 21 = 24 \quad \\[5pt] & ● \quad B_5 - B_4 = 93 - 45 = 48 \quad \\[8pt] & \text{We can see that the differences } B_{i+1} - B_i = 3 \cdot 2^i, i \in \mathbb{N} \quad \\[5pt] & \text{Therefore, we formulate } B_n = 3 \cdot 2^n - 3 = 3(2^n - 1) \quad \\[5pt] & \text{From our calculation, we form the conjecture:} \quad \\[5pt] & \qquad a_n = 2^na_0 - 3(2^n-1) = (-1) \cdot 2^n - 3(2^n-1) \quad \\[8pt] & \text{Now we prove our conjecture with mathematical induction:} \quad \\[5pt] & \text{Let P(n) = } a_n = (-1) \cdot 2^n - 3(2^n-1) , \forall n \in \mathbb{N} \quad \\[5pt] & \text{Basis step: } a_0 = (-1) \cdot 2^0 - 3(2^0-1) = (-1) \cdot 1 - 3 \cdot 0 = -1 \text{ so P(0) = } \mathbf{T} \quad \\[5pt] & \text{Inductive step: Assume Inductive Hypothesis:} \quad \\[5pt] & P(k) = a_k = (-1) \cdot 2^k - 3(2^k-1) = \mathbf{T}, k \in \mathbb{N} \quad \\[8pt] & \text{Consider: } \quad \\[5pt] & P(k+1) = a_{k+1} = 2a_k - 3 \overset{IH}{\mathrel{=}} 2((-1) \cdot 2^k - 3(2^k-1))-3 \quad \\[5pt] & \qquad \qquad = (-1) \cdot 2^{k+1} - 3 \cdot 2 (2^k - 1) - 3 \quad \\[5pt] & \qquad \qquad = (-1) \cdot 2^{k+1} - 3(2 \cdot 2^k - 2 + 1) \quad \\[5pt] & \qquad \qquad = (-1) \cdot 2^{k+1} - 3(2^{k + 1} - 1) \quad \\[8pt] & \text{So } P(k) = \mathbf{T} \implies P(k+1) = \mathbf{T} \quad \\[5pt] & \text{Therefore, by mathematical induction, } P(n) = \mathbf{T}, \forall n \in \mathbb{N} \quad \end{align}
Block
  • (f)an=(n+1)an1,a0=2(f) \quad a_n = (n+1)a_{n-1}, a_0 = 2
We form a conjecture using forward substitution:Given recurrence relation: an=(n+1)an1,a0=2Calculate the first few terms:a0=2a1=22=4a2=34=223=12a3=412=2234=48a4=548=22345=240From our calculation, we form the conjecture:an=2(n+1)!(not an=2n! because n starts from 0)Now we prove our conjecture with mathematical induction:Let P(n) = an=2(n+1)!,nNBasis step: a0=21!=2 so P(0) = TInductive step: Assume Inductive Hypothesis:P(k)=ak=2(k+1)!=T,kNConsider: P(k+1)=ak+1=(k+1+1)ak=IH(k+2)2(k+1)!=2(k+2)(k+1)!=2(k+2)!=2((k+1)+1)!So P(k)=T    P(k+1)=TTherefore, by mathematical induction, P(n)=T,nN\begin{align} & \text{We form a conjecture using forward substitution:} \quad \\[5pt] & \text{Given recurrence relation: } \quad a_n = (n+1)a_{n-1}, a_0 = 2 \quad \\[5pt] & \text{Calculate the first few terms:} \quad \\[8pt] & ● \quad a_0 = 2 \quad \\[5pt] & ● \quad a_1 = 2 \cdot 2 = 4 \quad \\[5pt] & ● \quad a_2 = 3 \cdot 4 = 2 \cdot 2 \cdot 3 = 12 \quad \\[5pt] & ● \quad a_3 = 4 \cdot 12 = 2 \cdot 2 \cdot 3 \cdot 4 = 48 \quad \\[5pt] & ● \quad a_4 = 5 \cdot 48 = 2 \cdot 2 \cdot 3 \cdot 4 \cdot 5 = 240 \quad \\[8pt] & \text{From our calculation, we form the conjecture:} \quad \\[5pt] & \qquad a_n = 2 (n + 1)! \quad (not \space a_n = 2 \cdot n! \text{ because n starts from 0})\quad \\[8pt] & \text{Now we prove our conjecture with mathematical induction:} \quad \\[5pt] & \text{Let P(n) = } a_n = 2 (n + 1)! , \forall n \in \mathbb{N} \quad \\[5pt] & \text{Basis step: } a_0 = 2 \cdot 1! = 2 \text{ so P(0) = } \mathbf{T} \quad \\[5pt] & \text{Inductive step: Assume Inductive Hypothesis:} \quad \\[5pt] & P(k) = a_k = 2 (k + 1)! = \mathbf{T}, k \in \mathbb{N} \quad \\[10pt] & \text{Consider: } \quad \\[5pt] & P(k+1) = a_{k+1} = (k+1+1) a_k \overset{IH}{\mathrel{=}} (k+2) 2 (k + 1)! \quad \\[7pt] & \qquad \qquad = 2 (k+2)(k+1)! = 2 (k+2)! = 2 ((k+1)+1)! \quad \\[6pt] & \text{So } P(k) = \mathbf{T} \implies P(k+1) = \mathbf{T} \quad \\[5pt] & \text{Therefore, by mathematical induction, } P(n) = \mathbf{T}, \forall n \in \mathbb{N} \quad \end{align}
Block
  • (g)an=2nan1,a0=3(g) \quad a_n = 2n a_{n-1}, a_0 = 3
We form a conjecture using forward substitution:Given recurrence relation: an=2nan1,a0=3Calculate the first few terms:a0=3a1=213=321=6a2=226=3412=3222!=24a3=2324=38123=3233!=144a4=24144=3161234=3244!=1152From our calculation, we form the conjecture:an=a02nn!=32nn!Now we prove our conjecture with mathematical induction:Let P(n) = an=32nn!,nNBasis step: a0=3200!=311=3 so P(0) = TInductive step: Assume Inductive Hypothesis:P(k)=ak=32kk!=T,kNConsider: P(k+1)=ak+1=2(k+1)ak=IH2(k+1)32kk!=322k(k+1)k!=32k+1(k+1)!So P(k)=T    P(k+1)=TTherefore, by mathematical induction, P(n)=T,nN\begin{align} & \text{We form a conjecture using forward substitution:} \quad \\[5pt] & \text{Given recurrence relation: } \quad a_n = 2n a_{n-1}, a_0 = 3 \quad \\[5pt] & \text{Calculate the first few terms:} \quad \\[8pt] & ● \quad a_0 = 3 \quad \\[5pt] & ● \quad a_1 = 2 \cdot 1 \cdot 3 = 3 \cdot 2 \cdot 1 = 6 \quad \\[5pt] & ● \quad a_2 = 2 \cdot 2 \cdot 6 = 3 \cdot 4 \cdot 1 \cdot 2 = 3 \cdot 2^2 \cdot 2! = 24 \quad \\[5pt] & ● \quad a_3 = 2 \cdot 3 \cdot 24 = 3 \cdot 8 \cdot 1 \cdot 2 \cdot 3 = 3 \cdot 2^3 \cdot 3! = 144 \quad \\[5pt] & ● \quad a_4 = 2 \cdot 4 \cdot 144 = 3 \cdot 16 \cdot 1 \cdot 2 \cdot 3 \cdot 4 = 3 \cdot 2^4 \cdot 4! = 1152 \quad \\[8pt] & \text{From our calculation, we form the conjecture:} \quad \\[5pt] & \qquad a_n = a_0 \cdot 2^n \cdot n! = 3 \cdot 2^n \cdot n! \quad \\[8pt] & \text{Now we prove our conjecture with mathematical induction:} \quad \\[5pt] & \text{Let P(n) = } a_n = 3 \cdot 2^n \cdot n! , \forall n \in \mathbb{N} \quad \\[5pt] & \text{Basis step: } a_0 = 3 \cdot 2^0 \cdot 0! = 3 \cdot 1 \cdot 1 = 3 \text{ so P(0) = } \mathbf{T} \quad \\[5pt] & \text{Inductive step: Assume Inductive Hypothesis:} \quad \\[5pt] & P(k) = a_k = 3 \cdot 2^k \cdot k! = \mathbf{T}, k \in \mathbb{N} \quad \\[10pt] & \text{Consider: } \quad \\[5pt] & P(k+1) = a_{k+1} = 2(k+1) a_k \overset{IH}{\mathrel{=}} 2(k+1) 3 \cdot 2^k \cdot k! \quad \\[5pt] & \qquad \qquad = 3 \cdot 2 \cdot 2^k (k+1)k! = 3 \cdot 2^{k+1} (k+1)! \quad \\[5pt] & \text{So } P(k) = \mathbf{T} \implies P(k+1) = \mathbf{T} \quad \\[5pt] & \text{Therefore, by mathematical induction, } P(n) = \mathbf{T}, \forall n \in \mathbb{N} \quad \end{align}
Block
  • (h)an=an1+n1,a0=7(h) \quad a_n = -a_{n-1} + n - 1, a_0 = 7
Given recurrence relation: an=an1+n1,a0=7Calculate the first few terms:\begin{align} & \text{Given recurrence relation: } \quad a_n = -a_{n-1} + n - 1, a_0 = 7 \quad \\[5pt] & \text{Calculate the first few terms:} \quad \\[8pt] \end{align}
Block
[t]a0=7a4=(6)+41=9a1=7+11=7a5=9+51=5a2=(7)+21=8a6=(5)+61=10a3=8+31=6a7=10+71=4\begin{aligned}[t] ● \quad a_0 &= 7 \qquad & ● \quad a_4 &= -(-6) + 4 - 1 = 9 \quad \\[5pt] ● \quad a_1 &= -7 + 1 - 1 = -7 \qquad & ● \quad a_5 &= -9 + 5 - 1 = -5 \quad \\[5pt] ● \quad a_2 &= -(-7) + 2 - 1 = 8 \qquad & ● \quad a_6 &= -(-5) + 6 - 1 = 10 \quad \\[5pt] ● \quad a_3 &= -8 + 3 - 1 = -6 \qquad & ● \quad a_7 &= -10 + 7 - 1 = -4 \quad \end{aligned}
Block
We can see that when n is even, then: iN such that an=ai=7+i,n is even nNWhen n is odd, we can see that: i1iN such that an=ai=7+i1,n is odd nNTherefore, we form the conjecture: an={7+n2if n is even7+n12if n is odd ={14+n2if n is even15+n2if n is oddWe can rewrite the conjecture as()an=1(1)n215+n2+1+(1)n214+n2 =15+n+15(1)nn(1)n4+14+n+14(1)n+n(1)n4 =29(1)n+2n14\begin{align} & \text{We can see that when n is even, then:} \quad \\[5pt] & \exists \space i \in \mathbb{N} \text{ such that } a_n = a_i = 7 + i , n \text{ is even } \mid n \in \mathbb{N} \quad \\[5pt] & \text{When n is odd, we can see that:} \quad \\[5pt] & \exists \space i \geq 1 \mid i \in \mathbb{N} \text{ such that } a_n = a_i = -7 + i -1, n \text{ is odd } \mid n \in \mathbb{N} \quad \\[5pt] & \text{Therefore, we form the conjecture:} \quad \\[5pt]\ & a_n = \begin{cases} 7 + \frac{n}{2} & \text{if } n \text{ is even} \quad \\[7pt] -7 + \frac{n - 1}{2} & \text{if } n \text{ is odd} \end{cases} \\[10pt] & \quad \space = \begin{cases} \frac{14+n}{2} & \text{if } n \text{ is even} \quad \\[7pt] \frac{-15+n}{2} & \text{if } n \text{ is odd} \end{cases} \\[7pt] & \text{We can rewrite the conjecture } as^{(*)} \quad \\[8pt] & a_n = \frac{1-(-1)^n}{2} \cdot \frac{-15 + n}{2} + \frac{1+(-1)^n}{2} \cdot \frac{14 + n}{2} \quad \\[10pt] & \quad \space = \frac{-15+n+15(-1)^n-n(-1)^n}{4} + \frac{14+n+14(-1)^n+n(-1)^n}{4} \quad \\[10pt] & \quad \space = \frac{29(-1)^n+2n-1}{4} \quad \end{align}
Block
Now we prove our conjecture with mathematical induction:Let P(n) = an=29(1)n+2n14,nNBasis step: a0=29(1)0+2014=7 so P(0) = TInductive step: Assume Inductive Hypothesis:P(k)=ak=29(1)k+2k14=T,kNConsider: P(k+1)=ak+1=ak+(k+1)1=IH29(1)k+2k14+k=29(1)k2k+1+4k4=29(1)k+1+2(k+1)14So P(k)=T    P(k+1)=TTherefore, by mathematical induction, P(n)=T,nN\begin{align} & \text{Now we prove our conjecture with mathematical induction:} \quad \\[10pt] & \text{Let P(n) = } a_n = \frac{29(-1)^n+2n-1}{4} , \forall n \in \mathbb{N} \quad \\[10pt] & \text{Basis step: } a_0 = \frac{29(-1)^0+2\cdot0-1}{4} = 7 \text{ so P(0) = } \mathbf{T} \quad \\[10pt] & \text{Inductive step: Assume Inductive Hypothesis:} \quad \\[10pt] & P(k) = a_k = \frac{29(-1)^k+2k-1}{4} = \mathbf{T}, k \in \mathbb{N} \quad \\[10pt] & \text{Consider: } \quad \\[10pt] & P(k+1) = a_{k+1} = -a_k + (k + 1) - 1 \overset{IH}{\mathrel{=}} - \frac{29(-1)^k+2k-1}{4} + k \quad \\[10pt] & \qquad \qquad = \frac{-29(-1)^k-2k+1+4k}{4} = \frac{29(-1)^{k+1}+2(k+1)-1}{4} \quad \\[10pt] & \text{So } P(k) = \mathbf{T} \implies P(k+1) = \mathbf{T} \quad \\[5pt] & \text{Therefore, by mathematical induction, } P(n) = \mathbf{T}, \forall n \in \mathbb{N} \quad \end{align}
Block
  • Note: If you’re confused of the step at (*):
nn 1(1)n2\frac{1-(-1)^n}{2} 1+(1)n2\frac{1+(-1)^n}{2}
0 0 1
1 1 0
2 0 1
3 1 0
4 0 1
5 1 0
6 0 1
7 1 0
8 0 1

Work 20.

  • Complete the following:
Let the world population in 2023 be 8 billionand assume it increases at a rate of 0.8% per year. For n ≥ 1:(a) Construct a recurrence relationto calculate the world population n years after 2023.(b) Derive an explicit formula to calculatethe world population n years after 2023.(c) What will the world population be in 2057?\begin{align} & \text{Let the world population in 2023 be 8 billion} \quad \\[5pt] & \text{and assume it increases at a rate of 0.8} \% \text{ per year. For n ≥ 1:} \quad \\[8pt] & \quad \text{(a) Construct a recurrence relation} \quad \\[5pt] & \text{to calculate the world population n years after 2023.}\quad \\[5pt] & \quad \text{(b) Derive an explicit formula to calculate} \quad \\[5pt] & \text{the world population n years after 2023.} \quad \\[5pt] & \quad \text{(c) What will the world population be in 2057?} \quad \end{align}
Block
Let Pn represent the world population n years after 2023We know that P0=8 billion(a) We can formulate the recurrence relation:Pn=Pn1×1.008 with initial condition P0=8 billion,n1nN(b) To derive an explicit formulaWe form a conjecture using forward substitutionCalculate the first few terms:P1=P0×1.008=8b×1.008P2=P1×1.008=(8b×1.008)×1.008=8b×(1.008)2P3=P2×1.008=(8b×(1.008)n)×1.008=8b×(1.008)3From our calculation, we form the conjecture:Pn=8×(1.008)n(c) Now, we calculate the population of the world in 2057:P20572023=P34=8×(1.008)3410.3968So in 2057, the population will approximately be 10.3968 billion\begin{align} & \text{Let } P_n \text{ represent the world population n years after 2023} \quad \\[5pt] & \text{We know that } P_0 = 8 \space billion \quad \\[5pt] & \text{(a) We can formulate the recurrence relation:} \quad \\[5pt] & P_n = P_{n-1} \times 1.008 \text{ with initial condition } P_0 = 8 \space billion, n \geq 1 \mid n \in \mathbb{N} \quad \\[5pt] & \text{(b) To derive an explicit formula} \quad \\[5pt] & \text{We form a conjecture using forward substitution} \quad \\[5pt] & \text{Calculate the first few terms:} \quad \\[8pt] & ● \quad P_1 = P_0 \times 1.008 = 8b \times 1.008 \quad \\[5pt] & ● \quad P_2 = P_1 \times 1.008 = (8b \times 1.008) \times 1.008 = 8b \times (1.008)^2 \quad \\[5pt] & ● \quad P_3 = P_2 \times 1.008 = (8b \times (1.008)^n) \times 1.008 = 8b \times (1.008)^3 \quad \\[8pt] & \text{From our calculation, we form the conjecture:} \quad \\[5pt] & \qquad P_n = 8 \times (1.008)^n \quad \\[5pt] & \text{(c) Now, we calculate the population of the world in 2057:} \quad \\[5pt] & \qquad P_{2057-2023} = P_{34} = 8 \times (1.008)^{34} \approx 10.3968 \quad \\[5pt] & \text{So in 2057, the population will approximately be } 10.3968 \space billion \quad \end{align}
Block

Work 21.

  • Solve the following recurrence relations:
(1)an=2an1n1,a0=3(2)an=5an16an2n2,a0=1,a1=0(3)an=4an14an2n2,a0=6,a1=8(4)an=3an13an2an3n3,a0=5,a1=9,a2=15\begin{align} (1) \quad a_n & = 2a_{n-1} \mid n \geq 1, a_0 = 3 \quad \\[5pt] (2) \quad a_n & = 5a_{n-1} - 6a_{n-2} \mid n \geq 2, a_0 = 1, a_1 = 0 \quad \\[5pt] (3) \quad a_n & = 4a_{n-1} - 4a_{n-2} \mid n \geq 2, a_0 = 6, a_1 = 8 \quad \\[5pt] (4) \quad a_n & = -3a_{n-1} - 3a_{n-2} - a_{n-3} \mid n \geq 3, a_0 = 5, a_1 = -9, a_2 = 15 \quad \end{align}
Block
  • These are cases of linear homogeneous recurrence relation, we will solve accordingly:

  • (1)an=2an1n1,a0=3(1) \quad a_n = 2a_{n-1} \mid n \geq 1, a_0 = 3

Given recurrence relation an=2an1n1,a0=3The characteristic polynomial of this recurrence relation isr2The characteristic root is r = 2. Hence, we obtain the solution:an=A2n=a02n=32n\begin{align} & \text{Given recurrence relation } a_n = 2a_{n-1} \mid n \geq 1, a_0 = 3 \quad \\[5pt] & \text{The characteristic polynomial of this recurrence relation is} \quad \\[5pt] & \qquad \quad r - 2 \quad \\[5pt] & \text{The characteristic root is r = 2. Hence, we obtain the solution:} \quad \\[5pt] & \qquad \quad a_n = A \cdot 2^n = a_0 \cdot 2^n = 3 \cdot 2^n \quad \end{align}
Block
  • (2)an=5an16an2n2,a0=1,a1=0(2) \quad a_n = 5a_{n-1} - 6a_{n-2} \mid n \geq 2, a_0 = 1, a_1 = 0
Given recurrence relation an=5an16an2n2,a0=1,a1=0The characteristic polynomial of this recurrence relation isr25r+6The characteristic root are r = 2, r = 3. Hence, we obtain the solution:an=A2n+B3nSubstitute n = 0a0=A20+B30=A+B=1(1)Substitute n = 1a1=A21+B31=2A+3B=0(2)Next, we solve system of equations (1) and (2) (1)(2)={A+B=12A+3B=0 (1)(2)={A=B+12(B+1)+3B=0 (1)(2)={A=3B=2Therefore, the solution to the recurrence relation is an=32n23n\begin{align} & \text{Given recurrence relation } a_n = 5a_{n-1} - 6a_{n-2} \mid n \geq 2, a_0 = 1, a_1 = 0 \quad \\[5pt] & \text{The characteristic polynomial of this recurrence relation is} \quad \\[5pt] & \qquad \quad r^2 - 5r + 6 \quad \\[5pt] & \text{The characteristic root are r = 2, r = 3. Hence, we obtain the solution:} \quad \\[5pt] & \qquad \quad a_n = A \cdot 2^n + B \cdot 3^n \quad \\[5pt] & \text{Substitute n = 0} \quad \\[5pt] & \qquad \quad a_0 = A \cdot 2^0 + B \cdot 3^0 = A + B = 1 \quad (1) \quad \\[5pt] & \text{Substitute n = 1} \quad \\[5pt] & \qquad \quad a_1 = A \cdot 2^1 + B \cdot 3^1 = 2A + 3B = 0 \quad (2) \quad \\[5pt] & \text{Next, we solve system of equations (1) and (2)} \quad \\[5pt] & \quad \space (1)(2) = \begin{cases} A + B = 1 \quad \\[7pt] 2A + 3B = 0 \end{cases} \\[7pt] & \quad \space (1)(2) = \begin{cases} A = - B + 1\quad \\[7pt] 2(-B+1) + 3B = 0 \end{cases} \\[7pt] & \quad \space (1)(2) = \begin{cases} A = 3\quad \\[7pt] B = -2 \end{cases} \\[7pt] & \text{Therefore, the solution to the recurrence relation is } a_n = 3 \cdot 2^n - 2 \cdot 3^n \quad \end{align}
Block
  • (3)an=4an14an2n2,a0=6,a1=8(3) \quad a_n = 4a_{n-1} - 4a_{n-2} \mid n \geq 2, a_0 = 6, a_1 = 8
Given recurrence relation an=4an14an2n2,a0=6,a1=8The characteristic polynomial of this recurrence relation isr24r+4The characteristic root is r = 2 with multiplicity of 2.Hence, we obtain the solution:an=A2n+Bn2nSubstitute n = 0a0=A20+B020=A=6(1)Substitute n = 1a1=A21+B121=2A+2B=8(2)(1)(2)    B=2Therefore, the solution to the recurrence relation is an=62n2n2n\begin{align} & \text{Given recurrence relation } a_n = 4a_{n-1} - 4a_{n-2} \mid n \geq 2, a_0 = 6, a_1 = 8 \quad \\[5pt] & \text{The characteristic polynomial of this recurrence relation is} \quad \\[5pt] & \qquad \quad r^2 - 4r + 4 \quad \\[5pt] & \text{The characteristic root is r = 2 with multiplicity of 2.} \quad \\[5pt] & \text{Hence, we obtain the solution:} \quad \\[5pt] & \qquad \quad a_n = A \cdot 2^n + B \cdot n2^n \quad \\[5pt] & \text{Substitute n = 0} \quad \\[5pt] & \qquad \quad a_0 = A \cdot 2^0 + B \cdot 0 \cdot 2^0 = A = 6 \quad (1) \quad \\[5pt] & \text{Substitute n = 1} \quad \\[5pt] & \qquad \quad a_1 = A \cdot 2^1 + B \cdot 1 \cdot 2^1 = 2A + 2B = 8 \quad (2) \quad \\[5pt] & \qquad \quad (1)(2) \implies B = -2 \quad \\[5pt] & \text{Therefore, the solution to the recurrence relation is } a_n = 6 \cdot 2^n - 2n \cdot 2^n \quad \end{align}
Block
  • (4)an=3an13an2an3n3,a0=5,a1=9,a2=15(4) \quad a_n = -3a_{n-1} - 3a_{n-2} - a_{n-3} \mid n \geq 3, a_0 = 5, a_1 = -9, a_2 = 15
Given recurrence relation an=3an13an2an3n3,a0=5,a1=9,a2=15The characteristic polynomial of this recurrence relation isr3+3r2+3r+1The characteristic root is r = -1 with multiplicity of 3.Hence, we obtain the solution:an=A(1)n+Bn(1)n+Cn2(1)nSubstitute n = 0a0=A(1)0+B0(1)0+C02(1)0=A=5(1)Substitute n = 1a1=A(1)1+B1(1)1+C12(1)1=ABC=9    B+C=4(2)Substitute n = 2a2=A(1)2+B2(1)2+C22(1)2=A+2B+4C=15    2B+4C=10(3)Next, we solve system of equations (2) and (3) (2)(3)={B+C=42B+4C=10 (2)(3)={B=4C2(4C)+4C=10 (2)(3)={B=3C=1Therefore, the solution to the recurrence relation is an=5(1)n+3n(1)n+n2(1)n\begin{align} & \text{Given recurrence relation } \quad \\[5pt] & a_n = -3a_{n-1} - 3a_{n-2} - a_{n-3} \mid n \geq 3, a_0 = 5, a_1 = -9, a_2 = 15 \quad \\[5pt] & \text{The characteristic polynomial of this recurrence relation is} \quad \\[5pt] & \qquad \quad r^3 + 3r^2 + 3r + 1 \quad \\[5pt] & \text{The characteristic root is r = -1 with multiplicity of 3.} \quad \\[5pt] & \text{Hence, we obtain the solution:} \quad \\[5pt] & \qquad \quad a_n = A \cdot (-1)^n + B \cdot n(-1)^n + C \cdot n^2(-1)^n \quad \\[5pt] & \text{Substitute n = 0} \quad \\[5pt] & \qquad \quad a_0 = A \cdot (-1)^0 + B \cdot 0(-1)^0 + C \cdot 0^2(-1)^0 = A = 5 \quad (1) \quad \\[5pt] & \text{Substitute n = 1} \quad \\[5pt] & \qquad \quad a_1 = A \cdot (-1)^1 + B \cdot 1(-1)^1 + C \cdot 1^2(-1)^1 \quad \\[5pt] & \qquad \quad \quad = -A -B -C = -9 \implies B + C = 4 \quad (2) \quad \\[5pt] & \text{Substitute n = 2} \quad \\[5pt] & \qquad \quad a_2 = A \cdot (-1)^2 + B \cdot 2(-1)^2 + C \cdot 2^2(-1)^2 \quad \\[5pt] & \qquad \quad \quad = A + 2B + 4C = 15 \implies 2B + 4C = 10 \quad (3) \quad \\[5pt] & \text{Next, we solve system of equations (2) and (3)} \quad \\[5pt] & \quad \space (2)(3) = \begin{cases} B + C = 4 \quad \\[7pt] 2B + 4C = 10 \end{cases} \\[7pt] & \quad \space (2)(3) = \begin{cases} B = 4 - C \quad \\[7pt] 2(4-C) + 4C = 10 \end{cases} \\[7pt] & \quad \space (2)(3) = \begin{cases} B = 3\quad \\[7pt] C = 1 \end{cases} \\[7pt] & \text{Therefore, the solution to the recurrence relation is } \quad \\[5pt] & a_n = 5 \cdot (-1)^n + 3n \cdot (-1)^n + n^2 \cdot (-1)^n \quad \end{align}
Block

Work 22.

  • Solve the following recurrence relations:
(1)an=3an1+2nn1,a0=1(2)an=2an1+2n2n2,a1=5(3)an=5an16an2+2n+3nn2Hint: Find a particular solution of the form qn2n+p1n+p2in which q,p1,p2 are constants.\begin{align} & (1) \quad a_n = 3a_{n-1} + 2^n \mid n \geq 1, a_0 = 1 \quad \\[5pt] & (2) \quad a_n = 2a_{n-1} + 2n^2 \mid n \geq 2, a_1 = 5 \quad \\[5pt] & (3) \quad a_n = 5a_{n-1} - 6a_{n-2} + 2^n + 3n \mid n \geq 2 \quad \\[5pt] & \small{\text{Hint: Find a particular solution of the form } qn2^n + p_1n + p_2} \quad \\[-1pt] & \small{\text{in which } q,p_1,p_2 \text{ are constants.}} \quad \end{align}
Block
an=anh+anpWhere anh is the solution for the homogeneous partAnd anp is the solution for the nonhomogeneous partGeneral formula: Given F(n)=(btnt++b0)snIf s is a solution of the characteristic polynomial then:anp=nm(ptnt++p0)snOtherwise:anp=nm(ptnt++p0)sn\begin{align} & a_n = a_n^h + a_n^p \quad \\[5pt] & \text{Where } a_n^h \text{ is the solution for the homogeneous part} \quad \\[5pt] & \text{And } a_n^p \text{ is the solution for the nonhomogeneous part} \quad \\[5pt] & \text{General formula: Given } F(n) = (b_tn^t + \ldots + b_0)s^n \quad \\[5pt] & \text{If s is a solution of the characteristic polynomial then:} \quad \\[5pt] & a_n^p = n^m(p_tn^t + \ldots + p_0)s^n \quad \\[5pt] & \text{Otherwise:} \quad \\[5pt] & a_n^p = n^m(p_tn^t + \ldots + p_0)s^n \quad \end{align}
Block
F(n)F(n) anpa_n^p
cc cc
nn cn+dcn+d
n2n^2 cn2+dn+ecn^2+dn+e
rnr^n crncr^n
  • These are cases of linear nonhomogeneous recurrence relation, we will solve accordingly:

  • (1)an=3an1+2nn1,a0=1(1) \quad a_n = 3a_{n-1} + 2^n \mid n \geq 1, a_0 = 1

Given recurrence relationan=3an1+2nn1,a0=1We define the general solution for an to be an=anh+anpWhere anh is the homogeneous partAnd anp is the nonhomogeneous partWe consider the homogeneous part:anh=3an1Which generates characteristic polynomial:r3=0    r=3We obtained solution for the homogenous part:anh=A3n with A being some constantWe consider the nonhomogeneous part: F(n)=2nTry: anp=c2n with c being some constantFrom the given recurrence relation, we derive:an=3an1+2nan3an12n=0c2n3c2n12n=2n(c3c21)=0    c=2    anp=(2)2nThus, we have:an=anh+anp=A3n+(2)2nSubstitute n = 0a0=A30+(2)20=A2=1    A=3Therefore: an=33n22n\begin{align} & \text{Given recurrence relation} \quad \\[5pt] & a_n = 3a_{n-1} + 2^n \mid n \geq 1, a_0 = 1 \quad \\[5pt] & \text{We define the general solution for } a_n \text{ to be } a_n = a_n^h + a_n^p \quad \\[5pt] & \text{Where } a_n^h \text{ is the homogeneous part} \quad \\[5pt] & \text{And } a_n^p \text{ is the nonhomogeneous part} \quad \\[5pt] & \text{We consider the homogeneous part:} \quad \\[5pt] & \qquad \quad a_n^h = 3a_{n-1} \quad \\[5pt] & \text{Which generates characteristic polynomial:} \quad \\[5pt] & \qquad \quad r - 3 = 0 \implies r = 3 \quad \\[5pt] & \text{We obtained solution for the homogenous part:} \quad \\[5pt] & \qquad \quad a_n^h = A \cdot 3^n \text{ with A being some constant} \quad \\[5pt] & \text{We consider the nonhomogeneous part: } F(n) = 2^n \quad \\[5pt] & \text{Try: } a_n^p = c2^n \text{ with c being some constant} \quad \\[5pt] & \text{From the given recurrence relation, we derive:} \quad \\[5pt] & \qquad \quad a_n = 3a_{n-1} + 2^n \equiv a_n - 3a_{n-1} -2^n = 0 \quad \\[5pt] & \qquad \quad \equiv c2^n -3 \cdot c2^{n-1} - 2^n = 2^n(c - \frac{3c}{2} - 1) = 0 \quad \\[5pt] & \qquad \quad \implies c = -2 \implies a_n^p = (-2) \cdot 2^n \quad \\[5pt] & \text{Thus, we have:} \quad \\[5pt] & \qquad \quad a_n = a_n^h + a_n^p = A \cdot 3^n + (-2) \cdot 2^n \quad \\[5pt] & \text{Substitute n = 0} \quad \\[5pt] & \qquad \quad a_0 = A \cdot 3^0 + (-2) \cdot 2^0 = A - 2 = 1 \implies A = 3 \quad \\[5pt] & \text{Therefore: } a_n = 3 \cdot 3^n - 2 \cdot 2^n \quad \\[5pt] \end{align}
Block
  • (2)an=2an1+2n2n2,a1=5(2) \quad a_n = 2a_{n-1} + 2n^2 \mid n \geq 2, a_1 = 5
Given recurrence relationan=2an1+2n2n2,a1=5We define the general solution for an to be an=anh+anpWhere anh is the homogeneous partAnd anp is the nonhomogeneous partWe consider the homogeneous part:anh=2an1Which generates characteristic polynomial:r2=0    r=2We obtained solution for the homogenous part:anh=A2n with A being some constantWe consider the nonhomogeneous part: F(n)=2n2Try: anp=cn2+dn+e with c, d, e being some constantFrom the given recurrence relation, we derive:an=2an1+2n2an2an12n2=0cn2+dn+e2(c(n1)2+d(n1)+e)2n2=0cn2dne+4cn2c+2d2n2=0()Factor out the coefficients, we have:()={c=2d+4c=0e2c+2d=0()={c=2d=8e=12Thus, we have:an=anh+anp=A2n2n28n12Substitute n = 1a1=A212128112=5    A=272Therefore: an=2722n2n28n12\begin{align} & \text{Given recurrence relation} \quad \\[5pt] & a_n = 2a_{n-1} + 2n^2 \mid n \geq 2, a_1 = 5 \quad \\[5pt] & \text{We define the general solution for } a_n \text{ to be } a_n = a_n^h + a_n^p \quad \\[5pt] & \text{Where } a_n^h \text{ is the homogeneous part} \quad \\[5pt] & \text{And } a_n^p \text{ is the nonhomogeneous part} \quad \\[5pt] & \text{We consider the homogeneous part:} \quad \\[5pt] & \qquad \quad a_n^h = 2a_{n-1} \quad \\[5pt] & \text{Which generates characteristic polynomial:} \quad \\[5pt] & \qquad \quad r - 2 = 0 \implies r = 2 \quad \\[5pt] & \text{We obtained solution for the homogenous part:} \quad \\[5pt] & \qquad \quad a_n^h = A \cdot 2^n \text{ with A being some constant} \quad \\[5pt] & \text{We consider the nonhomogeneous part: } F(n) = 2n^2 \quad \\[5pt] & \text{Try: } a_n^p = cn^2+dn+e \text{ with c, d, e being some constant} \quad \\[5pt] & \text{From the given recurrence relation, we derive:} \quad \\[5pt] & \qquad \quad a_n = 2a_{n-1} + 2n^2 \equiv a_n - 2a_{n-1} - 2n^2 = 0 \quad \\[5pt] & \qquad \quad \equiv cn^2 + dn + e - 2(c(n-1)^2+d(n-1) + e) - 2n^2 = 0 \quad \\[5pt] & \qquad \quad \equiv -cn^2 -dn -e +4cn -2c +2d - 2n^2 = 0 \quad (*) \quad \\[5pt] & \text{Factor out the coefficients, we have:} \quad \\[5pt] & \qquad (*) = \begin{cases} c = -2\quad \\[5pt] -d + 4c = 0 \\[5pt] -e -2c + 2d = 0 \end{cases} \\[7pt] & \qquad (*) = \begin{cases} c = -2\quad \\[5pt] d = -8 \\[5pt] e = -12 \end{cases} \\[7pt] & \text{Thus, we have:} \quad \\[5pt] & \qquad \quad a_n = a_n^h + a_n^p = A \cdot 2^n - 2n^2 -8n - 12 \quad \\[5pt] & \text{Substitute n = 1} \quad \\[7pt] & \qquad \quad a_1 = A \cdot 2^1 - 2\cdot 1^2 -8 \cdot 1 - 12 = 5 \implies A = \frac{27}{2} \quad \\[7pt] & \text{Therefore: } a_n = \frac{27}{2} \cdot 2^n - 2n^2 -8n - 12 \quad \\[7pt] \end{align}
Block
  • (3)an=5an16an2+2n+3nn2(3) \quad a_n = 5a_{n-1} - 6a_{n-2} + 2^n + 3n \mid n \geq 2
Given recurrence relationan=5an16an2+2n+3nn2We define the general solution for an to be an=anh+anpWhere anh is the homogeneous partAnd anp is the nonhomogeneous partWe consider the homogeneous part:anh=5an16an2Which generates characteristic polynomial:r25r+6=0 gives us roots: r=2,r=3We obtained solution for the homogenous part:anh=A2n+B3n with A, B being some constantWe consider the nonhomogeneous part: F(n)=2n+3nWhich can be written as F(n)=F1(n)+F2(n)Where F1(n)=2n and F2(n)=3nDefine anp=anp1+anp2We need to find the solution anp1 and anp2 for F1(n) and F2(n)\begin{align} & \text{Given recurrence relation} \quad \\[5pt] & a_n = 5a_{n-1} - 6a_{n-2} + 2^n + 3n \mid n \geq 2 \quad \\[5pt] & \text{We define the general solution for } a_n \text{ to be } a_n = a_n^h + a_n^p \quad \\[5pt] & \text{Where } a_n^h \text{ is the homogeneous part} \quad \\[5pt] & \text{And } a_n^p \text{ is the nonhomogeneous part} \quad \\[5pt] & \text{We consider the homogeneous part:} \quad \\[5pt] & \qquad \quad a_n^h = 5a_{n-1} - 6a_{n-2} \quad \\[5pt] & \text{Which generates characteristic polynomial:} \quad \\[5pt] & \qquad \quad r^2 - 5r + 6 = 0 \text{ gives us roots: } r = 2, r = 3 \quad \\[5pt] & \text{We obtained solution for the homogenous part:} \quad \\[5pt] & \qquad \quad a_n^h = A \cdot 2^n + B \cdot 3^n \text{ with A, B being some constant} \quad \\[5pt] & \text{We consider the nonhomogeneous part: } F(n) = 2^n + 3n \quad \\[5pt] & \text{Which can be written as } F(n) = F_1(n) + F_2(n) \quad \\[5pt] & \text{Where } F_1(n) = 2^n \text{ and } F_2(n) = 3n \quad \\[5pt] & \text{Define } a_n^p = a_n^{p_1} + a_n^{p_2} \quad \\[5pt] & \text{We need to find the solution } a_n^{p_1} \text{ and } a_n^{p_2} \text{ for } F_1(n) \text{ and } F_2(n) \quad \end{align}
Block
Let’s find the solution for anp1Given that F1(n)=2nAnd given 2 is a root of the characteristic polynomialWe try: anp1=cn2n with c being some constantFrom the given recurrence relation, we derive:an1=5an16an2+2ncn2n=5c(n1)2n16c(n2)2n2+2n=0cn2n=5c(n1)2n26c(n2)2n4+2ncn=5c(n1)26c(n2)4+1cn=5cn25c26cn4+3c+1cn=cn+c2+1    c=2Thus we have a solution anp1=(2n)2n\begin{align} & \text{Let's find the solution for } a_n^{p_1} \quad \\[5pt] & \text{Given that } F_1(n) = 2^n \quad \\[5pt] & \text{And given 2 is a root of the characteristic polynomial} \quad \\[5pt] & \text{We try: } a_n^{p_1} = cn2^n \text{ with c being some constant} \quad \\[5pt] & \text{From the given recurrence relation, we derive:} \quad \\[5pt] & \qquad \quad a_{n_1} = 5a_{n-1} - 6a_{n-2} + 2^n \quad \\[5pt] & \qquad \quad \equiv cn2^n = 5c(n-1)2^{n-1} - 6c(n-2)2^{n-2} + 2^n = 0 \quad \\[8pt] & \qquad \quad \equiv cn2^n = \frac{5c(n-1)2^n}{2} - \frac{6c(n-2)2^n}{4} + 2^n \quad \\[8pt] & \qquad \quad \equiv cn = \frac{5c(n-1)}{2} - \frac{6c(n-2)}{4} + 1 \quad \\[8pt] & \qquad \quad \equiv cn = \frac{5cn}{2} - \frac{5c}{2} - \frac{6cn}{4} + 3c + 1 \quad \\[8pt] & \qquad \quad \equiv cn = cn + \frac{c}{2} + 1 \implies c = -2 \quad \\[8pt] & \text{Thus we have a solution } a_n^{p_1} = (-2n)2^n \quad \end{align}
Block
Let’s find the solution for anp2Given that F2(n)=3nWe try: anp2=dn+e with d, e being some constantFrom the given recurrence relation, we derive:an2=5an16an2+3ndn+e=5(d(n1)+e)6(d(n2)+e)+3ndn+e=5dn5d+5e6dn+12d6e+3n2dn2e+7d+3n=0()Factor out the coefficients, we have:()={2d+3=02e+7d=0()={d=32e=214Thus we have a solution anp2=3n2+214\begin{align} & \text{Let's find the solution for } a_n^{p_2} \quad \\[5pt] & \text{Given that } F_2(n) = 3n \quad \\[5pt] & \text{We try: } a_n^{p_2} = dn + e \text{ with d, e being some constant} \quad \\[5pt] & \text{From the given recurrence relation, we derive:} \quad \\[5pt] & \qquad \quad a_{n_2} = 5a_{n-1} - 6a_{n-2} + 3n \quad \\[5pt] & \qquad \quad \equiv dn + e = 5(d(n-1) + e) -6(d(n-2)+e) + 3n \quad \\[5pt] & \qquad \quad \equiv dn + e = 5dn - 5d + 5e - 6dn +12d -6e +3n \quad \\[5pt] & \qquad \quad \equiv -2dn-2e+7d+3n = 0 \quad (*) \quad \\[5pt] & \text{Factor out the coefficients, we have:} \quad \\[5pt] & \qquad (*) = \begin{cases} -2d + 3 = 0 \quad \\[5pt] -2e + 7d = 0 \\[5pt] \end{cases} \\[7pt] & \qquad (*) = \begin{cases} d = \frac{3}{2} \quad \\[5pt] e = \frac{21}{4} \end{cases} \\[7pt] & \text{Thus we have a solution } a_n^{p_2} = \frac{3n}{2} + \frac{21}{4} \quad \end{align}
Block
Now that we have anp1 and anp2 we have the solution:an=anh+anp1+anp2=A2n+B3n+(2n)2n+3n2+214Therefore, a solution to the given recurrence relation is:an=A2n+B3n+(2n)2n+3n2+214\begin{align} & \text{Now that we have } a_n^{p_1} \text{ and } a_n^{p_2} \text{ we have the solution:} \quad \\[5pt] & \qquad \quad a_n = a_n^h + a_n^{p_1} + a_n^{p_2} \quad \\[8pt] & \qquad \quad \quad = A \cdot 2^n + B \cdot 3^n + (-2n)2^n + \frac{3n}{2} + \frac{21}{4} \quad \\[8pt] & \text{Therefore, a solution to the given recurrence relation is:} \quad \\[5pt] & \qquad \quad a_n = A \cdot 2^n + B \cdot 3^n + (-2n)2^n + \frac{3n}{2} + \frac{21}{4} \quad \end{align}
Block

Work 24.

Solve recurrence relation: an=2an1an2n2Given a0=1,a1=1 (Using generating function).\begin{align} & \text{Solve recurrence relation: } a_n = 2a_{n-1} - a_{n-2} \mid n \geq 2 \quad \\[5pt] & \text{Given } a_0 = 1, a_1 = 1 \small{\text{ (Using generating function).}} \quad \end{align}
Block
We define the generating function:Ga(x)=n=0anxn=n=0(2an1an2)xn=n=02an1xnn=0an2xn=a0+2xn=1an1xn1(a0+a1+x2n=2an2xn2)Ga(x)=1+2xGa(x)x2Gx(x)=1x22x+1=1(1x)2Ga(x)=n=0(n+1)xn=n=0(n+1)xn(Known sum)Therefore an=n1,n2nN\begin{align} & \text{We define the generating function:} \quad \\[10pt] & G_a(x) = \sum_{n=0}^{\infty} a_nx^n = \sum_{n=0}^{\infty} (2a_{n-1} - a_{n-2})x^n \quad \\[10pt] & \qquad \quad = \sum_{n=0}^{\infty} 2a_{n-1}x^n - \sum_{n=0}^{\infty} a_{n-2}x^n \quad \\[10pt] & \qquad \quad = a_0 + 2x \sum_{n=1}^{\infty} a_{n-1}x^{n-1} - \left( a_0 + a_1 + x^2 \sum_{n=2}^{\infty} a_{n-2}x^{n-2} \right) \quad \\[10pt] & G_a(x) = -1 + 2xG_a(x) - x^2G_x(x) = \frac{-1}{x^2 - 2x + 1} = \frac{-1}{(1-x)^2} \quad \\[10pt] & G_a(x) = - \sum_{n=0}^{\infty} (n+1)x^n = \sum_{n=0}^{\infty} -(n+1)x^n \quad \text{(Known sum)} \quad \\[10pt] & \text{Therefore } a_n = -n-1, n \geq 2 \mid n \in \mathbb{N} \quad \end{align}
Block