Let us solve the following recurrence relation and initial condition
an=4an−1+n2−n, n≥1; a0=1
The characteristic equation k−4=0 has the root k=4, and hence the general solution of the reccurence relation is of the form
an=A⋅4n+bn, where the particular solution bn=pn2+qn+r.
It follows that
pn2+qn+r=4(p(n−1)2+q(n−1)+r)+n2−n=4pn2−8pn+4p+4qn−4q+4r+n2−n.
Therefore,
(3p+1)n2+(−8p+3q−1)n+(4p−4q+3r)=0.
We conclude that
3p+1=0, −8p+3q−1=0, 4p−4q+3r=0.
Then
p=−31,q=31(1+8p)=31(1−38)=−95,r=34(q−p)=34(−95+31)=−278.
We conclude that the general solution of relation is the following:
an=A⋅4n−31n2−95n−278.
Since a0=1, we get 1=a0=A−278. Then A=1+278=2735.
Consequently, the solution of the recurrence relation with initial condition is
an=2735⋅4n−31n2−95n−278.
Comments
Leave a comment