How to find the full Taylor expansion of the following: I need to find the full Taylor expansion of $$f(x)=\frac{1+x}{1-2x-x^2}$$
Any help would be appreciated. I'd prefer hints/advice before a full answer is given. I have tried to do partial fractions\reductions. I separated the two in hopes of finding a known geometric sum but I could not.
Edit: I guess you could say that I did not have the.... insight to take the path with the partial decomposition mentioned. I have done some work (I had to go to the gym that is why it took a while)
$$\frac{1+x}{1-2x-x^2}=\frac{1}{2(\sqrt{2}-x-1)}-\frac{1}{2(\sqrt{2}+x+1)}$$ I am going to work with this to go further.
I got to this:
$$\frac{1}{2}\left(\sum_{n=0}^\infty\frac{x^n}{(\sqrt{2}-1)^{n+1}}+\sum_{n=0}^\infty\frac{x^n}{(-\sqrt{2}-1)^{n+1}}\right) $$ But I think this is wrong for some reason.
Edit: Figured it out.
$$\begin{align*}
\implies\frac{1+x}{1-2x-x^2}&=\frac{1}{2(\sqrt{2}-x-1)}-\frac{1}{2(\sqrt{2}+x+1)} \\[2mm]
&=\frac{1}{2}\left(\frac{1}{a-x}-\frac{1}{b+x}\right) \mbox{where $a=\sqrt{2}-1$ and $b=\sqrt{2}+1$}. \\[2mm]
&=\frac{1}{2}\left(\frac{1}{a} \frac{1}{1-\frac{x}{a}}-\frac{1}{b}
\frac{1}{1-\frac{x}{-b}}\right) \\[2mm]
&=\frac{1}{2}\left(\frac{1}{a}\sum_{n=0}^\infty \frac{1}{a^n}x^n-\frac{1}{b}\sum_{n=0}^\infty\frac{1}{(-b)^n}x^n\right) \\[2mm]
&=\frac{1}{2}\left(\frac{1}{\sqrt{2}-1}\sum_{n=0}^\infty \frac{1}{(\sqrt{2}-1)^n}x^n-\frac{1}{\sqrt{2}+1}\sum_{n=0}^\infty\frac{1}{(-\sqrt{2}-1)^n}x^n\right) \\[2mm]
&=\frac{1}{2}\left(\sum_{n=0}^\infty\frac{x^n}{(\sqrt{2}-1)^{n+1}}+\sum_{n=0}^\infty\frac{x^n}{(-\sqrt{2}-1)^{n+1}}\right) \\
&=1+3x+7x^2+17x^3+\ldots
\end{align*}$$
 A: Hint For the function
$$g(x) = \frac{1}{1-x} \text{ over } x \in (-1,1),$$
the Taylor series is the ordinary geometric series
$$\frac{1}{1-x} = 1 + x + x^2 + \ldots = \sum_{k=0}^\infty x^k.$$
If the partial fraction decomposition is given by
$$
\frac{A}{x-B} + \frac{C}{x-D}
$$
how can you get the decomposition you are seeking?
A: Hint: $1 - 2x - x^2 = 2 - (1 + 2x + x^2) = 2 - (x + 1)^2 = (\sqrt{2} - (x + 1))(\sqrt{2} + (x + 1))$
A: Here is an alternate approach. Suppose that
$$
\frac{1+x}{1-2x-x^2}=\sum_{k=0}^\infty a_kx^k
$$
Multiply by $1-2x-x^2$ to get
$$
\begin{align}
1+x
&=\underbrace{a_0}_{1}+\underbrace{(a_1-2a_0)}_1x+\sum_{k=2}^\infty\underbrace{(a_k-2a_{k-1}-a_{k-2})}_{0}x^k
\end{align}
$$
Equating coefficients of $x^k$ gives
$$
a_0=1,a_1=3,\text{ and }a_k=2a_{k-1}+a_{k-2}\text{ for }k\ge2
$$
Therefore,
$$
\frac{1+x}{1-2x-x^2}=1+3x+7x^2+17x^3+41x^4+99x^5+\dots
$$

If we wish a formula for $a_n$ we can solve the recurrence
$$
a_k=2a_{k-1}+a_{k-2}
$$
using the roots of $x^2-2x-1=0$, which are $1\pm\sqrt2$, and $a_0=1,a_1=3$ to get
$$
a_k=\frac{(1+\sqrt2)^{k+1}+(1-\sqrt2)^{k+1}}{2}
$$
which is the integer closest to $\dfrac{(1+\sqrt2)^{k+1}}{2}$.
