这是台湾清华赵启超教授离散数学13A13B课程的笔记。
Guessing Particular Solution
an−c1an−1−c2An−2−…−ckan−k=fn
Forcing Sequence(fn) |
Trial Sequence(Pn) |
b0 |
B0 |
b1n+b0 |
B1n+B0 |
bmnm+bm−1nm−1+…+b0 |
Bmnm+Bm−1nm−1+…+B0 |
b0λn |
B0λn |
(b1n+b0)λn |
(B1n+B0)λn |
(bmnm+bm−1nm−1+…+b0)λn |
(Bmnm+Bm−1nm−1+…+B0)λn |
b0cos(nθ) |
B0cos(nθ)+B1sin(nθ) |
b0sin(nθ) |
B0cos(nθ)+B1sin(nθ) |
b0λncos(nθ) |
B0λncos(nθ)+B1λnsin(nθ) |
b0λnsin(nθ) |
B0λncos(nθ)+B1λnsin(nθ) |
Example 1
an−2an−1=n for n≥1 with a0=1
The general solution to the associated HRR is α12n
Let the trial sequence for a particular solution to the NRR be Pn=B1n+B0
that is (B1n+B0)−2(B1(n−1)+B0)=n
so −B1n+(2B1−B0)=n
that is B1=−1,B0=−2,Pn=−n−2
The general solution to the NRR is an=α12n−n−2
For n=0,1=a0=α1−2 that is α1=3
Therefore, an=3×2n−n−2 for n≥0.
Example 2
an+2−4an+1+4an=2n,n≥0 with a0=a1=0
HRR: an+2−4an+1+4an=0 characteristic equation is r2−4r+4=0. r=2,2
So the general solution to the associated HRR is α12n+α2n2n
Try the trail sequence Pn=B02n for a particular solution to the NRR.
B02n+2−4B02n+1+4B02n=2n
that is
B02n(4−8+4)=2n
that is 0=2n. It is a contradiction.
Then try Pn=B0n2n
B0(n+2)2n+2−4B0(n+1)2n+1+4B0n2n=2n
that is
B02n(4n+8−8n−8+4n)n=2n
that is 0=2n. It is also a contradiction.
Now try Pn=B0n22n
B0(n+2)22n+2−4B0(n+1)22n+1+4B0n22n=2n
that is
B02n(4(n+2)2−8(n+1)2+4n2)=2n
that is 8=2n.B0=81
so Pn=81n22n is a particular solution to the NRR.
Hence the general solution to the NRR is an=α12n+α2n2n+81n22n
For initial conditions,
0=a0=α1
0=a1=2α1+2α2+41
α1=0,α2=−81
an=81n2n+81n22n
so solution is an=n(n−1)2n−3 for n≥0.
In general, if the trial sequence mentioned above fails, multiply it by n. Try again. Repeat this procedure as often as necessary to find a particular solution.