There's an example question about finding the general term of Fibonacci Sequence $a_n$ using generating function in my textbook. The solution it provides is as follows:
Step 1
Let $$f(x)=a_0+a_1x+a_2x^2+\cdots+a_nx^n+\cdots$$ be the generating function of the sequence, where $a_0=0, a_1=a_2=1$.
Therefore $$xf(x)=a_0x+a_1x^2+a_2x^3+\cdots+a_nx^{n+1}+\cdots$$ and $$x^2f(x)=a_0x^2+a_1x^3+a_2x^4+\cdots+a_nx^{n+2}+\cdots$$
Since $a_n=a_{n-1}+a_{n-2}$, we have $$f(x)-x=xf(x)+x^2f(x)\Longrightarrow f(x)=\frac{x}{1-x-x^2}$$
Step 2
$$f(x)=\frac{x}{1-x-x^2}=\frac{1}{\sqrt{5}}\cdot\frac{\alpha}{x-\alpha}-\frac{1}{\sqrt{5}}\cdot\frac{\beta}{x-\beta}$$
where $\alpha=\frac{-1-\sqrt{5}}{2}, \beta=\frac{-1+\sqrt{5}}{2}$.
$$=-\frac{1}{\sqrt{5}}\cdot\frac{1}{1-\frac{x}{\alpha}}+\frac{1}{\sqrt{5}}\cdot\frac{1}{1-\frac{x}{\beta}}\\=-\frac{1}{\sqrt{5}}[1+\frac{x}{\alpha}+(\frac{x}{\alpha})^2+\cdots+(\frac{x}{\alpha})^n+\cdots]+ \frac{1}{\sqrt{5}}[1+\frac{x}{\beta}+(\frac{x}{\beta})^2+\cdots+(\frac{x}{\beta})^n+\cdots] $$
from this we can obtain the general term of $a_n$ easily through the definition of generating function.
My Main Question :
Where does $f(x)=\frac{1}{\sqrt{5}}\cdot\frac{\alpha}{x-\alpha}-\frac{1}{\sqrt{5}}\cdot\frac{\beta}{x-\beta}$ come from?
- How do we determine the values of $\alpha$ and $\beta$ ?
- Where does $\frac{1}{\sqrt{5}}$ come from ?
- How do we know we have to minus $\frac{1}{\sqrt{5}}\cdot\frac{\beta}{x-\beta}$ instead of plus ?
I've noticed that $\alpha$ and $\beta$ are the roots of $x^2+x-1$. However, I still don't know how the book transformed $f(x)$ into $\frac{1}{\sqrt{5}}\cdot\frac{\alpha}{x-\alpha}-\frac{1}{\sqrt{5}}\cdot\frac{\beta}{x-\beta}$. Therefore I think a clear explanation is needed to me. Thanks!
Perhaps this question is stupid to you guys, but I just can't get over it since I didn't get the textbook from school. I have to learn it by myself without a teacher.
In addition, if this tedious post violates the rules of MSE (such as multiple questions in one post is banned), please leave a comment and I'll try my best to fix it.