Javascript required
Skip to content Skip to sidebar Skip to footer

Find Linear Recurrence Operator Given Solutions

A solution to a recurrence relation gives the value of x n x_n in terms of n n , and does not require the value of any previous terms.

Solve the recurrence relation: x 1 = 3 , x n = 3 x n 1 x_1=3,\ x_n=3x_{n-1}


Each term in the sequence can be calculated with a previous term. The first term, x 1 = 3 x_1=3 , is given.

The next term can be calculated using the relation: x n = 3 x n 1 x_n=3x_{n-1}

x 2 = 3 x 1 = 9 x_2=3x_1=9

This process is repeated with subsequent terms:

x 3 = 3 x 2 = 27 x_3=3x_2=27

x 4 = 3 x 3 = 81 x_4=3x_3=81

One might notice a pattern at this point. These are powers of 3.

Thus, the solution is x n = 3 n x_n=3^n for all positive integers n n .

Geometric series (or combinations, as we will see) are usually the solutions to recurrences. Now, let us say we have a recurrence x n = c 1 x n 1 + c 2 x n 2 + + c k x n k x_n=c_1x_{n-1}+c_2x_{n-2}+\cdots+c_kx_{n-k} and a solution x n = a r n x_n=ar^n .

Plugging in, we get a r n = c 1 a r n 1 + c 2 a r n 2 + + c k a r n k . ar^n=c_1ar^{n-1}+c_2ar^{n-2}+\cdots+c_kar^{n-k}. Since a , r 0 a,r\neq 0 , we can divide by a r n k : ar^{n-k}: r k = c 1 r k 1 + c 2 r k 2 + + c k . r^k=c_1r^{k-1}+c_2r^{k-2}+\cdots+c_k. Moving the terms over, we get r k c 1 r k 1 c 2 r k 2 c k = 0 , r^k-c_1r^{k-1}-c_2r^{k-2}-\cdots-c_k=0, which is a polynomial in r r , so the solution satisfies the recurrence only if r r is a root of this polynomial. This polynomial is called the characteristic polynomial of the recurrence.

Also, note that if two geometric series satisfy a recurrence, the sum of them also satisfies the recurrence. Then, we can find the following method for solving recurrences:

  1. Find the characteristic polynomial.
  2. Find the roots r 1 , r 2 , , r k r_1,r_2,\cdots,r_k of the characteristic polynomial.
  3. Assuming no multiple roots, the closed-form expression will look like x n = a 1 ( r 1 ) n + a 2 ( r 2 ) n + + a k ( r k ) n x_n=a_1(r_1)^n+a_2(r_2)^n+\cdots+a_k(r_k)^n for some constant a a 's.
  4. Use the initial values to find the values of the a a 's.

Let us try an example:

The sequence x n x_n is defined by x 0 = 1 x_0=1 , x 1 = 3 x_1=3 , and x n = 5 x n 1 + 6 x n 2 x_n=5x_{n-1}+6x_{n-2} for all n 2 n\ge 2 . Find a closed-form expression for x n x_n .


The characteristic polynomial is found by letting the lowest indexed term in the recurrence be x k x_k , and replacing all x i x_i 's with x i k x^{i-k} . In this case, x n = 5 x n 1 + 6 x n 2 x 2 = 5 x + 6 x 2 5 x 6 = 0. x_n=5x_{n-1}+6x_{n-2}\implies x^2=5x+6\implies x^2-5x-6=0. Factoring the characteristic polynomial, we get roots of 1 -1 and 6 6 . Thus, the closed-form expression looks like x n = a 1 ( 1 ) n + a 2 ( 6 ) n . x_n=a_1(-1)^n+a_2(6)^n. Plugging in n = 0 n=0 , 1 = a 1 + a 2 . 1=a_1+a_2. Plugging in n = 1 n=1 , 3 = a 1 + 6 a 2 . 3=-a_1+6a_2. Solving, we get a 1 = 3 7 a_1=\frac{3}{7} and a 2 = 4 7 a_2=\frac{4}{7} , and the closed-form expression is x n = 3 7 ( 1 ) n + 4 7 ( 6 ) n . x_n=\dfrac{3}{7}(-1)^n+\dfrac{4}{7}(6)^n. This can be verified by plugging it into the recurrence. _\square

Problems:
1. Make up your own recurrences and solve them!

Click here for more on this topic. Thanks for reading!

In the wiki Linear Recurrence Relations, linear recurrence is defined and a method to solve the recurrence is described in the case when its characteristic polynomial has only roots of multiplicity one. This wiki will introduce you to a method for solving linear recurrences when its characteristic polynomial has repeated roots. That is, when some of the roots can have multiplicities higher than one.

A linear recurrence with repeated roots is a linear recurrence of the form x n = c 1 x n 1 + c 2 x n 2 + + c k x n k , x_n=c_1x_{n-1}+c_2x_{n-2}+\cdots+c_kx_{n-k}, where all the c c 's are constants, and whose characteristic polynomial, r k c 1 r k 1 c 2 r k 2 c k , r^k-c_1r^{k-1}-c_2r^{k-2}-\cdots-c_k, may have repeated roots, that is, roots with multiplicity higher than 1. We are going to explain how the method explained in Linear Recurrence Relations can be modified to solve this other linear recurrence relations too. Let us consider an example before explaining the method in general.

Recurrence Relation with only One Repeated Root

A sequence is defined by x 0 = 0 , x_0=0, x 1 = 1 , x_1=1, and x n = 4 x n 1 4 x n 2 x_n=4x_{n-1}-4x_{n-2} for all n 2 n\geq 2 . Find the closed-form of x n . x_n.


The characteristic polynomial of this recurrence relation is r 2 4 r + 4. r^2-4r+4. By factoring this polynomial and making it zero, we get r 2 4 r + 4 = ( r 2 ) 2 = 0. r^2-4r+4=(r-2)^2=0. So its only root is 2 that has multiplicity 2. As explained in Linear Recurrence Relations, the sequence α n = 2 n \alpha_n=2^n is one of the solutions. Since the order of the recurrence, which is also equal to the degree of the characteristic polynomial, is 2, we need to get another independent solution. In this case, the other solution can be obtained just by multiplying the given solution by n , n, so the other solution can be β n = n 2 n . \beta_n=n2^n. We can verify that β n \beta_n is also a solution by direct calculation. Indeed, substituting into the right side of the recurrence, we get 4 β n 1 4 β n 2 = 4 ( n 1 ) 2 n 1 4 ( n 2 ) 2 n 2 = ( 2 n 2 ) 2 n ( n 2 ) 2 n = n 2 n = β n . 4\beta_{n-1}- 4\beta_{n-2}=4(n-1)2^{n-1}-4(n-2)2^{n-2}=(2n-2)2^{n}-(n-2)2^n=n2^n=\beta_n. Now the closed-form solution can be expressed as a linear combination of both solutions. It means that the general solution can be written as x n = a 1 2 n + a 2 n 2 n = 2 n ( a 1 + a 2 n ) . x_n=a_12^n+a_2 n2^n=2^n(a_1+a_2n). As we saw in Linear Recurrence Relations, we can use the given initial values of x n x_n when n = 0 n=0 and n = 1 , n=1, to find a 1 a_1 and a 2 . a_2. Making n = 0 n=0 and n = 1 , n=1, respectively, in the previous equation, we get the equations a 1 = 0 a_1=0 and 2 a 1 + 2 a 2 = 1. 2a_1+2a_2=1. Using the substitution method, we get that a 1 = 0 a_1=0 and a 2 = 1 2 a_2=\frac{1}{2} . So the resulting formula for x n x_n is x n = n 2 n 1 . x_n=n2^{n-1}. \ _\square


In the process of solving a linear recurrence with repeated roots, if r r is a root of the characteristic polynomial with multiplicity k > 1 , k>1, then we need to consider the sequences r n , r^n, n r n , nr^n, n 2 r n , n^2r^n, , \cdots, n k 1 r n n^{k-1}r^n as part of the closed form of the solution of the recurrence. Now we can explain the general method.

  1. Find the characteristic polynomial (degree k k ).

  2. Find all roots of the characteristic polynomial r 1 , r 2 , , r m , r_1, r_2, \cdots, r_m, where m k m\leq k with multiplicities l 1 , l 2 , , l m , l_1, l_2, \cdots , l_m, respectively.

  3. The closed-form expression of the solution can be expressed as a linear combination of all the sequences of the form n j r i n , n^j r_i^n, where 0 j l i 1 0\leq j\leq l_i-1 and 1 i m . 1\leq i \leq m.

  4. Use the initial values of to find the constants used as coefficients of the linear combination.

The following is an example of solving a recurrence with a 3 rd 3^\text{rd} degree characteristic polynomial and one repeated root:

A sequence x n x_n is defined by x 0 = 1 , x_0=-1, x 1 = 0 , x_1=0, x 2 = 1 x_2=1 and the recurrence relation x n = 6 x n 1 12 x n 2 + 8 x n 3 . x_n=6x_{n-1}-12x_{n-2}+8x_{n-3}. Find the closed-form of x n . x_n.


The characteristic polynomial of the given recurrence relation is r 3 6 r 2 + 12 r 8 = ( r 2 ) 3 . r^3-6r^2+12r-8=(r-2)^3. So it has only one root, r = 2 , r=2, with multiplicity 3. So we have accomplished the steps 1 and 2 of the general method described above. According to the step 3, the closed-form of x n x_n will be x n = a 1 2 n + a 2 n 2 n + a 3 n 2 2 n . x_n=a_12^n+a_2n2^n+a_3n^22^n. Now, what remains to do is the step 4.

We are going to find a 1 , a_1, a 2 , a_2, and a 3 a_3 using the initial values. Making n = 0 , 1 , n=0, 1, and 2 , 2, respectively, in the formula of x n x_n obtained above, we get the equations a 1 = 1 , a_1=-1, 2 a 1 + 2 a 2 + 2 a 3 = 0 , 2a_1+2a_2+2a_3=0, and 4 a 1 + 8 a 2 + 16 a 3 = 1. 4a_1+8a_2+16a_3=1. Solving the system formed by these three equations, we obtain a 1 = 1 , a_1=-1, a 2 = 11 8 , a_2=\frac{11}{8}, and a 3 = 3 8 . a_3=-\frac{3}{8}. So the closed-form of x n x_n is x n = 2 n 8 ( 3 n 2 11 n + 8 ) . x_n=-\frac{2^n}{8}(3n^2-11n+8).\ _\square

The following is an example of solving a recurrence with a 3 rd 3^\text{rd} degree characteristic polynomial with two roots, one of which has multiplicity 2.

A sequence x n x_n is defined by x 0 = 1 , x_0=1, x 1 = 1 , x_1=1, x 2 = 2 x_2=2 and the recurrence relation x n = 4 x n 1 + 3 x n 2 18 x n 3 . x_n=4x_{n-1}+3x_{n-2}-18x_{n-3}. Find the closed-form of x n . x_n.


The characteristic polynomial of the given recurrence relation is r 3 4 r 2 3 r + 18 = ( r 3 ) 2 ( r + 2 ) . r^3-4r^2-3r+18=(r-3)^2(r+2). So it has only two roots, r = 3 r=3 with multiplicity 2, and r = 2 r=-2 with multiplicity 1. Then the closed-form of x n x_n will look like x n = a 1 3 n + a 2 n 3 n + a 3 ( 2 ) n . x_n=a_13^n+a_2n3^n+a_3(-2)^n. Using this expression and the given initial values, we can find a 1 , a_1, a 2 , a_2, and a 3 a_3 . Indeed, let us make n = 0 , 1 , n=0, 1, and 2 , 2, respectively, in the formula obtained for x n , x_n, then we get the equations x 0 = a 1 + a 3 = 1 , x_0=a_1+a_3=1, x 1 = 3 a 1 + 3 a 2 2 a 3 = 1 , x_1=3a_1+3a_2-2a_3=1, and x 2 = 9 a 1 + 18 a 2 + 4 a 3 = 2. x_2=9a_1+18a_2+4a_3=2. Solving the system formed by these three equations, we obtain a 1 = 4 5 , a_1=\frac{4}{5}, a 2 = 1 3 , a_2=-\frac{1}{3}, and a 3 = 1 5 . a_3=\frac{1}{5}. So the closed-form of x n x_n is x n = 1 15 [ ( 12 5 n ) 3 n + 3 ( 2 ) n ] . x_n=\frac{1}{15}\left[(12-5n)3^n+3(-2)^n\right]. \ _\square

We will also explain here how to proceed in the case that some of the roots of the characteristic polynomial of a given linear recurrence are complex non-real numbers. Let us illustrate this with an example.

A sequence x n x_n is defined by x 0 = 0 , x_0=0, x 1 = 1 , x_1=1, and the recurrence relation x n = x n 1 4 x n 2 . x_n=x_{n-1}- 4x_{n-2}. Find the closed-form of x n . x_n.

The characteristic polynomial of the given recurrence is r 2 = r 4 r^2=r-4 Since the solutions of this equation are r = 1 ± i 15 2 = 2 e ± i θ , r=\frac{1\pm i \sqrt{15}}{2}= 2e^{\pm i \theta}, where θ = arctan 15 \theta= \arctan \sqrt{15} ( see Euler's formula here). Then the solutions of the recurrence can be expressed as linear combination of 2 n ( e i n θ + e i n θ ) 2 = 2 n cos n θ 2^n \frac{(e^{in\theta}+e^{-in\theta})}{2}=2^n \cos{n\theta} and 2 n ( e i n θ e i n θ ) 2 i = 2 n sin n θ , 2^n \frac{(e^{in\theta}-e^{-in\theta})}{2i}=2^n \sin{n\theta}, therefore x n = c 1 2 n cos ( n θ ) + c 2 2 n sin ( n θ ) . x_n= c_1 2^n \cos(n \theta)+c_{2} 2^n \sin (n \theta).

Now using that x 0 = 0 , x_0=0, and x 1 = 1 , x_1=1, we get the following two equations: c 1 = 0 c_1=0 and 2 c 1 cos θ + 2 c 2 sin θ = 1 , 2c_1 \cos \theta +2c_2 \sin\theta =1, where cos θ = 1 / 4 \cos \theta =1/4 and sin θ = 15 / 4. \sin \theta =\sqrt{15}/4. By solving this system, we obtain that c 1 = 0 c_1=0 and c 2 = 2 15 . c_2= \frac{2}{\sqrt{15}}. Therefore, the closed form of the sequence is x n = 2 n + 1 15 sin ( n θ ) , x_n= \frac{2^{n+1}}{\sqrt{15}} \sin{(n \theta)}, where θ = arctan 15 . \theta= \arctan \sqrt{15}. \:\:_\square

We can generalize the procedure used in the previous example to any second order linear recurrence for which the characteristic polynomial has two complex conjugate roots. Let us assume that we wish to solve the linear recurrence x n = p x n 1 + q x n 2 x_n=px_{n-1}+qx_{n-2} for any natural number n 3. n\geq 3. The characteristic polynomial of this recurrence is r 2 p r q r^2-pr-q and let us assume that p 2 + 4 q < 0. p^2+4q<0. Then the characteristic polynomial has two complex conjugate solutions a + b i a+bi and a b i . a-bi. Of course, we might use the sequences ( a + b i ) n (a+bi)^n and ( a b i ) n (a-bi)^n to generate all possible solutions of the recurrence. But these are complex-valued sequences. To get real-valued solutions it would more convenient to consider the sequences defined by the formulas c n = ( a + b i ) n + ( a b i ) n 2 and d n = ( a + b i ) n ( a b i ) n 2 i . c_n=\frac{(a+bi)^n+(a-bi)^n}{2} \:\text{and} \: d_n=\frac{(a+bi)^n-(a-bi)^n}{2i}. Those two sequences can be also written in the trigonometric form. Indeed, let us assume that ρ = a 2 + b 2 \rho =\sqrt{a^2+b^2} and θ \theta is an angle such that sin θ = b a 2 + b 2 \sin \theta=\frac{b}{\sqrt{a^2+b^2}} and cos θ = a a 2 + b 2 . \cos \theta=\frac{a}{\sqrt{a^2+b^2}}. Then using De Moivres Theorem, we obtain that c n = ρ n cos ( n θ ) c_n= \rho^n \cos(n \theta) and d n = ρ n sin ( n θ ) . d_n=\rho^n\sin(n\theta). Now it can be proved that any real-valued sequence that is a solution of the given recurrence can be express as a linear combination of c n c_n and d n . d_n. That is, any such a sequence can be represented as x n = c 1 ρ n cos ( n θ ) + c 2 ρ n sin ( n θ ) . x_n= c_1 \rho^n \cos(n \theta)+c_2\rho^n\sin(n\theta).

We can get a recurrence relation for a sequence ( x n ) n = 0 (x_n)_{n=0}^\infty when its closed-form is given in the form of a linear combination of terms of the form n j s n , n^js^n, where j j is a non-negative integer, and s s is any real or complex number. For any such number s , s, we denote by j s j_s the largest value of j j such that n j s n n^j s^n is one of the terms of the linear combination mentioned above, then the s s is a root of multiplicity j s + 1 j_s+1 of the characteristic polynomial of the given linear recurrence. Therefore, from the closed-form of the sequence we can get all roots of the characteristic polynomial of the recurrence relation and their multiplicities, which allows us to find the characteristic polynomial, and thus the recurrence relation.

The following is an example where we have to find the recurrence given the closed-form:

Find a recurrence for the sequence x n = ( 3 ) n ( 3 + 4 n ) + n 2 2 n . x_n=(-3)^n (3+4n)+n^22^n.


According to our comment above, the numbers -3 and 2 are roots of the characteristic polynomial of the desired recurrence with multiplicities 2 and 3, respectively. Then the polynomial can be ( r + 3 ) 2 ( r 2 ) 3 . (r+3)^2(r-2)^3. Expanding it, we get r 5 15 r 3 + 10 r 2 + 60 r 72. r^5-15 r^3+10 r^2+60 r-72. Therefore, the corresponding recurrence will be x n = 15 x n 2 10 x n 3 60 x n 4 + 72 x n 5 . x_n=15x_{n-2}-10x_{n-3}-60x_{n-4}+72x_{n-5}. \ _\square

x n = k = 0 9 a k n k \large x_n=\sum_{k=0}^{9}a_k n^k

For the given values of the numbers a k a_k for k = 0 , 1 , 2 , , 9 , k=0,1,2,\cdots, 9, it is true that x n = e n x_n=e^n for n = 1 , 2 , , 10. n=1, 2, \cdots, 10. Find x 11 . \left\lfloor x_{11}\right\rfloor.

Clarification: e = lim n ( 1 + 1 n ) n 2.71828 \displaystyle e = \lim_{n\to \infty} \left(1 +\dfrac1n \right)^n \approx 2.71828 .

x n = 2 n cos n θ \large x_n=2^n \cos n\theta

For the given sequence we know that x 2 = 28 9 \large x_2=-\frac{28}{9} and x 3 = 184 27 . \large x_3=- \frac{184}{27}.

If x 5 = A B , x_5=\dfrac{A}{B}, where A A and B B are coprime positive integers, find A + B . A+B.


See Part 1.

Find a x 5 + b y 5 a_{}^{}x^5 + b_{}y^5 if the real numbers a a_{}^{} , b b_{}^{} , x x_{}^{} , and y y_{}^{} satisfy the equations a x + b y = 3 a x 2 + b y 2 = 7 a x 3 + b y 3 = 1 6 a x 4 + b y 4 = 4 2 . \begin{aligned} ax + by &= 3^{}_{}\\ ax^2 + by^2 &= 7^{}_{}\\ ax^3 + by^3 &= 16^{}_{}\\ ax^4 + by^4 &= 42^{}_{}. \end{aligned}

x n = a sin n θ + b cos n θ \large x_n=a \sin n\theta+b\cos n\theta

Find x 7 x_7 if the numbers a , a, b b and θ \theta satisfy the following equations: x 1 = 15 , x_1=15, x 2 = 3 , x_2=3, and x 3 = 12. x_3=-12.


Inspiration.

A polynomial f ( x ) f(x) has degree 8 8 and f ( i ) = 2 i f(i)=2^i for i = 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8. i=0,1,2,3,4,5,6,7,8.

Find f ( 9 ) . f(9).

Find Linear Recurrence Operator Given Solutions

Source: https://brilliant.org/wiki/linear-recurrence-relations/