Power serie of $f'/f$ It seems that I'm [censored] blind in searching the power series expansion of $$f(x):=\frac{2x-2}{x^2-2x+4}$$ in $x=0$.
I've tried a lot, e.g., partiell fraction decomposition, or regarding $f(x)=\left(\log((x+1)^2+3)\right)'$ -- without success.  
I' sure that I'm overseeing a tiny little missing link; dear colleagues, please give me a hint.
 A: The given $f(x)$ is given by
\begin{align}
f(x) = \frac{2(x-1)}{x^2 - 2x + 4}
\end{align}
and can be seen as, where $a = 1 + \sqrt{3} i$ and $b = 1 - \sqrt{3} i$, such that $ab=4$,
\begin{align}
f(x) = \frac{-2 \, (1 - x)}{ab \, \left(1 - \frac{x}{a}\right) \left( 1 - \frac{x}{b}\right)}
\end{align}
for which
\begin{align}
\ln f(x) &= \ln\left(- \frac{4}{ab}\right) + \ln(1 - x) - \ln\left(1 - \frac{x}{a}\right) - \ln\left(1 - \frac{x}{b}\right) \\
&= \pi i - \ln 2 + \ln(1 - x) - \ln\left(1 - \frac{x}{a}\right) - \ln\left(1 - \frac{x}{b}\right) \\
&= \pi i - \ln 2 - \sum_{n=1}^{\infty} \left( 1 - \frac{1}{a^{n}} - \frac{1}{b^{n}} \right) \, \frac{x^{n}}{n} \\
&= \pi i - \ln 2 + \sum_{n=1}^{\infty} \left( \frac{a^{n} + b^{n}}{4^{n}} - 1 \right) \, \frac{x^{n}}{n} \\
&= \pi i - \ln 2 + \sum_{n=1}^{\infty} \frac{a^{n} + b^{n} - 4^{n} }{n} \, \left(\frac{x}{4}\right)^{n} \\
&= \pi i - \ln 2 + \sum_{n=1}^{\infty} \frac{ 2 \, \cos\left(\frac{n \pi }{3}\right) - 2^{n} }{n} \, \left(\frac{x}{2}\right)^{n}.
\end{align}
Now differentiating both sides leads to
\begin{align}
\frac{f'}{f} &= \sum_{n=1}^{\infty} \left( 2 \, \cos\left(\frac{n \pi }{3}\right) - 2^{n} \right) \, \left(\frac{x}{2}\right)^{n} \\
&= \frac{1}{2} \, \sum_{n=1}^{\infty} \left(2 \, \cos\left(\frac{n \pi}{3}\right) - 2^{n} \right) \, \left(\frac{x}{2}\right)^{n-1} \\
&= \sum_{n=0}^{\infty} \left( \cos\left(\frac{(n+1) \pi}{3}\right) - 2^{n} \right) \, \left(\frac{x}{2}\right)^{n}.
\end{align}
Expanding the first few terms provides
\begin{align}
- \frac{f'}{f} = \frac{1}{2} + \frac{5 \, x}{4} + \frac{5 \, x^{2}}{4} + \frac{17 \, x^{3}}{16} + \frac{31 \, x^{4}}{32} + \mathcal{O}(x^{5}) 
\end{align}
A: Given

$$
f(x) = \frac{ 2 x - 2 }{ x^2 - 2 x + 4 }. \tag 1
$$

Assuming you want to expand $f(x)$.
Let
$$
\phi_\pm = 1 \pm \mathtt{i} \sqrt{3}. \tag 2
$$
We can write (1) as
$$
f(x) =
   \frac{ 1 }{ x - \phi_+ } + 
   \frac{ 1 }{ x - \phi_- }. \tag 3
$$
Whence
$$
f(x) =
   - \sum_{k=0}^\infty \left(
      \frac{1}{{\phi_+}^{k+1}} +
      \frac{1}{{\phi_-}^{k+1}}
   \right) x^k. \tag 4
$$
Note that
$$
\phi_\pm = 1 \pm \mathtt{i} \sqrt{3} =
   2 {\exp}\big( \pm \mathtt{i} \pi / 3 \big). \tag 5
$$
Putting (5) in (4) yields

$$
\bbox[16px,border:2px solid #800000] {
   \frac{ 2 x - 2 }{ x^2 - 2 x + 4 } =
      - \sum_{k=0}^\infty {\cos}\big( [k+1] \pi / 3 \big)
      \left( \frac{x}{2} \right)^k.
} \tag {I}
$$

Simple expansion yields

$$
\bbox[16px,border:2px solid #800000] { \frac{ 2 x - 2 }{ x^2 - 2 x + 4 } =
   - \frac{1}{2}
   + \frac{x}{4} + \frac{x^2}{4} + \frac{x^3}{16}
   - \frac{x^4}{32} - \frac{x^5}{32} - \frac{x^6}{128}
   + \cdots
} \tag{II}
$$


Note that
$$
f(x) = \frac{g'(x)}{g(x)}, \tag 6
$$
where
$$
g(x) = x^2 - 2x + 4. \tag 7
$$

If you want to expand
$$
\frac{f'(x)}{f(x)}, \tag 8
$$
then use the simple relation
$$
\frac{f'(x)}{f(x)} = \frac{g''(x)}{g'(x)} - \frac{g'(x)}{g(x)}. \tag 9
$$
Note that
$$
\frac{g''(x)}{g'(x)} = \frac{2x}{2x-2} = - \sum_{k=0}^\infty x^k \tag {10}.
$$
Combination with (II) yields

$$
\bbox[16px,border:2px solid #800000] {
   \frac{f'(x)}{f(x)} =
      + \sum_{k=0}^\infty \left(
         2^{-k} {\cos}\big( [k+1] \pi / 3 \big) - 1
      \right)
      x^k.
} \tag {III}
$$

Simple expansion yields

$$
\bbox[16px,border:2px solid #800000] { \frac{f'(x)}{f(x)} =
   - \frac{1}{2}
   - \frac{5x}{4} - \frac{5x^2}{4} - \frac{17x^3}{16}
   - \frac{31x^4}{32} - \frac{31x^5}{32} - \frac{127x^6}{128}
   \cdots
} \tag{IV}
$$

A: You could try noting
$$\frac{1}{(x-2)^{2}}=\frac{1}{2}\frac{d}{dx}\left(\frac{1}{1-(x/2)}\right)$$
Then 
$$f(x)=2(x-1)\frac{1}{2}\frac{d}{dx}\left(\frac{1}{1-(x/2)}\right)$$
lends itself to a power-series expansion immediately...
A: Given any function $f$, if we restrict to where $f$ is nonzero (so that either $\log f$ or $\log -f$ exists), we can write $\frac{f'}{f}=\frac{d}{dt}\log |f|$.    If $f=c \prod (x-\alpha_i)^{k_i}$ is a rational function, $\log f = \log c +  \sum k_i \log (x-\alpha_i)$ and so 
$$\frac{f'}{f}=\frac{d}{dt}\log |f| = \sum k_i \frac{1}{x-\alpha}.$$
Now, use the fact that $\frac{1}{1-x}=\sum x^i$, and the factorization that $(2x-2)/(x^2−2x+4)= 2(x-1)(x-1+\sqrt{3})^{-1}(x-1-\sqrt{3})^{-1}$.  
A: Since
$$
x^2-2x+4=(x-1)^2+3=(x-2u)(x-2\bar{u}),
$$
with
$$
u=e^{i\frac\pi3},
$$
we have
\begin{eqnarray}
f(x)&=&\frac{2x-2}{(x-2u)(x-2\bar{u})}=\frac{1}{x-2u}+\frac{1}{x-2\bar{u}}=-\frac{\bar{u}}{2}\cdot\frac{1}{1-\frac{\bar{u}}{2}x}-\frac{u}{2}\cdot\frac{1}{1-\frac{u}{2}x}\\
&=&-\frac{\bar{u}}{2}\sum_{n=0}^\infty\left(\frac{\bar{u}}{2}\right)^nx^n-\frac{u}{2}\sum_{n=0}^\infty\left(\frac{u}{2}\right)^nx^n
=-\sum_{n=0}^\infty\left(\frac{\bar{u}}{2}\right)^{n+1}x^n-\sum_{n=0}^\infty\left(\frac{u}{2}\right)^{n+1}x^n\\
&=&-\sum_{n=0}^\infty\frac{u^{n+1}+\bar{u}^{n+1}}{2^{n+1}}x^n=-\sum_{n=0}^\infty\frac{1}{2^n}\cos\left(\frac{n+1}{3}\pi\right)x^n.
\end{eqnarray}
Also
\begin{eqnarray}
\frac{f'(x)}{f(x)}&=&\left[\ln |f(x)|\right]'=[\ln2+\ln|x-1|-\ln|x^2-2x+4|]'\\
&=&\frac{1}{x-1}-\frac{2x-2}{x^2-2x+4}=-\frac{1}{1-x}-f(x)\\
&=&-\sum_{n=0}^\infty x^n-\sum_{n=0}^\infty\frac{1}{2^n}\cos\left(\frac{n+1}{3}\pi\right)x^n\\
&=&-\sum_{n=0}^\infty\left[1+\frac{1}{2^n}\cos\left(\frac{n+1}{3}\pi\right)\right]x^n.
\end{eqnarray}
