我一個朋友問我的問題,我用生成函數法解出來的解法。(generating function)
這種方法適用於一般性的題目,不限特殊題型。
QUESTION:
a[n] is a sequence such that a[0]=1, a[1]=1, and satsifies:
n(n+1)a[n+1]=n(n-1)a[n]-(n-2)a[n-1], ........(**)
求a[n] 的一般項。
解:Let
f(x):=a[0]+a[1]x+a[2]x^2+a[3]x^3+...... infinite sum
a[0]=1 means f(0)=1 ...(*0)
a[0]=1 means f'(0)=1 ...(*1) where f'(x):=df(x)/dx derivative of f(x)
multiply (**) by x^(n-1) and sum over n=1 to infinity we get
(d/dx)^2 f(x)=x(d/dx)^2 f(x)-x^2 (d/dx) (x^(-1)f(x)).....(*2)
Note that
d/dx (g(x) A(x)) = (d/dx g(x))A(x)+g(x)d/dx A(x)
(*2) becomes
0=((x-1)(d/dx)^2-x d/dx+1)f(x)
=(xd/dx (d/dx -1)-((d/dx)^2 -1)) f(x)
=((x-1)d/dx -1) (d/dx-1) f(x)
=((x-1)(d/dx- 1/(x-1))(d/dx -1) f(x)
=(x-1)^2 (d/dx) ((1/(x-1)) (d/dx-1) f(x))
which implies
0=d/dx ((1/(x-1)) (d/dx-1) f(x))
which implies
constant k=(1/(x-1)) (d/dx-1) f(x)
Let x=0, we get k=1/(0-1) (d/dx-1)f(x)|(x=0) =0 by (*1)
which implies (d/dx-1) f(x)=0
implies f(x)=ce^x,
c=f(0)=1 by (*0)
So f(x)=e^x=Sum_(n=0 to infty) (1/n!)x^n
and get a[n]=1/n!
事實上我之前有用latex打出來。見
https://www.space.ntu.edu.tw/navigate/share/GLQQYXHYK9