0% found this document useful (0 votes)
157 views4 pages

Understanding Recurrence Relations

The document discusses recurrence relations, which define sequences where each term is defined by previous terms using a recurrence formula. It covers: 1) Linear homogeneous recurrence relations of orders 1 and 2, which can be solved using roots of the characteristic equation. 2) Non-homogeneous linear recurrence relations, which involve finding a particular solution and adding it to the general solution of the related homogeneous relation. 3) Methods for solving various types of recurrence relations, including examples solving specific relations.

Uploaded by

Vasikaran K
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
157 views4 pages

Understanding Recurrence Relations

The document discusses recurrence relations, which define sequences where each term is defined by previous terms using a recurrence formula. It covers: 1) Linear homogeneous recurrence relations of orders 1 and 2, which can be solved using roots of the characteristic equation. 2) Non-homogeneous linear recurrence relations, which involve finding a particular solution and adding it to the general solution of the related homogeneous relation. 3) Methods for solving various types of recurrence relations, including examples solving specific relations.

Uploaded by

Vasikaran K
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

The Recurrence Relations

for Janet Vassilev’s Math 327 course

Suppose we have a function f : N → R. Setting an = f (n) for all n ∈ N, we term the


set {an }∞ n=1 a sequence. Suppose we know a1 , . . . , ak and for an = f (an−1 , . . . , an−k ) for
some function f : Rk → R, we say {an }∞ n=1 is a recursively defined sequence given by the
recurrence relation an = f (an−1 , . . . , an−k ).
We say a recurrence relation is linear if f is a linear function or in other words, an =
f (an−1 , . . . , an−k ) = s1 an−1 + · · · + sk an−k + f (n) where si , f (n) are real numbers. A linear
recurrence relation is homogeneous if f (n) = 0.
The order of the recurrence relation is determined by k. We say a recurrence relation is
of order k if an = f (an−1 , . . . , an−k ). We will discuss how to solve linear recurrence relations
of orders 1 and 2.

1 Homogeneous linear recurrence relations


Let an = s1 an−1 be a first order linear recurrence relation with a1 = k. Notice, a2 = s1 k,
a3 = s1 a2 = s21 k, a4 = s1 a3 = s31 k, and in general an = ks1n−1 .
an−1 n−1
Example 1.1 If a1 = 4 and an = for n ≥ 2, then an = 4( 12 )= 1
2n−3
.
2
Suppose now that we have a homogeneous linear recurrence relation of order 2: an =
s1 an−1 + s2 an−2 with a1 = k1 and a2 = k2 . We take a guess that the solution will be of the
form an = crn . Substituting this into our recurrence relation we obtain

crn = s1 crn−1 + s2 crn−2 .

Factoring out crn−2 we obtain a quadratic equation: r2 = s1 r + s2 or

r2 − s1 r − s2 = 0.

We have three possibilities for the roots of this quadratic equation: two distinct real roots
a and b, a unique double root a or two complex conjugate roots a + ib and a − ib. The
solutions to the recurrence relation will depend on these roots of the quadratic equation.
Suppose first that the recurrence relation has two distinct real roots a and b, then the
solution of the recurrence relation will be an = c1 an + c2 bn . We use a1 = k1 and a2 = k2 to
solve the recurrence relation. Since these give us values to solve a system of equations in
two variables c1 and c2 :
k1 = c1 a + c2 b
k2 = c1 a2 + c2 b2 .

Example 1.2 Let a1 = 3 and a2 = 7 and an = 2an−1 +3an−2 for n ≥ 3. The corresponding
quadratic equation is r2 − 2r − 3 = 0 which has roots 3 and −1. So our solution should have
the form an = c1 3n + c2 (−1)n . We must now solve the system of equations

3 = 3c1 − c2

7 = 9c1 + c2 .
Adding the two equations together we obtain 10 = 12c1 or c1 = 65 . So c2 = 3( 56 ) − 3 = − 12 .
So our solution is
5 1
an = 3n − (−1)n
6 2
or
5 1
an = 3n−1 + (−1)n−1 .
2 2
If our recurrence relation has a unique double root a, then our solution will have the
form an = (c1 + c2 n)an this distinguishes us from the order one case since each quadratic
has two roots. Again we use the k1 and k2 to set up a system of equations in c1 and c2 to
find the solution of an .
Example 1.3 Let a1 = 2 and a2 = 5 and an = 6an−1 −9an−2 for n ≥ 3. The corresponding
quadratic equation is r2 − 6r + 9 = 0 which has a unique double root 3. So our solution
should have the form an = (c1 + nc2 )3n . We must now solve the system of equations
2 = 3c1 + 3c2
5 = 9c1 + 18c2 .
Subtracting 3 times the first equation from the second we obtain −1 = 9c2 or c2 = − 19 . So
c1 = 19 + 32 = 79 . So our solution is
7 1
an = 3n − n3n
9 9
or
an = 7(3n−2 ) + −n(3n−2 ).
If our recurrence relation has two complex conjugate roots, we could write our solution
the way we did in the case where we had two real roots: an = c1 (a + bi)n + c2 (a − bi)n .
However, there is a more compact √ way to write our solution in terms of real numbers. We
can write a + bi = re where r = a2 + b2 and θ = tan−1 ab . Then a − bi = re−iθ . Using

DeMoivre’s Theorem (reiθ )n = rn (cos nθ + i sin nθ). Thus


c1 (reiθ )n + c2 (re−iθ )n = rn [(c1 + c2 ) cos nθ + i(c1 − c2 ) sin nθ].
If we set C1 = c1 + c2 and C2 = i(c1 − c2 ), then our solution is
an = rn (C1 cos nθ + C2 sin nθ).
Again we can use k1 and k2 to solve a system of equations in C1 and C2 .
Example 1.4 Let a1 = 1 and a2 = 2 and an = a
√ n−1
− an−2 . The corresponding quadratic

equation is r − r + 1 = 0 which has roots 2 . Note that r = 1 and θ = tan−1 3 = π3 .
2 1±i 3

So our solution should have the form an = C1 cos nπ nπ


3 + C2 sin 3 . We must now solve the
system of equations √
C1 C2 3
1= +
2 2

C1 C2 3
2=− + .
2 2
√ √
Adding the equations together we obtain 3 = C2 3 or C2 = 3. So C1 = 2 − 3 = −1. So
our solution is
nπ √ nπ
an = − cos + 3 sin .
3 3
2 Nonhomogeneous linear recurrence relations
When f (n) 6= 0, we will search for a particular solution apn which is similar to f (n). We
will still solve the homogeneous recurrence relation setting f (n) temporarily to 0 and the
solution of this homogeneous recurrence relation will be ahn and an = apn + ahn . The following
table provides a good first guess:
f (n) apn
a0 + a1 n + · · · + ar nr b0 + b1 n + · · · + br nr
arn brn
a cos nθ + b sin nθ c cos nθ + d sin nθ
However, if the solutions to the related homogeneous recurrence relation are similar to
your function f (n) then you must multiply by an appropriate power of n. When solving
nonhomogeneous recurrence relations, you need to find the particular solution first. Then
you will solve for the needed coefficients of your related homogeneous solution using the
initial data. This will be illustrated in the examples below.

Example 2.1 Suppose an = 2an−1 − 1 for n ≥ 2 and a1 = 3. Since f (n) = −1 and


ahn = c2n , then we will guess that apn = b. We now plug this into the recurrence relation
to solve for b. Since b = 2b − 1 we see that apn = 1. Now we can solve for the c. Since
a1 = 3 = 2c + 1 we see that c = 1 and an = 2n + 1.

Example 2.2 Suppose an = 2an−1 − 2n for n ≥ 2 and a1 = 3. Since f (n) = −2n and
ahn = c2n , then we will guess that apn = bn2n . We now plug this into the recurrence relation
to solve for b. Since bn2n = 2b(n − 1)2n−1 − 2n we see that bn = b(n − 1) − 1 or b = −1.
Thus apn = −n2n . Now we can solve for the c. Since a1 = 3 = 2c − 2 we see that c = 25 and
an = 5(2n−1 ) − n2n .

Note if we did not choose our particular solution to be bn2n but b2n in the above
example, then we would get b2n = b2n − 2n or 0 = −2n and we cannot solve for b.

Example 2.3 Suppose an = 2an−1 − an−2 + 2 for n ≥ 3 with a1 = 1 and a2 = 5. Since


f (n) = 2 and ahn = c1 + c2 n, then we will guess that apn = bn2 . We now plug this into
the recurrence relation to solve for b. Since bn2 = 2b(n − 1)2 − b(n − 2)2 + 2 we see that
bn2 = 2bn2 − 4bn + 2b − bn2 + 4bn − 4b + 2 or 2b = 2 implying b = 1. Thus apn = n2 Now
we can solve for the c1 and c2 . Since a1 = 1 = c1 + c2 + 1 and a2 = 5 = c1 + 2c2 + 4, we
obtain c1 + c2 = 0 and c1 + 2c2 = 1 and see that c2 = 1 and c1 = −1 and an = −1 + n + n2 .
p
Example 2.4 Suppose an = an−1 + sin nπ 2 for n ≥ 2 and a1 = −1. We guess that an =
nπ nπ h
a sin 2 + b cos 2 since an = c. We need to solve for a and b so we plug the particular
(n−1)π
solution into the recurrence relation. a sin nπ nπ
2 + b cos 2 = a sin 2 + b cos (n−1)π
2 + sin nπ
2 .
Using the trig identities sin(A+B) = sin A cos B+sin B cos B and cos(A+B) = cos A cos B−
sin A sin B, we obtain

nπ nπ (n)π π nπ π nπ π nπ π nπ
a sin + b cos = a(sin cos( ) − cos (sin )) + b(cos cos + sin sin ) + sin
2 2 2 2 2 2 2 2 2 2 2
nπ nπ nπ
= −a cos + b sin + sin
2 2 2
.
Simplifying we get
nπ nπ nπ
(a − b) sin + (a + b) cos = sin
2 2 2
which implies that a−b = 1 and a+b = 0 so a = 12 and b = − 12 and apn = 12 sin nπ 1 nπ
2 − 2 cos 2 .
1 3
Now we solve for c using a1 = −1 and −1 = c + 2 implies that c = − 2 So

3 1 nπ 1 nπ
an = − + sin − cos .
2 2 2 2 2

Common questions

Powered by AI

Factoring plays a key role in deriving the quadratic equation from a second-order linear recurrence relation by rewriting the rearranged recurrence in a standard quadratic form r^2 - s1r - s2 = 0. Solving this quadratic equation enables identifying roots that guide the structure of the homogeneous solution to the recurrence. Depending on whether these roots are real, distinct, repeated, or complex, they dictate the form that the overarching solution will take (e.g., involving exponentials, polynomials, or trigonometric functions).

To find the particular solution for a non-homogeneous linear recurrence relation, one typically starts by assuming a form for the particular solution that resembles the non-homogeneous part f(n). This often involves polynomials or exponential terms. Once assumed, the form is plugged into the recurrence to determine specific coefficients by equating like terms. It's crucial to correctly assume the form of this solution because an incorrect assumption—too simple, it might not satisfy the recurrence; too complex, it can unnecessarily complicate calculations. Correctly assuming the form ensures the particular solution aligns with the properties of f(n) while allowing the total solution to satisfy the recurrence .

To solve a system of equations arising in recurrence relations, strategies include using substitution or elimination methods. When dealing with sequences, it's important first to express all terms in terms of the unknown coefficients from initial conditions. Use basic algebraic manipulation to either substitute one equation into another to eliminate variables, or strategically add or subtract equations to isolate variables. Additionally, checking solutions against initial conditions ensures consistency. Matrix approaches such as Gaussian elimination can also be employed for more complex systems .

Homogeneous linear recurrence relations have the general form where the function f(n)=0, which means the sequence depends solely on its previous terms. Their solutions often involve finding characteristic equations to determine roots, which dictate the form of the solution (e.g., distinct roots, double roots, or complex roots). Non-homogeneous linear recurrence relations include a function f(n) that is not zero, which requires finding a particular solution to the inhomogeneous part of the sequence first. Once a particular solution is found, the general solution is the sum of the homogeneous solution and the particular solution .

Initial conditions are critical in determining the specific coefficients in the general solution of recurrence relations. While the general solution provides a framework reflecting the structure (roots, etc.) of the sequence, the actual sequence is fitted by plugging these initial conditions into the solution equations to specifically solve for unknown coefficients. This operation tailors the general form to satisfy the precise starting values of the sequence, ensuring it accurately models given data from the problem context .

DeMoivre’s Theorem allows the expression of solutions involving complex roots in the form of trigonometric functions, such as cosine and sine, rather than complex exponentials. This transformation simplifies the visualization and understanding of the sequence, making it easier to compute real-valued terms that satisfy the initial conditions. By representing the solution in terms of cosines and sines, it is often more intuitive to see periodic behaviors and variations that exponential functions might obscure despite both forms being mathematically equivalent .

Trigonometric identities, such as sin(A+B) and cos(A+B), allow simplification of expressions involving phase shifts in sine or cosine, which occurs in recurrence relations. By leveraging these identities, one can accurately express terms involving phase shifted angles in a more manipulable algebraic form. In recurrence relations, this aides in both guessing the correct form of a particular solution and in the algebraic expansion required to align the terms with the non-homogeneous portion of the relation, solving for coefficients necessary to complete the solution .

In linear recurrence relations, the roots of the characteristic equation determine the form of the solution. When there are double roots, the solution needs to incorporate an extra term to account for the multiplicity by including an additional factor of n (e.g., an = (c1 + nc2)r^n). If the roots are complex, they can be expressed in terms of their polar form using DeMoivre's Theorem, yielding a solution in terms of cosine and sine functions (e.g., an = rn(C1 cos nθ + C2 sin nθ)). These variations in solution forms arise to adequately capture the behavior prescribed by initial conditions and the recurrence relation itself .

When the non-homogeneous term of a recurrence relation overlaps with the homogeneous solution, adjust the guess for the particular solution by multiplying the assumed term by an appropriate power of n, such as n or n^2, until the overlap is eliminated. This ensures the particular solution is linearly independent of the homogeneous solution, fulfilling its role to address the non-homogeneous component of the relation without interfering with the solution to the homogeneous equation .

For a second-order homogeneous linear recurrence relation with two distinct real roots, the solution is typically expressed as an = c1a^n + c2b^n, where a and b are the roots. The initial conditions a1 and a2 provide values to generate a system of equations: a1 = c1a + c2b and a2 = c1a^2 + c2b^2. Solving this system of equations allows for determining the coefficients c1 and c2, which are necessary to satisfy the initial conditions and thus uniquely define the sequence .

You might also like