Finding the General Term of First and Second Order Linear Recurrences

[I learned this here] https://zhuanlan.zhihu.com/p/104596563 Recently, things have been quite competitive. Although I've done this set of problems before, I didn't study them carefully. Then, to avoid awkwardly explaining the problems, I dragged GJY into researching this until two or three in the morning. Actually, if I had learned about characteristic roots, this problem would be easy to see, but I hadn't. After asking many experts, I finally found the direction of characteristic roots. Because it was really late, I had to shamefully log off. The next morning, after spending a dozen minutes reading, it suddenly became clear, and I was amazed at how simple it was (not really). The calculation process is very simple, but the construction is still difficult. Fortunately, this is a general solution, so I can just use it a few times and memorize it. Characteristic roots seem to be from linear algebra (really seems like it).

I learned this here Recently, things have been quite competitive. Although I've done this set of problems before, I didn't study them carefully. Then, to avoid awkwardly explaining the problems, I dragged GJY into researching this until two or three in the morning. Actually, if I had learned about characteristic roots, this problem would be easy to see, but I hadn't. After asking many experts, I finally found the direction of characteristic roots. Because it was really late, I had to shamefully log off. The next morning, after spending a dozen minutes reading, it suddenly became clear, and I was amazed at how simple it was (not really). The calculation process is very simple, but the construction is still difficult. Fortunately, this is a general solution, so I can just use it a few times and memorize it. Characteristic roots seem to be from linear algebra (really seems like it).

A little supplement written at the beginning: In this article, because geometric sequences are easier to find the nnth term, we hope to convert a recurrence into the form of a geometric sequence. Here, I will first give the recurrence and the geometric sequence, and then try to establish a connection between them (equivalence relations between variables).

1. First Order

Form:

xn=pxn1+q(a)x_n = px_{n-1} + q \qquad (a)

When p=1p=1, this is an arithmetic sequence. When p1p\neq1, consider constructing a geometric sequence (this is a general solution construction): xn+1x0=p(xnx0)(b)x_{n+1}-x_0=p(x_n-x_0) \qquad (b)

Here, each term is of the form xix0x_i-x_0, so this is a geometric sequence with common ratio pp.

We consider transforming (b)(b) into the form of (a)(a), so that we can establish connections between the variables.

xn+1=pxnpx0+x0xn+1=pxn+(1p)x0(b)\begin{aligned} x_{n+1}&=px_n-px_0+x_0 \\ x_{n+1}&=px_n+(1-p)x_0 \qquad (b') \end{aligned}

At this point, we can clearly see the form of (a)(a) in (b)(b'). Furthermore, we establish connections between the variables.

q=(1p)x0x0=q1pq=(1-p)x_0 \newline x_0=\frac{q}{1-p}

At this point, we have obtained all the constants p,x0p,x_0 for the geometric sequence bb, and we can find any term xnx0x_n-x_0, and naturally any term xnx_n.

So xn=(x1x0)pn1+x0x_n=(x_1-x_0)p^{n-1}+x_0.

2. Second Order

xn=pxn1+qxn2(a)x_n=px_{n-1}+qx_{n-2} \qquad (a)

This is a second-order linear recurrence. Why second-order? Probably because it uses two xx's.

Similar to the first-order recurrence, we hope to construct a geometric sequence (again, this is a general solution construction):

xn+1axn=b(xnaxn1)(b)x_{n+1}-ax_n=b(x_n-ax_{n-1}) \qquad (b)

Here, each term is of the form xiaxi1x_i-ax_{i-1}, very similar to the approach in 1.(b)1.(b).

Similarly, we try to transform it into the form of (a)(a).

xn+1axn=bxnabxn1xn+1=(a+b)xnabxn1(b)x_{n+1}-ax_n=bx_n-abx_{n-1} \newline x_{n+1}=(a+b)x_n-abx_{n-1} \qquad (b')

Then comparing (a)(a) and (b)(b') gives:

{a+b=pab=q\left\{ \begin{aligned} a+b&=p \\ ab&=-q \end{aligned} \right.

To solve for a,ba,b, we consider constructing a quadratic equation with roots a,ba,b. Using Vieta's formulas:

x2pxq=0x^2-px-q=0

This equation is called the characteristic equation of the sequence, and a,ba,b are called the characteristic roots.

Since a,ba,b are the two roots of this equation, they are "symmetric", considering the symmetry of the function graph.

We return to equation (b)(b). Because they are symmetric, we can obtain two geometric sequences:

{xn+1axn=b(xnaxn1)xn+1bxn=a(xnbxn1)\left\{ \begin{aligned} x_{n+1}-ax_n&=b(x_n-ax_{n-1}) \\ x_{n+1}-bx_n&=a(x_n-bx_{n-1}) \end{aligned} \right.

The right-hand sides can be simplified:

{xn+1axn=bn1(x2ax1)xn+1bxn=an1(x2bx1)\left\{ \begin{aligned} x_{n+1}-ax_n&=b^{n-1}(x_2-ax_1) \\ x_{n+1}-bx_n&=a^{n-1}(x_2-bx_1) \end{aligned} \right.

To find xnx_n, subtract them to eliminate xn+1x_{n+1} on the left:

(ab)xn=an1(x2bx1)bn1(x2ax1)xn=an1(x2bx1)bn1(x2ax1)ab(c)(a-b)x_n=a^{n-1}(x_2-bx_1)-b^{n-1}(x_2-ax_1) \newline x_n=\frac{a^{n-1}(x_2-bx_1)-b^{n-1}(x_2-ax_1)}{a-b} \qquad (c)

2.1 Example:

x0=1,x1=3,xn=2xn1+2xn2x_0=1,x_1=3,x_n=2x_{n-1}+2x_{n-2}

Now we know our goal is to find a,ba,b. Directly solving the characteristic equation x2(2)x(2)=0x^2-(2)x-(2)=0 gives:

{a=1+3b=13\left\{ \begin{aligned} a&=1+\sqrt{3} \\ b&=1-\sqrt{3} \end{aligned} \right.

Substitute into 🦁 (no, it's equation 2.(c)2.(c)):[^1]
xn=(1+3)n1((3)(13)(1))(13)n1((3)(1+3)(1))(1+3)(13)=(1+3)n1(2+3)(13)n1(23)(1+3)(13)=3+223(1+3)n1+3223(13)n1\begin{aligned} x_n&=\frac{(1+\sqrt{3})^{n-1}((3)-(1-\sqrt{3})(1))-(1-\sqrt{3})^{n-1}((3)-(1+\sqrt{3})(1))}{(1+\sqrt{3})-(1-\sqrt{3})} \\ \\ &=\frac{(1+\sqrt{3})^{n-1}(2+\sqrt{3})-(1-\sqrt{3})^{n-1}(2-\sqrt{3})}{(1+\sqrt{3})-(1-\sqrt{3})} \\ \\ &=\frac{\sqrt{3}+2}{2\sqrt{3}}(1+\sqrt{3})^{n-1}+\frac{\sqrt{3}-2}{2\sqrt{3}}(1-\sqrt{3})^{n-1} \end{aligned}

[^1]: Recently changed markdown compiler, LaTeX seems broken.

Now it's fixed.

Comments

0

No comments yet.