4

This morning I decided to give a try on some math tests from the final of a textbook for $9^\text{th}$ graders, just "for fun" (this year I'm passing to the $10^\text{th}$ grade). It seems like it wasn't fun at all. I stumbled upon another problem that I believe can be solved using Newton's sums / Vieta's formulas and since these topics pop up so often in my problems I decided to go full documentation mode on them (I didn't understand a thing from the class).

I got to the conclusion that an equation is actually a recurrence generator so I thought of the reverse processing - looking at a recurrence through an equation. The formula I arrived at is close to the formula explained very friendly here, but in my deduction it only works for a particularization of the initial terms. I wrote this document that I wish to add to my math portfolio, but it's incomplete (I apologize if the translations are inaccurate). The next subsection would be 3.3 Proof of the generalized formula. But I don't know how to continue from there. Everywhere on the internet I see something like:

There's a general theorem that says $f(n)=Ar_1^n+Br_2^n$ where $r_1,r_2$ are roots of the equation [...] and $A,B$ can be calculated through a system of linear equations [...]

But I want the proof. And I don't even want to think of induction. I think induction is an excuse to not actually think the problem the way it is meant to be thought. It would be nice if people could timetravel in the future, find the formula, then go back in time and say "I've found the formula but hey let's prove it by induction because who cares about the logic." I only agree with induction when the formula is intuitive and you want to make sure that it's correct, but here's not the case.

I think I am really close to proving the formula. Basically the problem turns to:

Knowing the formula for $f(n)=c_1f(n-1)+c_2f(n-2)$ with $f(0)=2,f(1)=c_1$, find the formula for $f(n)$ for any given $f(0),f(1)$.

Again, I can't find anything on the internet and I don't want induction, nor calculus (I read that solving recurrence relations is similar to solving differential equations but I don't know calculus).

Thanks in advance!

Neox
  • 717
  • When the roots are distinct you can reduce the second order recurrence to a first order one, then just use the (presumably known) form for geometric progressions. For example $f(n)=3f(n-1)-2f(n-2)$ $\iff \left(f(n)-f(n-1)\right)=2\left(f(n-1)-f(n-2)\right)$, so $f(n)-f(n-1)$ is a GP. – dxiv Jul 14 '21 at 15:54
  • The most natural way of viewing this is to use linear algebra. I would advise looking at a book on the matter; Halmos' "Linear Algebra Problem Book" is very good. –  Jul 14 '21 at 15:56
  • @MichaelBarz Thanks for the name but googling "prerequisites for linear algebra": "The most frequent prerequisite for a Linear Algebra course is Calculus II." It's gonna take me a while to understand the formula in this way... – Neox Jul 14 '21 at 16:05
  • @dxiv I totally agree with you on that example but is this always going to work? – Neox Jul 14 '21 at 16:06
  • @Neox Try it, then you'll see where the second root comes into the picture. This works when the roots are real and distinct. With some work, the cases of complex roots and double roots can be reduced to first order, too, albeit in slightly different ways. – dxiv Jul 14 '21 at 16:10
  • Check this link. – rtybase Jul 14 '21 at 19:21
  • @Neox You do not need calculus to learn linear algebra... –  Jul 14 '21 at 21:55
  • @dxiv. Is https://math.stackexchange.com/q/3702944 related to this? –  Sep 11 '21 at 19:23
  • @CMC.V It is related, but the question here is about deriving the general solution without knowing it beforehand, rather than just proving it. – dxiv Sep 11 '21 at 19:31

3 Answers3

4

Expanding on my comments under OP's question, suppose we do not know about the characteristic polynomial, and do not have the foresight to try to find solutions in the form of a geometric progression. Then the $2^{nd}$ order recurrence can still be solved by reducing it to the known case of a $1^{st}$ order recurrence $g_n = \mu g_{n-1}$ which is easily solved by telescoping as $g_n = \mu g_{n-1}=\mu^2g_{n-2}=\dots=\mu^ng_0\,$.

Let the $2^{nd}$ order homogeneous recurrence be $f_n=a f_{n-1}-bf_{n-2}$. We can assume WLOG that $b\ne0$, otherwise it would not be a $2^{nd}$ order recurrence.

The idea is to try to rewrite the relation $f_n=a f_{n-1}-bf_{n-2}$ in the form $g_n = \mu g_{n-1}$ where $g_n=f_n-\lambda f_{n-1}$ is a linear combination between consecutive terms of the original sequence:

$$ g_n = \mu g_{n-1} \;\iff\; f_n - \lambda f_{n-1} = \mu(f_{n-1}-\lambda f_{n-2}) \;\iff\; f_n = \color{red}{(\lambda+\mu)}\,f_{n-1}- \color{green}{\lambda\mu}\, f_{n-2} $$

The last equality matches $f_n=\color{red}{a} f_{n-1}-\color{green}{b}f_{n-2}$ if we choose $\lambda,\mu$ such that $\lambda+\mu=a$ and $\lambda\mu = b$ $\;\left(\dagger\right)\;$ with $\lambda,\mu \ne 0$ because $b \ne 0$.

Then $g_n=\mu^{n-1} g_1\,$, and $f_n$ can be determined by adding the following and telescoping again:

$$ \begin{cases} f_n - \lambda f_{n-1} &= \mu^{n-1}\,g_1 && \mid \,\cdot\,1 \\ f_{n-1} - \lambda f_{n-2} &= \mu^{n-2}\,g_1 && \mid \,\cdot\, \lambda \\ f_{n-2} - \lambda f_{n-3} &= \mu^{n-3}\,g_1 && \mid \,\cdot\, \lambda^2 \\ \dots \\ f_2 - \lambda f_1 &= \mu \,g_1 && \mid \,\cdot\, \lambda^{n-2} \\ f_1 - \lambda f_0 &= \;\;\,g_1 && \mid \,\cdot\, \lambda^{n-1} \end{cases} $$

$$ \implies\;\;\;\;f_n = \lambda^n f_0 + \underbrace{\left(\lambda^{n-1}+\lambda^{n-2}\mu+\dots+\mu^{n-1}\right)}_{=\;\begin{cases}\begin{align} (\lambda^n-\mu^n)/(\lambda-\mu) && \text{if}\;\; \lambda \ne \mu \\ n\,\lambda^{n-1} && \text{if}\;\; \lambda = \mu\end{align}\end{cases}}\,\left(f_1-\lambda f_0\right) $$

$\;\left(\dagger\right)$ Note that, by Vieta's relations, these $\lambda, \mu$ are the roots of the quadratic $t^2 - at + b = 0$, which "happens" to be the characteristic polynomial associated with the original recurrence.

dxiv
  • 76,497
  • 1
    I've just woken up and after I read this I perfectly understood it. Thanks (again) @dxiv. The answer by marty cohen seemed too long :) but I might try to understand it in the near future and at Tuvasbien I am still confused by $u$ and $v$ but I'll upvote everything for the efforts of answering my question. Thanks everyone. – Neox Jul 15 '21 at 08:29
  • 1
    @Neox Glad it helped. This is deliberately less general than the other answers. Intention was to outline one possible path to "discover" the theory of linear homogeneous recursions on your own, with entirely elementary means. It is possible to move up to higher order recursions using a similar idea of order reduction, though calculations become more tedious. Chances are that, somewhere along that way, seeing the characteristic polynomial and its roots pop up over and again will "click", and at that point you will have reinvented the general formula. – dxiv Jul 15 '21 at 16:26
2

If you want a proof without using induction here is one. Let $r\in\mathbb{R}$ and $u_n:=r^n$, then $(u_n)$ satisfies the recursive relation $u_{n+2}=au_{n+1}+bu_n$ if and only if $r^2=ar+b$. Suppose there are 2 distinct solutions for this equation which I will denote $r_1$ and $r_2$. Then $(r_1^n)$ and $(r_2^n)$ are in E, the set of the sequences satisfying the recursive formula. They are linearly independent because $r_1\neq r_2$ thus $\dim{\rm span}((r_1^n),(r_2^n))=2$. But $\dim E\leqslant 2$ because the map $(u_n)\in E\mapsto (u_0,u_1)\in\mathbb{R}^2$ is one-to-one (you can show it by induction). We can therefore conclude that $E={\rm span}((r_1^n),(r_2^n))$ by an argument of dimension.

EDIT (other solution without linear algebra) :

Let $r_1$ be a root of $X^2-aX-b$ and $v_n:=u_nr_1^{-n}$, then you can check that $$ v_{n+2}-v_{n+1}=-\frac{b}{r_1^2}(v_{n+1}-v_n) $$ Therefore $(v_{n+1}-v_n)$ is a geometric sequence : $$ v_{n+1}-v_n=C(r_2/r_1)^n $$ where $C$ is a constant and $r_2:=-\frac{b}{r_1}$ (notice that $r_1$ and $r_2$ are the roots of $X^2-aX-b$). Summing this gives that $$ v_n=\lambda+\mu(r_2/r_1)^n $$ for some constants $\lambda,\mu$ so that $$ u_n=\lambda r_1^n+\mu r_2^n $$

Tuvasbien
  • 8,907
  • 1
    Umm... ugh.. I don't know linear algebra but thanks? – Neox Jul 14 '21 at 16:08
  • I edited my answer, I added a new proof without the use of linear algebra. – Tuvasbien Jul 14 '21 at 16:28
  • I have a hard time understanding the proof, maybe you can help me. You said $u_n=r^n$ then it satisfies the relation $u_{n+2}=au_{n+1}+bu_n\Leftrightarrow r^2=ar+b$. Isn't it $u_n=r_1^n+r_2^n$ (as I proved in the document) or have I misunderstood? Also I see you defined $v_n$ as $u_nr_1^{-n}$ and then you got rid of $u$ while I get $u_{n+2}-au_{n+1}=br_1^nv_n$. Am I interpreting it wrong? – Neox Jul 14 '21 at 16:52
  • I don't have access to your document. In the first proof I say that $(r^n)$ satisfies the recursive relation iff $r^2=ar+b$. In the other proof, I have $$ v_{n+2}-v_{n+1}=\left(a-r_1\right)u_{n+1}r_1^{-(n+2)}+bu_nr_1^{-(n+2)} $$ Since $r_1^2=ar_1+b$, we have $a-r_1=-b/r_1$, therefore $$ v_{n+2}-v_{n+1}=-\frac{b}{r_1^2}(u_{n+1}r_1^{-(n+1)}-u_{n}r_1^{-n})=-\frac{b}{r_1^2}(v_{n+1}-v_{n}) $$ – Tuvasbien Jul 14 '21 at 17:27
2

Here is something I worked out a few years ago. It might be too general.

This is a totally non-original working out of the general homogeneous linear recurrence.

(Added later: the special cases of one and two term recurrences are shown explicitly at the end.)

If $a_n =\sum_{k=1}^m c_k a_{n-k} $ for $n \ge m$, find the generating function $\sum_{n=0}^{\infty} a_n x^n $ in terms of $a_{0..m-1}$ and $c_{1..m}$.

(This is undoubtedly a duplicate, but I just wanted to work this out from scratch. The algebra and rearrangements of summations is complicated enough so that, as usual, I am hoping that someone might have a simpler derivation.)

Given the linear recurrence

$a_n =\sum_{k=1}^m c_k a_{n-k} $ for $n \ge m$.

Find the generating function $A(x) =\sum_{n=0}^{\infty} a_n x^n $ in terms of $a_{0..m-1}$ and $c_{1..m}$.

My answer is

$A(x) =\dfrac{\sum_{r=0}^{m-1} x^r(a_r-\sum_{k=1}^{r} c_{k} a_{r-k})}{1-\sum_{k=1}^m c_k x^k} $.

My derivation.

Let $A_j(x) =\sum_{n=0}^{j} a_n x^n $ for $j = 0$ to $m-1$.

$\begin{array}\\ A(x) &=\sum_{n=0}^{\infty} a_n x^n\\ &=\sum_{n=0}^{m-1} a_n x^n+\sum_{n=m}^{\infty} a_n x^n\\ &=A_{m-1}(x)+\sum_{n=m}^{\infty} x^n\sum_{k=1}^m c_k a_{n-k}\\ &=A_{m-1}(x)+\sum_{k=1}^m c_k\sum_{n=m}^{\infty} x^n a_{n-k}\\ &=A_{m-1}(x)+\sum_{k=1}^m c_k x^k\sum_{n=m}^{\infty} x^{n-k} a_{n-k}\\ &=A_{m-1}(x)+\sum_{k=1}^m c_k x^k\sum_{n=m-k}^{\infty} x^{n} a_{n}\\ &=A_{m-1}(x)+\sum_{k=1}^m c_k x^k(\sum_{n=0}^{\infty} x^{n} a_{n}-\sum_{n=0}^{m-k-1} x^{n} a_{n})\\ &=A_{m-1}(x)+\sum_{k=1}^m c_k x^k(A(x)-A_{m-k-1}(x))\\ &=A_{m-1}(x)+\sum_{k=1}^m c_k x^kA(x)-\sum_{k=1}^m c_k x^kA_{m-k-1}(x)\\ \end{array} $

so $\begin{array}\\ A(x)(1-\sum_{k=1}^m c_k x^k) &=A_{m-1}(x)-\sum_{k=1}^m c_k x^kA_{m-k-1}(x)\\ &=A_{m-1}(x)-\sum_{k=0}^{m-1} c_{m-k} x^{m-k}A_{k-1}(x)\\ &=A_{m-1}(x)-\sum_{k=0}^{m-1} c_{m-k} x^{m-k}\sum_{n=0}^{k-1} a_n x^n\\ &=A_{m-1}(x)-\sum_{n=0}^{m-2}\sum_{k=n+1}^{m-1} c_{m-k} x^{m-k} a_n x^n\\ &=A_{m-1}(x)-\sum_{n=0}^{m-2}\sum_{k=n+1}^{m-1} c_{m-k} a_n x^{n+m-k}\\ &=A_{m-1}(x)-\sum_{n=0}^{m-2}\sum_{r=n+m-m+1}^{n+m-n-1} c_{m-n-m+r} a_n x^{r} \qquad r = n+m-k, k = n+m-r\\ &=A_{m-1}(x)-\sum_{n=0}^{m-2}\sum_{r=n+1}^{m-1} c_{r-n} a_n x^{r}\\ &=A_{m-1}(x)-\sum_{r=1}^{m-1}\sum_{n=0}^{r-1} c_{r-n} a_n x^{r}\\ &=\sum_{r=0}^{m-1} a_r x^r-\sum_{r=1}^{m-1}x^r\sum_{n=0}^{r-1} c_{r-n} a_n\\ &=a_0+\sum_{r=1}^{m-1} x^r(a_r-\sum_{n=0}^{r-1} c_{r-n} a_n)\\ &=\sum_{r=0}^{m-1} x^r(a_r-\sum_{n=0}^{r-1} c_{r-n} a_n)\\ &=\sum_{r=0}^{m-1} x^r(a_r-\sum_{n=1}^{r} c_{n} a_{r-n})\\ &=\sum_{r=0}^{m-1} x^r(a_r-\sum_{k=1}^{r} c_{k} a_{r-k})\\ \end{array} $

Therefore

$A(x) =\dfrac{\sum_{r=0}^{m-1} x^r(a_r-\sum_{k=1}^{r} c_{k} a_{r-k})}{1-\sum_{k=1}^m c_k x^k} $.

Once you have this, you can use partial fractions to decompose the denominator in terms of the roots.

(added later)

For $m=1$, when $a_n =c_1a_{n-1} $ for $n \ge 1 $, the initial term is $a_0$, and the expressions in braces ("{...}") give the values of the indices, $$A(x) =\dfrac{a_0 }{1-c_1x} =\dfrac{\{r=0\}a_0 }{1-c_1x} $$

For $m=2$, when $a_n =c_1a_{n-1}+c_2a_{n-2} $ for $n \ge 2 $, the initial terms are $a_0$ and $a_1$, and the expressions in braces ("{...}") give the values of the indices, $$A(x) =\dfrac{a_0 +x(a_1-c_1a_{0})}{1-c_1x-c_2x^2} =\dfrac{\{r=0\}a_0 +\{r=1\}x(a_1-\{k=1\}c_1a_{0})}{1-c_1x-c_2x^2} $$

marty cohen
  • 107,799