<s>[INST] Why does my solution of the closed form formula for the Fibonacci sequence differ from the actual solution by a sign? I have $a_{n}=a_{n-1}+a_{n-2}$ with $a_0=0$ and $a_1=1$.
I've found the generating function $G(x)=\frac{x}{1-x-x^2}$. Solving $1-x-x^2=0$ gives the solutions $\alpha_1=\frac{-1+\sqrt{5}}{2}$ and $\alpha_2=\frac{-1-\sqrt{5}}{2}$. Then, using partial fractions, I found: $$\frac{x}{1-x-x^2}=\frac{\frac{1}{\sqrt5}\alpha_1}{x-\alpha_1}-\frac{\frac{1}{\sqrt{5}}\alpha_2}{x-\alpha_2},$$
so that
\begin{align}
G(x)&=\frac{1}{\sqrt{5}}( \frac{\alpha_1}{x-\alpha_1} - \frac{\alpha_2}{x-\alpha_2})\\
& =\frac{1}{\sqrt{5}} (\frac{1}{\frac{1}{\alpha_1}x-1}- \frac{1}{\frac{1}{\alpha_2}x-1})\\
&= \frac{1}{\sqrt{5}} (\frac{1}{1-\frac{1}{\alpha_2}x} - \frac{1}{1-\frac{1}{\alpha_1}x})\\
& = \frac{1}{\sqrt{5}} (\sum((\frac{1}{\alpha_2})^n-(\frac{1}{\alpha_1})^n)x^n,
\end{align}
So that the solution is $a_n=\frac{1}{\sqrt{5}}((\frac{1}{\alpha_2})^n-(\frac{1}{\alpha_1})^n)$.
$\frac{1}{\alpha_1}=\frac{1+\sqrt{5}}{2}$ and $\frac{1}{\alpha_2}=\frac{1-\sqrt{5}}{2}$. Substituting these values get us:
$$a_n=\frac{1}{\sqrt{5}}((\frac{1-\sqrt{5}}{2})^n-(\frac{1+\sqrt{5}}{2})^n),$$
which actually differs from the correct answer only by a negative sign.
 [/INST] Hint: It seems we have
\begin{align*}
\frac{x}{1-x-x^2}=\color{blue}{-}\frac{\frac{1}{\sqrt5}\alpha_1}{x-\alpha_1}\color{blue}{+}\frac{\frac{1}{\sqrt{5}}\alpha_2}{x-\alpha_2}
\end{align*}
</s>