Click here to Skip to main content
15,893,564 members

Comments by Patrik Mlekuž (Top 1 by date)

Patrik Mlekuž 3-Nov-15 8:29am View    
We have a nonhomogeneous linear recurrence of degree 1 with constant coefficients:

T(n) - 3T(n-1) = h = f(n).

The general solution is T(n) = u(n) + v(n), where u(n) is general solution of homogeneous recurrence and v(n) is particular solution of nonhomogeneous recurrence:

u(n) - 3u(n-1) = 0,
v(n) - 3v(n-1) = h = f(n).

Point 1) implies u(n) = b*3^n.

Now we have to guess the trial function that satisfies the original recurrence.
If f(n) is polynomial of degree N, then trial function may be a polynomial of the same degree with unknown coefficients. In this case N = 0, so particular solution v(n) = c.